khenaidoo | ffe076b | 2019-01-15 16:08:08 -0500 | [diff] [blame^] | 1 | language: go |
| 2 | go_import_path: github.com/coreos/etcd |
| 3 | |
| 4 | sudo: required |
| 5 | |
| 6 | services: docker |
| 7 | |
| 8 | go: |
| 9 | - 1.10.7 |
| 10 | |
| 11 | notifications: |
| 12 | on_success: never |
| 13 | on_failure: never |
| 14 | |
| 15 | env: |
| 16 | matrix: |
| 17 | - TARGET=linux-amd64-integration |
| 18 | - TARGET=linux-amd64-functional |
| 19 | - TARGET=linux-amd64-unit |
| 20 | - TARGET=all-build |
| 21 | - TARGET=linux-386-unit |
| 22 | |
| 23 | matrix: |
| 24 | fast_finish: true |
| 25 | allow_failures: |
| 26 | - go: 1.10.7 |
| 27 | env: TARGET=linux-386-unit |
| 28 | exclude: |
| 29 | - go: tip |
| 30 | env: TARGET=linux-386-unit |
| 31 | |
| 32 | before_install: |
| 33 | - if [[ $TRAVIS_GO_VERSION == 1.* ]]; then docker pull gcr.io/etcd-development/etcd-test:go${TRAVIS_GO_VERSION}; fi |
| 34 | |
| 35 | install: |
| 36 | - pushd cmd/etcd && go get -t -v ./... && popd |
| 37 | |
| 38 | script: |
| 39 | - echo "TRAVIS_GO_VERSION=${TRAVIS_GO_VERSION}" |
| 40 | - > |
| 41 | case "${TARGET}" in |
| 42 | linux-amd64-integration) |
| 43 | docker run --rm \ |
| 44 | --volume=`pwd`:/go/src/github.com/coreos/etcd gcr.io/etcd-development/etcd-test:go${TRAVIS_GO_VERSION} \ |
| 45 | /bin/bash -c "GOARCH=amd64 PASSES='integration' ./test" |
| 46 | ;; |
| 47 | linux-amd64-functional) |
| 48 | docker run --rm \ |
| 49 | --volume=`pwd`:/go/src/github.com/coreos/etcd gcr.io/etcd-development/etcd-test:go${TRAVIS_GO_VERSION} \ |
| 50 | /bin/bash -c "./build && GOARCH=amd64 PASSES='functional' ./test" |
| 51 | ;; |
| 52 | linux-amd64-unit) |
| 53 | docker run --rm \ |
| 54 | --volume=`pwd`:/go/src/github.com/coreos/etcd gcr.io/etcd-development/etcd-test:go${TRAVIS_GO_VERSION} \ |
| 55 | /bin/bash -c "GOARCH=amd64 PASSES='unit' ./test" |
| 56 | ;; |
| 57 | all-build) |
| 58 | docker run --rm \ |
| 59 | --volume=`pwd`:/go/src/github.com/coreos/etcd gcr.io/etcd-development/etcd-test:go${TRAVIS_GO_VERSION} \ |
| 60 | /bin/bash -c "GOARCH=amd64 PASSES='build' ./test \ |
| 61 | && GOARCH=386 PASSES='build' ./test \ |
| 62 | && GO_BUILD_FLAGS='-v' GOOS=darwin GOARCH=amd64 ./build \ |
| 63 | && GO_BUILD_FLAGS='-v' GOOS=windows GOARCH=amd64 ./build \ |
| 64 | && GO_BUILD_FLAGS='-v' GOARCH=arm ./build \ |
| 65 | && GO_BUILD_FLAGS='-v' GOARCH=arm64 ./build \ |
| 66 | && GO_BUILD_FLAGS='-v' GOARCH=ppc64le ./build" |
| 67 | ;; |
| 68 | linux-386-unit) |
| 69 | docker run --rm \ |
| 70 | --volume=`pwd`:/go/src/github.com/coreos/etcd gcr.io/etcd-development/etcd-test:go${TRAVIS_GO_VERSION} \ |
| 71 | /bin/bash -c "GOARCH=386 PASSES='unit' ./test" |
| 72 | ;; |
| 73 | esac |