.travis.yml 9.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272
  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.14.x
  19. env:
  20. - lint
  21. git:
  22. submodules: false # avoid cloning ethereum/tests
  23. script:
  24. - go run build/ci.go lint
  25. - stage: build
  26. os: linux
  27. dist: xenial
  28. go: 1.11.x
  29. env:
  30. - GO111MODULE=on
  31. script:
  32. - go run build/ci.go install
  33. - go run build/ci.go test -coverage $TEST_PACKAGES
  34. - stage: build
  35. os: linux
  36. dist: xenial
  37. go: 1.12.x
  38. env:
  39. - GO111MODULE=on
  40. script:
  41. - go run build/ci.go install
  42. - go run build/ci.go test -coverage $TEST_PACKAGES
  43. - stage: build
  44. os: linux
  45. dist: xenial
  46. go: 1.13.x
  47. env:
  48. - GO111MODULE=on
  49. script:
  50. - go run build/ci.go install
  51. - go run build/ci.go test -coverage $TEST_PACKAGES
  52. # These are the latest Go versions.
  53. - stage: build
  54. os: linux
  55. arch: amd64
  56. dist: xenial
  57. go: 1.14.x
  58. env:
  59. - GO111MODULE=on
  60. script:
  61. - go run build/ci.go install
  62. - go run build/ci.go test -coverage $TEST_PACKAGES
  63. - stage: build
  64. if: type = pull_request
  65. os: linux
  66. arch: arm64
  67. dist: xenial
  68. go: 1.14.x
  69. env:
  70. - GO111MODULE=on
  71. script:
  72. - go run build/ci.go install
  73. - go run build/ci.go test -coverage $TEST_PACKAGES
  74. - stage: build
  75. os: osx
  76. osx_image: xcode11.3
  77. go: 1.14.x
  78. env:
  79. - GO111MODULE=on
  80. script:
  81. - echo "Increase the maximum number of open file descriptors on macOS"
  82. - NOFILE=20480
  83. - sudo sysctl -w kern.maxfiles=$NOFILE
  84. - sudo sysctl -w kern.maxfilesperproc=$NOFILE
  85. - sudo launchctl limit maxfiles $NOFILE $NOFILE
  86. - sudo launchctl limit maxfiles
  87. - ulimit -S -n $NOFILE
  88. - ulimit -n
  89. - unset -f cd # workaround for https://github.com/travis-ci/travis-ci/issues/8703
  90. - go run build/ci.go install
  91. - go run build/ci.go test -coverage $TEST_PACKAGES
  92. # This builder does the Ubuntu PPA upload
  93. - stage: build
  94. if: type = push
  95. os: linux
  96. dist: xenial
  97. go: 1.14.x
  98. env:
  99. - ubuntu-ppa
  100. - GO111MODULE=on
  101. git:
  102. submodules: false # avoid cloning ethereum/tests
  103. addons:
  104. apt:
  105. packages:
  106. - devscripts
  107. - debhelper
  108. - dput
  109. - fakeroot
  110. - python-bzrlib
  111. - python-paramiko
  112. script:
  113. - echo '|1|7SiYPr9xl3uctzovOTj4gMwAC1M=|t6ReES75Bo/PxlOPJ6/GsGbTrM0= ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA0aKz5UTUndYgIGG7dQBV+HaeuEZJ2xPHo2DS2iSKvUL4xNMSAY4UguNW+pX56nAQmZKIZZ8MaEvSj6zMEDiq6HFfn5JcTlM80UwlnyKe8B8p7Nk06PPQLrnmQt5fh0HmEcZx+JU9TZsfCHPnX7MNz4ELfZE6cFsclClrKim3BHUIGq//t93DllB+h4O9LHjEUsQ1Sr63irDLSutkLJD6RXchjROXkNirlcNVHH/jwLWR5RcYilNX7S5bIkK8NlWPjsn/8Ua5O7I9/YoE97PpO6i73DTGLh5H9JN/SITwCKBkgSDWUt61uPK3Y11Gty7o2lWsBjhBUm2Y38CBsoGmBw==' >> ~/.ssh/known_hosts
  114. - go run build/ci.go debsrc -goversion 1.14.2 -upload ethereum/ethereum -sftp-user geth-ci -signer "Go Ethereum Linux Builder <geth-ci@ethereum.org>"
  115. # This builder does the Linux Azure uploads
  116. - stage: build
  117. if: type = push
  118. os: linux
  119. dist: xenial
  120. sudo: required
  121. go: 1.14.x
  122. env:
  123. - azure-linux
  124. - GO111MODULE=on
  125. git:
  126. submodules: false # avoid cloning ethereum/tests
  127. addons:
  128. apt:
  129. packages:
  130. - gcc-multilib
  131. script:
  132. # Build for the primary platforms that Trusty can manage
  133. - go run build/ci.go install
  134. - go run build/ci.go archive -type tar -signer LINUX_SIGNING_KEY -upload gethstore/builds
  135. - go run build/ci.go install -arch 386
  136. - go run build/ci.go archive -arch 386 -type tar -signer LINUX_SIGNING_KEY -upload gethstore/builds
  137. # Switch over GCC to cross compilation (breaks 386, hence why do it here only)
  138. - 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
  139. - sudo ln -s /usr/include/asm-generic /usr/include/asm
  140. - GOARM=5 go run build/ci.go install -arch arm -cc arm-linux-gnueabi-gcc
  141. - GOARM=5 go run build/ci.go archive -arch arm -type tar -signer LINUX_SIGNING_KEY -upload gethstore/builds
  142. - GOARM=6 go run build/ci.go install -arch arm -cc arm-linux-gnueabi-gcc
  143. - GOARM=6 go run build/ci.go archive -arch arm -type tar -signer LINUX_SIGNING_KEY -upload gethstore/builds
  144. - GOARM=7 go run build/ci.go install -arch arm -cc arm-linux-gnueabihf-gcc
  145. - GOARM=7 go run build/ci.go archive -arch arm -type tar -signer LINUX_SIGNING_KEY -upload gethstore/builds
  146. - go run build/ci.go install -arch arm64 -cc aarch64-linux-gnu-gcc
  147. - go run build/ci.go archive -arch arm64 -type tar -signer LINUX_SIGNING_KEY -upload gethstore/builds
  148. # This builder does the Linux Azure MIPS xgo uploads
  149. - stage: build
  150. if: type = push
  151. os: linux
  152. dist: xenial
  153. services:
  154. - docker
  155. go: 1.14.x
  156. env:
  157. - azure-linux-mips
  158. - GO111MODULE=on
  159. git:
  160. submodules: false # avoid cloning ethereum/tests
  161. script:
  162. - go run build/ci.go xgo --alltools -- --targets=linux/mips --ldflags '-extldflags "-static"' -v
  163. - for bin in build/bin/*-linux-mips; do mv -f "${bin}" "${bin/-linux-mips/}"; done
  164. - go run build/ci.go archive -arch mips -type tar -signer LINUX_SIGNING_KEY -upload gethstore/builds
  165. - go run build/ci.go xgo --alltools -- --targets=linux/mipsle --ldflags '-extldflags "-static"' -v
  166. - for bin in build/bin/*-linux-mipsle; do mv -f "${bin}" "${bin/-linux-mipsle/}"; done
  167. - go run build/ci.go archive -arch mipsle -type tar -signer LINUX_SIGNING_KEY -upload gethstore/builds
  168. - go run build/ci.go xgo --alltools -- --targets=linux/mips64 --ldflags '-extldflags "-static"' -v
  169. - for bin in build/bin/*-linux-mips64; do mv -f "${bin}" "${bin/-linux-mips64/}"; done
  170. - go run build/ci.go archive -arch mips64 -type tar -signer LINUX_SIGNING_KEY -upload gethstore/builds
  171. - go run build/ci.go xgo --alltools -- --targets=linux/mips64le --ldflags '-extldflags "-static"' -v
  172. - for bin in build/bin/*-linux-mips64le; do mv -f "${bin}" "${bin/-linux-mips64le/}"; done
  173. - go run build/ci.go archive -arch mips64le -type tar -signer LINUX_SIGNING_KEY -upload gethstore/builds
  174. # This builder does the Android Maven and Azure uploads
  175. - stage: build
  176. if: type = push
  177. os: linux
  178. dist: xenial
  179. addons:
  180. apt:
  181. packages:
  182. - oracle-java8-installer
  183. - oracle-java8-set-default
  184. language: android
  185. android:
  186. components:
  187. - platform-tools
  188. - tools
  189. - android-15
  190. - android-19
  191. - android-24
  192. env:
  193. - azure-android
  194. - maven-android
  195. - GO111MODULE=on
  196. git:
  197. submodules: false # avoid cloning ethereum/tests
  198. before_install:
  199. - curl https://dl.google.com/go/go1.14.2.linux-amd64.tar.gz | tar -xz
  200. - export PATH=`pwd`/go/bin:$PATH
  201. - export GOROOT=`pwd`/go
  202. - export GOPATH=$HOME/go
  203. script:
  204. # Build the Android archive and upload it to Maven Central and Azure
  205. - curl https://dl.google.com/android/repository/android-ndk-r19b-linux-x86_64.zip -o android-ndk-r19b.zip
  206. - unzip -q android-ndk-r19b.zip && rm android-ndk-r19b.zip
  207. - mv android-ndk-r19b $ANDROID_HOME/ndk-bundle
  208. - mkdir -p $GOPATH/src/github.com/ethereum
  209. - ln -s `pwd` $GOPATH/src/github.com/ethereum/go-ethereum
  210. - go run build/ci.go aar -signer ANDROID_SIGNING_KEY -deploy https://oss.sonatype.org -upload gethstore/builds
  211. # This builder does the OSX Azure, iOS CocoaPods and iOS Azure uploads
  212. - stage: build
  213. if: type = push
  214. os: osx
  215. go: 1.14.x
  216. env:
  217. - azure-osx
  218. - azure-ios
  219. - cocoapods-ios
  220. - GO111MODULE=on
  221. git:
  222. submodules: false # avoid cloning ethereum/tests
  223. script:
  224. - go run build/ci.go install
  225. - go run build/ci.go archive -type tar -signer OSX_SIGNING_KEY -upload gethstore/builds
  226. # Build the iOS framework and upload it to CocoaPods and Azure
  227. - gem uninstall cocoapods -a -x
  228. - gem install cocoapods
  229. - mv ~/.cocoapods/repos/master ~/.cocoapods/repos/master.bak
  230. - sed -i '.bak' 's/repo.join/!repo.join/g' $(dirname `gem which cocoapods`)/cocoapods/sources_manager.rb
  231. - if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then git clone --depth=1 https://github.com/CocoaPods/Specs.git ~/.cocoapods/repos/master && pod setup --verbose; fi
  232. - xctool -version
  233. - xcrun simctl list
  234. # Workaround for https://github.com/golang/go/issues/23749
  235. - export CGO_CFLAGS_ALLOW='-fmodules|-fblocks|-fobjc-arc'
  236. - go run build/ci.go xcode -signer IOS_SIGNING_KEY -deploy trunk -upload gethstore/builds
  237. # This builder does the Azure archive purges to avoid accumulating junk
  238. - stage: build
  239. if: type = cron
  240. os: linux
  241. dist: xenial
  242. go: 1.14.x
  243. env:
  244. - azure-purge
  245. - GO111MODULE=on
  246. git:
  247. submodules: false # avoid cloning ethereum/tests
  248. script:
  249. - go run build/ci.go purge -store gethstore/builds -days 14