.travis.yml 2.3 KB

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