.travis.yml 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. language: go
  2. go_import_path: go.etcd.io/etcd
  3. sudo: required
  4. services: docker
  5. go:
  6. - 1.12.9
  7. notifications:
  8. on_success: never
  9. on_failure: never
  10. env:
  11. matrix:
  12. - TARGET=linux-amd64-fmt
  13. - TARGET=linux-amd64-integration-1-cpu
  14. - TARGET=linux-amd64-integration-2-cpu
  15. - TARGET=linux-amd64-integration-4-cpu
  16. - TARGET=linux-amd64-functional
  17. - TARGET=linux-amd64-unit
  18. - TARGET=all-build
  19. - TARGET=linux-amd64-grpcproxy
  20. - TARGET=linux-386-unit
  21. matrix:
  22. fast_finish: true
  23. allow_failures:
  24. - go: 1.12.9
  25. env: TARGET=linux-amd64-grpcproxy
  26. - go: 1.12.9
  27. env: TARGET=linux-386-unit
  28. before_install:
  29. - if [[ $TRAVIS_GO_VERSION == 1.* ]]; then docker pull gcr.io/etcd-development/etcd-test:go${TRAVIS_GO_VERSION}; fi
  30. install:
  31. - go get -t -v -d ./...
  32. script:
  33. - echo "TRAVIS_GO_VERSION=${TRAVIS_GO_VERSION}"
  34. - >
  35. case "${TARGET}" in
  36. linux-amd64-fmt)
  37. docker run --rm \
  38. --volume=`pwd`:/go/src/go.etcd.io/etcd gcr.io/etcd-development/etcd-test:go${TRAVIS_GO_VERSION} \
  39. /bin/bash -c "GOARCH=amd64 PASSES='fmt bom dep' ./test"
  40. ;;
  41. linux-amd64-integration-1-cpu)
  42. docker run --rm \
  43. --volume=`pwd`:/go/src/go.etcd.io/etcd gcr.io/etcd-development/etcd-test:go${TRAVIS_GO_VERSION} \
  44. /bin/bash -c "GOARCH=amd64 CPU=1 PASSES='integration' ./test"
  45. ;;
  46. linux-amd64-integration-2-cpu)
  47. docker run --rm \
  48. --volume=`pwd`:/go/src/go.etcd.io/etcd gcr.io/etcd-development/etcd-test:go${TRAVIS_GO_VERSION} \
  49. /bin/bash -c "GOARCH=amd64 CPU=2 PASSES='integration' ./test"
  50. ;;
  51. linux-amd64-integration-4-cpu)
  52. docker run --rm \
  53. --volume=`pwd`:/go/src/go.etcd.io/etcd gcr.io/etcd-development/etcd-test:go${TRAVIS_GO_VERSION} \
  54. /bin/bash -c "GOARCH=amd64 CPU=4 PASSES='integration' ./test"
  55. ;;
  56. linux-amd64-functional)
  57. docker run --rm \
  58. --volume=`pwd`:/go/src/go.etcd.io/etcd gcr.io/etcd-development/etcd-test:go${TRAVIS_GO_VERSION} \
  59. /bin/bash -c "./build && GOARCH=amd64 PASSES='functional' ./test"
  60. ;;
  61. linux-amd64-unit)
  62. docker run --rm \
  63. --volume=`pwd`:/go/src/go.etcd.io/etcd gcr.io/etcd-development/etcd-test:go${TRAVIS_GO_VERSION} \
  64. /bin/bash -c "GOARCH=amd64 PASSES='unit' ./test"
  65. ;;
  66. all-build)
  67. docker run --rm \
  68. --volume=`pwd`:/go/src/go.etcd.io/etcd gcr.io/etcd-development/etcd-test:go${TRAVIS_GO_VERSION} \
  69. /bin/bash -c "GOARCH=amd64 PASSES='build' ./test \
  70. && GOARCH=386 PASSES='build' ./test \
  71. && GO_BUILD_FLAGS='-v' GOOS=darwin GOARCH=amd64 ./build \
  72. && GO_BUILD_FLAGS='-v' GOOS=windows GOARCH=amd64 ./build \
  73. && GO_BUILD_FLAGS='-v' GOARCH=arm ./build \
  74. && GO_BUILD_FLAGS='-v' GOARCH=arm64 ./build \
  75. && GO_BUILD_FLAGS='-v' GOARCH=ppc64le ./build"
  76. ;;
  77. linux-amd64-grpcproxy)
  78. sudo HOST_TMP_DIR=/tmp TEST_OPTS="PASSES='build grpcproxy'" make docker-test
  79. ;;
  80. linux-386-unit)
  81. docker run --rm \
  82. --volume=`pwd`:/go/src/go.etcd.io/etcd gcr.io/etcd-development/etcd-test:go${TRAVIS_GO_VERSION} \
  83. /bin/bash -c "GOARCH=386 PASSES='unit' ./test"
  84. ;;
  85. esac