.travis.yml 8.5 KB

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