|
| 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.17.x |
| 9 | + env: |
| 10 | + - azure-osx |
| 11 | + - azure-ios |
| 12 | + - cocoapods-ios |
| 13 | + |
| 14 | + include: |
| 15 | + # This builder only tests code linters on latest version of Go |
| 16 | + - stage: lint |
| 17 | + os: linux |
| 18 | + dist: bionic |
| 19 | + go: 1.18.x |
| 20 | + env: |
| 21 | + - lint |
| 22 | + git: |
| 23 | + submodules: false # avoid cloning ethereum/tests |
| 24 | + script: |
| 25 | + - go run build/ci.go lint |
| 26 | + |
| 27 | + # These builders create the Docker sub-images for multi-arch push and each |
| 28 | + # will attempt to push the multi-arch image if they are the last builder |
| 29 | + - stage: build |
| 30 | + if: type = push |
| 31 | + os: linux |
| 32 | + arch: amd64 |
| 33 | + dist: bionic |
| 34 | + go: 1.18.x |
| 35 | + env: |
| 36 | + - docker |
| 37 | + services: |
| 38 | + - docker |
| 39 | + git: |
| 40 | + submodules: false # avoid cloning ethereum/tests |
| 41 | + before_install: |
| 42 | + - export DOCKER_CLI_EXPERIMENTAL=enabled |
| 43 | + script: |
| 44 | + - go run build/ci.go docker -image -manifest amd64,arm64 -upload ethereum/client-go |
| 45 | + |
| 46 | + - stage: build |
| 47 | + if: type = push |
| 48 | + os: linux |
| 49 | + arch: arm64 |
| 50 | + dist: bionic |
| 51 | + go: 1.18.x |
| 52 | + env: |
| 53 | + - docker |
| 54 | + services: |
| 55 | + - docker |
| 56 | + git: |
| 57 | + submodules: false # avoid cloning ethereum/tests |
| 58 | + before_install: |
| 59 | + - export DOCKER_CLI_EXPERIMENTAL=enabled |
| 60 | + script: |
| 61 | + - go run build/ci.go docker -image -manifest amd64,arm64 -upload ethereum/client-go |
| 62 | + |
| 63 | + # This builder does the Ubuntu PPA upload |
| 64 | + - stage: build |
| 65 | + if: type = push |
| 66 | + os: linux |
| 67 | + dist: bionic |
| 68 | + go: 1.18.x |
| 69 | + env: |
| 70 | + - ubuntu-ppa |
| 71 | + - GO111MODULE=on |
| 72 | + git: |
| 73 | + submodules: false # avoid cloning ethereum/tests |
| 74 | + addons: |
| 75 | + apt: |
| 76 | + packages: |
| 77 | + - devscripts |
| 78 | + - debhelper |
| 79 | + - dput |
| 80 | + - fakeroot |
| 81 | + - python-bzrlib |
| 82 | + - python-paramiko |
| 83 | + script: |
| 84 | + - echo '|1|7SiYPr9xl3uctzovOTj4gMwAC1M=|t6ReES75Bo/PxlOPJ6/GsGbTrM0= ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA0aKz5UTUndYgIGG7dQBV+HaeuEZJ2xPHo2DS2iSKvUL4xNMSAY4UguNW+pX56nAQmZKIZZ8MaEvSj6zMEDiq6HFfn5JcTlM80UwlnyKe8B8p7Nk06PPQLrnmQt5fh0HmEcZx+JU9TZsfCHPnX7MNz4ELfZE6cFsclClrKim3BHUIGq//t93DllB+h4O9LHjEUsQ1Sr63irDLSutkLJD6RXchjROXkNirlcNVHH/jwLWR5RcYilNX7S5bIkK8NlWPjsn/8Ua5O7I9/YoE97PpO6i73DTGLh5H9JN/SITwCKBkgSDWUt61uPK3Y11Gty7o2lWsBjhBUm2Y38CBsoGmBw==' >> ~/.ssh/known_hosts |
| 85 | + - go run build/ci.go debsrc -upload ethereum/ethereum -sftp-user geth-ci -signer "Go Ethereum Linux Builder <[email protected]>" |
| 86 | + |
| 87 | + # This builder does the Linux Azure uploads |
| 88 | + - stage: build |
| 89 | + if: type = push |
| 90 | + os: linux |
| 91 | + dist: bionic |
| 92 | + sudo: required |
| 93 | + go: 1.18.x |
| 94 | + env: |
| 95 | + - azure-linux |
| 96 | + - GO111MODULE=on |
| 97 | + git: |
| 98 | + submodules: false # avoid cloning ethereum/tests |
| 99 | + addons: |
| 100 | + apt: |
| 101 | + packages: |
| 102 | + - gcc-multilib |
| 103 | + script: |
| 104 | + # Build for the primary platforms that Trusty can manage |
| 105 | + - go run build/ci.go install -dlgo |
| 106 | + - go run build/ci.go archive -type tar -signer LINUX_SIGNING_KEY -signify SIGNIFY_KEY -upload gethstore/builds |
| 107 | + - go run build/ci.go install -dlgo -arch 386 |
| 108 | + - go run build/ci.go archive -arch 386 -type tar -signer LINUX_SIGNING_KEY -signify SIGNIFY_KEY -upload gethstore/builds |
| 109 | + |
| 110 | + # Switch over GCC to cross compilation (breaks 386, hence why do it here only) |
| 111 | + - 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 |
| 112 | + - sudo ln -s /usr/include/asm-generic /usr/include/asm |
| 113 | + |
| 114 | + - GOARM=5 go run build/ci.go install -dlgo -arch arm -cc arm-linux-gnueabi-gcc |
| 115 | + - GOARM=5 go run build/ci.go archive -arch arm -type tar -signer LINUX_SIGNING_KEY -signify SIGNIFY_KEY -upload gethstore/builds |
| 116 | + - GOARM=6 go run build/ci.go install -dlgo -arch arm -cc arm-linux-gnueabi-gcc |
| 117 | + - GOARM=6 go run build/ci.go archive -arch arm -type tar -signer LINUX_SIGNING_KEY -signify SIGNIFY_KEY -upload gethstore/builds |
| 118 | + - GOARM=7 go run build/ci.go install -dlgo -arch arm -cc arm-linux-gnueabihf-gcc |
| 119 | + - GOARM=7 go run build/ci.go archive -arch arm -type tar -signer LINUX_SIGNING_KEY -signify SIGNIFY_KEY -upload gethstore/builds |
| 120 | + - go run build/ci.go install -dlgo -arch arm64 -cc aarch64-linux-gnu-gcc |
| 121 | + - go run build/ci.go archive -arch arm64 -type tar -signer LINUX_SIGNING_KEY -signify SIGNIFY_KEY -upload gethstore/builds |
| 122 | + |
| 123 | + # This builder does the Android Maven and Azure uploads |
| 124 | + - stage: build |
| 125 | + if: type = push |
| 126 | + os: linux |
| 127 | + dist: bionic |
| 128 | + addons: |
| 129 | + apt: |
| 130 | + packages: |
| 131 | + - openjdk-8-jdk |
| 132 | + env: |
| 133 | + - azure-android |
| 134 | + - maven-android |
| 135 | + - GO111MODULE=on |
| 136 | + git: |
| 137 | + submodules: false # avoid cloning ethereum/tests |
| 138 | + before_install: |
| 139 | + # Install Android and it's dependencies manually, Travis is stale |
| 140 | + - export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64 |
| 141 | + - curl https://dl.google.com/android/repository/commandlinetools-linux-6858069_latest.zip -o android.zip |
| 142 | + - unzip -q android.zip -d $HOME/sdk && rm android.zip |
| 143 | + - mv $HOME/sdk/cmdline-tools $HOME/sdk/latest && mkdir $HOME/sdk/cmdline-tools && mv $HOME/sdk/latest $HOME/sdk/cmdline-tools |
| 144 | + - export PATH=$PATH:$HOME/sdk/cmdline-tools/latest/bin |
| 145 | + - export ANDROID_HOME=$HOME/sdk |
| 146 | + |
| 147 | + - yes | sdkmanager --licenses >/dev/null |
| 148 | + - sdkmanager "platform-tools" "platforms;android-15" "platforms;android-19" "platforms;android-24" "ndk-bundle" |
| 149 | + |
| 150 | + # Install Go to allow building with |
| 151 | + - curl https://dl.google.com/go/go1.18.linux-amd64.tar.gz | tar -xz |
| 152 | + - export PATH=`pwd`/go/bin:$PATH |
| 153 | + - export GOROOT=`pwd`/go |
| 154 | + - export GOPATH=$HOME/go |
| 155 | + script: |
| 156 | + # Build the Android archive and upload it to Maven Central and Azure |
| 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 -signify SIGNIFY_KEY -deploy https://oss.sonatype.org -upload gethstore/builds |
| 160 | + |
| 161 | + # This builder does the OSX Azure, iOS CocoaPods and iOS Azure uploads |
| 162 | + - stage: build |
| 163 | + if: type = push |
| 164 | + os: osx |
| 165 | + go: 1.18.x |
| 166 | + env: |
| 167 | + - azure-osx |
| 168 | + - azure-ios |
| 169 | + - cocoapods-ios |
| 170 | + - GO111MODULE=on |
| 171 | + git: |
| 172 | + submodules: false # avoid cloning ethereum/tests |
| 173 | + script: |
| 174 | + - go run build/ci.go install -dlgo |
| 175 | + - go run build/ci.go archive -type tar -signer OSX_SIGNING_KEY -signify SIGNIFY_KEY -upload gethstore/builds |
| 176 | + |
| 177 | + # Build the iOS framework and upload it to CocoaPods and Azure |
| 178 | + - gem uninstall cocoapods -a -x |
| 179 | + - gem install cocoapods |
| 180 | + |
| 181 | + - mv ~/.cocoapods/repos/master ~/.cocoapods/repos/master.bak |
| 182 | + - sed -i '.bak' 's/repo.join/!repo.join/g' $(dirname `gem which cocoapods`)/cocoapods/sources_manager.rb |
| 183 | + - if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then git clone --depth=1 https://github.com/CocoaPods/Specs.git ~/.cocoapods/repos/master && pod setup --verbose; fi |
| 184 | + |
| 185 | + - xctool -version |
| 186 | + - xcrun simctl list |
| 187 | + |
| 188 | + # Workaround for https://github.com/golang/go/issues/23749 |
| 189 | + - export CGO_CFLAGS_ALLOW='-fmodules|-fblocks|-fobjc-arc' |
| 190 | + - go run build/ci.go xcode -signer IOS_SIGNING_KEY -signify SIGNIFY_KEY -deploy trunk -upload gethstore/builds |
| 191 | + |
| 192 | + # These builders run the tests |
| 193 | + - stage: build |
| 194 | + os: linux |
| 195 | + arch: amd64 |
| 196 | + dist: bionic |
| 197 | + go: 1.18.x |
| 198 | + env: |
| 199 | + - GO111MODULE=on |
| 200 | + script: |
| 201 | + - go run build/ci.go test -coverage $TEST_PACKAGES |
| 202 | + |
| 203 | + - stage: build |
| 204 | + if: type = pull_request |
| 205 | + os: linux |
| 206 | + arch: arm64 |
| 207 | + dist: bionic |
| 208 | + go: 1.18.x |
| 209 | + env: |
| 210 | + - GO111MODULE=on |
| 211 | + script: |
| 212 | + - go run build/ci.go test -coverage $TEST_PACKAGES |
| 213 | + |
| 214 | + - stage: build |
| 215 | + os: linux |
| 216 | + dist: bionic |
| 217 | + go: 1.17.x |
| 218 | + env: |
| 219 | + - GO111MODULE=on |
| 220 | + script: |
| 221 | + - go run build/ci.go test -coverage $TEST_PACKAGES |
| 222 | + |
| 223 | + # This builder does the Azure archive purges to avoid accumulating junk |
| 224 | + - stage: build |
| 225 | + if: type = cron |
| 226 | + os: linux |
| 227 | + dist: bionic |
| 228 | + go: 1.18.x |
| 229 | + env: |
| 230 | + - azure-purge |
| 231 | + - GO111MODULE=on |
| 232 | + git: |
| 233 | + submodules: false # avoid cloning ethereum/tests |
| 234 | + script: |
| 235 | + - go run build/ci.go purge -store gethstore/builds -days 14 |
| 236 | + |
| 237 | + # This builder executes race tests |
| 238 | + - stage: build |
| 239 | + if: type = cron |
| 240 | + os: linux |
| 241 | + dist: bionic |
| 242 | + go: 1.18.x |
| 243 | + env: |
| 244 | + - GO111MODULE=on |
| 245 | + script: |
| 246 | + - go run build/ci.go test -race -coverage $TEST_PACKAGES |
| 247 | + |
0 commit comments