.travis.yml 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247
  1. language: go
  2. go_import_path: github.com/ethereum/go-ethereum
  3. sudo: false
  4. jobs:
  5. allow_failures:
  6. - stage: build
  7. os: osx
  8. go: 1.17.x
  9. env:
  10. - azure-osx
  11. - azure-ios
  12. - cocoapods-ios
  13. include:
  14. # This builder only tests code linters on latest version of Go
  15. - stage: lint
  16. os: linux
  17. dist: bionic
  18. go: 1.18.x
  19. env:
  20. - lint
  21. git:
  22. submodules: false # avoid cloning ethereum/tests
  23. script:
  24. - go run build/ci.go lint
  25. # These builders create the Docker sub-images for multi-arch push and each
  26. # will attempt to push the multi-arch image if they are the last builder
  27. - stage: build
  28. if: type = push
  29. os: linux
  30. arch: amd64
  31. dist: bionic
  32. go: 1.18.x
  33. env:
  34. - docker
  35. services:
  36. - docker
  37. git:
  38. submodules: false # avoid cloning ethereum/tests
  39. before_install:
  40. - export DOCKER_CLI_EXPERIMENTAL=enabled
  41. script:
  42. - go run build/ci.go docker -image -manifest amd64,arm64 -upload ethereum/client-go
  43. - stage: build
  44. if: type = push
  45. os: linux
  46. arch: arm64
  47. dist: bionic
  48. go: 1.18.x
  49. env:
  50. - docker
  51. services:
  52. - docker
  53. git:
  54. submodules: false # avoid cloning ethereum/tests
  55. before_install:
  56. - export DOCKER_CLI_EXPERIMENTAL=enabled
  57. script:
  58. - go run build/ci.go docker -image -manifest amd64,arm64 -upload ethereum/client-go
  59. # This builder does the Ubuntu PPA upload
  60. - stage: build
  61. if: type = push
  62. os: linux
  63. dist: bionic
  64. go: 1.18.x
  65. env:
  66. - ubuntu-ppa
  67. - GO111MODULE=on
  68. git:
  69. submodules: false # avoid cloning ethereum/tests
  70. addons:
  71. apt:
  72. packages:
  73. - devscripts
  74. - debhelper
  75. - dput
  76. - fakeroot
  77. - python-bzrlib
  78. - python-paramiko
  79. script:
  80. - echo '|1|7SiYPr9xl3uctzovOTj4gMwAC1M=|t6ReES75Bo/PxlOPJ6/GsGbTrM0= ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA0aKz5UTUndYgIGG7dQBV+HaeuEZJ2xPHo2DS2iSKvUL4xNMSAY4UguNW+pX56nAQmZKIZZ8MaEvSj6zMEDiq6HFfn5JcTlM80UwlnyKe8B8p7Nk06PPQLrnmQt5fh0HmEcZx+JU9TZsfCHPnX7MNz4ELfZE6cFsclClrKim3BHUIGq//t93DllB+h4O9LHjEUsQ1Sr63irDLSutkLJD6RXchjROXkNirlcNVHH/jwLWR5RcYilNX7S5bIkK8NlWPjsn/8Ua5O7I9/YoE97PpO6i73DTGLh5H9JN/SITwCKBkgSDWUt61uPK3Y11Gty7o2lWsBjhBUm2Y38CBsoGmBw==' >> ~/.ssh/known_hosts
  81. - go run build/ci.go debsrc -upload ethereum/ethereum -sftp-user geth-ci -signer "Go Ethereum Linux Builder <geth-ci@ethereum.org>"
  82. # This builder does the Linux Azure uploads
  83. - stage: build
  84. if: type = push
  85. os: linux
  86. dist: bionic
  87. sudo: required
  88. go: 1.18.x
  89. env:
  90. - azure-linux
  91. - GO111MODULE=on
  92. git:
  93. submodules: false # avoid cloning ethereum/tests
  94. addons:
  95. apt:
  96. packages:
  97. - gcc-multilib
  98. script:
  99. # Build for the primary platforms that Trusty can manage
  100. - go run build/ci.go install -dlgo
  101. - go run build/ci.go archive -type tar -signer LINUX_SIGNING_KEY -signify SIGNIFY_KEY -upload gethstore/builds
  102. - go run build/ci.go install -dlgo -arch 386
  103. - go run build/ci.go archive -arch 386 -type tar -signer LINUX_SIGNING_KEY -signify SIGNIFY_KEY -upload gethstore/builds
  104. # Switch over GCC to cross compilation (breaks 386, hence why do it here only)
  105. - sudo -E apt-get -yq --no-install-suggests --no-install-recommends --force-yes install gcc-arm-linux-gnueabi libc6-dev-armel-cross gcc-arm-linux-gnueabihf libc6-dev-armhf-cross gcc-aarch64-linux-gnu libc6-dev-arm64-cross
  106. - sudo ln -s /usr/include/asm-generic /usr/include/asm
  107. - GOARM=5 go run build/ci.go install -dlgo -arch arm -cc arm-linux-gnueabi-gcc
  108. - GOARM=5 go run build/ci.go archive -arch arm -type tar -signer LINUX_SIGNING_KEY -signify SIGNIFY_KEY -upload gethstore/builds
  109. - GOARM=6 go run build/ci.go install -dlgo -arch arm -cc arm-linux-gnueabi-gcc
  110. - GOARM=6 go run build/ci.go archive -arch arm -type tar -signer LINUX_SIGNING_KEY -signify SIGNIFY_KEY -upload gethstore/builds
  111. - GOARM=7 go run build/ci.go install -dlgo -arch arm -cc arm-linux-gnueabihf-gcc
  112. - GOARM=7 go run build/ci.go archive -arch arm -type tar -signer LINUX_SIGNING_KEY -signify SIGNIFY_KEY -upload gethstore/builds
  113. - go run build/ci.go install -dlgo -arch arm64 -cc aarch64-linux-gnu-gcc
  114. - go run build/ci.go archive -arch arm64 -type tar -signer LINUX_SIGNING_KEY -signify SIGNIFY_KEY -upload gethstore/builds
  115. # This builder does the Android Maven and Azure uploads
  116. - stage: build
  117. if: type = push
  118. os: linux
  119. dist: bionic
  120. addons:
  121. apt:
  122. packages:
  123. - openjdk-8-jdk
  124. env:
  125. - azure-android
  126. - maven-android
  127. - GO111MODULE=on
  128. git:
  129. submodules: false # avoid cloning ethereum/tests
  130. before_install:
  131. # Install Android and it's dependencies manually, Travis is stale
  132. - export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
  133. - curl https://dl.google.com/android/repository/commandlinetools-linux-6858069_latest.zip -o android.zip
  134. - unzip -q android.zip -d $HOME/sdk && rm android.zip
  135. - mv $HOME/sdk/cmdline-tools $HOME/sdk/latest && mkdir $HOME/sdk/cmdline-tools && mv $HOME/sdk/latest $HOME/sdk/cmdline-tools
  136. - export PATH=$PATH:$HOME/sdk/cmdline-tools/latest/bin
  137. - export ANDROID_HOME=$HOME/sdk
  138. - yes | sdkmanager --licenses >/dev/null
  139. - sdkmanager "platform-tools" "platforms;android-15" "platforms;android-19" "platforms;android-24" "ndk-bundle"
  140. # Install Go to allow building with
  141. - curl https://dl.google.com/go/go1.18.linux-amd64.tar.gz | tar -xz
  142. - export PATH=`pwd`/go/bin:$PATH
  143. - export GOROOT=`pwd`/go
  144. - export GOPATH=$HOME/go
  145. script:
  146. # Build the Android archive and upload it to Maven Central and Azure
  147. - mkdir -p $GOPATH/src/github.com/ethereum
  148. - ln -s `pwd` $GOPATH/src/github.com/ethereum/go-ethereum
  149. - go run build/ci.go aar -signer ANDROID_SIGNING_KEY -signify SIGNIFY_KEY -deploy https://oss.sonatype.org -upload gethstore/builds
  150. # This builder does the OSX Azure, iOS CocoaPods and iOS Azure uploads
  151. - stage: build
  152. if: type = push
  153. os: osx
  154. go: 1.18.x
  155. env:
  156. - azure-osx
  157. - azure-ios
  158. - cocoapods-ios
  159. - GO111MODULE=on
  160. git:
  161. submodules: false # avoid cloning ethereum/tests
  162. script:
  163. - go run build/ci.go install -dlgo
  164. - go run build/ci.go archive -type tar -signer OSX_SIGNING_KEY -signify SIGNIFY_KEY -upload gethstore/builds
  165. # Build the iOS framework and upload it to CocoaPods and Azure
  166. - gem uninstall cocoapods -a -x
  167. - gem install cocoapods
  168. - mv ~/.cocoapods/repos/master ~/.cocoapods/repos/master.bak
  169. - sed -i '.bak' 's/repo.join/!repo.join/g' $(dirname `gem which cocoapods`)/cocoapods/sources_manager.rb
  170. - if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then git clone --depth=1 https://github.com/CocoaPods/Specs.git ~/.cocoapods/repos/master && pod setup --verbose; fi
  171. - xctool -version
  172. - xcrun simctl list
  173. # Workaround for https://github.com/golang/go/issues/23749
  174. - export CGO_CFLAGS_ALLOW='-fmodules|-fblocks|-fobjc-arc'
  175. - go run build/ci.go xcode -signer IOS_SIGNING_KEY -signify SIGNIFY_KEY -deploy trunk -upload gethstore/builds
  176. # These builders run the tests
  177. - stage: build
  178. os: linux
  179. arch: amd64
  180. dist: bionic
  181. go: 1.18.x
  182. env:
  183. - GO111MODULE=on
  184. script:
  185. - go run build/ci.go test -coverage $TEST_PACKAGES
  186. - stage: build
  187. if: type = pull_request
  188. os: linux
  189. arch: arm64
  190. dist: bionic
  191. go: 1.18.x
  192. env:
  193. - GO111MODULE=on
  194. script:
  195. - go run build/ci.go test -coverage $TEST_PACKAGES
  196. - stage: build
  197. os: linux
  198. dist: bionic
  199. go: 1.17.x
  200. env:
  201. - GO111MODULE=on
  202. script:
  203. - go run build/ci.go test -coverage $TEST_PACKAGES
  204. # This builder does the Azure archive purges to avoid accumulating junk
  205. - stage: build
  206. if: type = cron
  207. os: linux
  208. dist: bionic
  209. go: 1.18.x
  210. env:
  211. - azure-purge
  212. - GO111MODULE=on
  213. git:
  214. submodules: false # avoid cloning ethereum/tests
  215. script:
  216. - go run build/ci.go purge -store gethstore/builds -days 14
  217. # This builder executes race tests
  218. - stage: build
  219. if: type = cron
  220. os: linux
  221. dist: bionic
  222. go: 1.18.x
  223. env:
  224. - GO111MODULE=on
  225. script:
  226. - go run build/ci.go test -race -coverage $TEST_PACKAGES