.travis.yml 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230
  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.14.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: xenial
  18. go: 1.15.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: xenial
  30. go: 1.15.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: xenial
  53. sudo: required
  54. go: 1.15.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: xenial
  86. services:
  87. - docker
  88. go: 1.15.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: xenial
  112. addons:
  113. apt:
  114. packages:
  115. - oracle-java8-installer
  116. - oracle-java8-set-default
  117. language: android
  118. android:
  119. components:
  120. - platform-tools
  121. - tools
  122. - android-15
  123. - android-19
  124. - android-24
  125. env:
  126. - azure-android
  127. - maven-android
  128. - GO111MODULE=on
  129. git:
  130. submodules: false # avoid cloning ethereum/tests
  131. before_install:
  132. - curl https://dl.google.com/go/go1.15.5.linux-amd64.tar.gz | tar -xz
  133. - export PATH=`pwd`/go/bin:$PATH
  134. - export GOROOT=`pwd`/go
  135. - export GOPATH=$HOME/go
  136. script:
  137. # Build the Android archive and upload it to Maven Central and Azure
  138. - curl https://dl.google.com/android/repository/android-ndk-r19b-linux-x86_64.zip -o android-ndk-r19b.zip
  139. - unzip -q android-ndk-r19b.zip && rm android-ndk-r19b.zip
  140. - mv android-ndk-r19b $ANDROID_HOME/ndk-bundle
  141. - mkdir -p $GOPATH/src/github.com/ethereum
  142. - ln -s `pwd` $GOPATH/src/github.com/ethereum/go-ethereum
  143. - go run build/ci.go aar -signer ANDROID_SIGNING_KEY -signify SIGNIFY_KEY -deploy https://oss.sonatype.org -upload gethstore/builds
  144. # This builder does the OSX Azure, iOS CocoaPods and iOS Azure uploads
  145. - stage: build
  146. if: type = push
  147. os: osx
  148. go: 1.15.x
  149. env:
  150. - azure-osx
  151. - azure-ios
  152. - cocoapods-ios
  153. - GO111MODULE=on
  154. git:
  155. submodules: false # avoid cloning ethereum/tests
  156. script:
  157. - go run build/ci.go install -dlgo
  158. - go run build/ci.go archive -type tar -signer OSX_SIGNING_KEY -signify SIGNIFY_KEY -upload gethstore/builds
  159. # Build the iOS framework and upload it to CocoaPods and Azure
  160. - gem uninstall cocoapods -a -x
  161. - gem install cocoapods
  162. - mv ~/.cocoapods/repos/master ~/.cocoapods/repos/master.bak
  163. - sed -i '.bak' 's/repo.join/!repo.join/g' $(dirname `gem which cocoapods`)/cocoapods/sources_manager.rb
  164. - if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then git clone --depth=1 https://github.com/CocoaPods/Specs.git ~/.cocoapods/repos/master && pod setup --verbose; fi
  165. - xctool -version
  166. - xcrun simctl list
  167. # Workaround for https://github.com/golang/go/issues/23749
  168. - export CGO_CFLAGS_ALLOW='-fmodules|-fblocks|-fobjc-arc'
  169. - go run build/ci.go xcode -signer IOS_SIGNING_KEY -signify SIGNIFY_KEY -deploy trunk -upload gethstore/builds
  170. # These builders run the tests
  171. - stage: build
  172. os: linux
  173. arch: amd64
  174. dist: xenial
  175. go: 1.15.x
  176. env:
  177. - GO111MODULE=on
  178. script:
  179. - go run build/ci.go test -coverage $TEST_PACKAGES
  180. - stage: build
  181. if: type = pull_request
  182. os: linux
  183. arch: arm64
  184. dist: xenial
  185. go: 1.15.x
  186. env:
  187. - GO111MODULE=on
  188. script:
  189. - go run build/ci.go test -coverage $TEST_PACKAGES
  190. - stage: build
  191. os: linux
  192. dist: xenial
  193. go: 1.14.x
  194. env:
  195. - GO111MODULE=on
  196. script:
  197. - go run build/ci.go test -coverage $TEST_PACKAGES
  198. # This builder does the Azure archive purges to avoid accumulating junk
  199. - stage: build
  200. if: type = cron
  201. os: linux
  202. dist: xenial
  203. go: 1.15.x
  204. env:
  205. - azure-purge
  206. - GO111MODULE=on
  207. git:
  208. submodules: false # avoid cloning ethereum/tests
  209. script:
  210. - go run build/ci.go purge -store gethstore/builds -days 14