.travis.yml 9.1 KB

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