.travis.yml 8.9 KB

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