.travis.yml 7.9 KB

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