.travis.yml 3.7 KB

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