.travis.yml 9.1 KB

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