.travis.yml 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. language: go
  2. go_import_path: go.etcd.io/etcd
  3. sudo: required
  4. services: docker
  5. go:
  6. - 1.13.1
  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-grpcproxy
  21. - TARGET=linux-amd64-coverage
  22. - TARGET=linux-amd64-fmt-unit-go-tip
  23. - TARGET=linux-386-unit
  24. matrix:
  25. fast_finish: true
  26. allow_failures:
  27. - go: 1.13.1
  28. env: TARGET=linux-amd64-grpcproxy
  29. - go: 1.13.1
  30. env: TARGET=linux-amd64-coverage
  31. - go: tip
  32. env: TARGET=linux-amd64-fmt-unit-go-tip
  33. - go: 1.13.1
  34. env: TARGET=linux-386-unit
  35. exclude:
  36. - go: tip
  37. env: TARGET=linux-amd64-fmt
  38. - go: tip
  39. env: TARGET=linux-amd64-integration-1-cpu
  40. - go: tip
  41. env: TARGET=linux-amd64-integration-2-cpu
  42. - go: tip
  43. env: TARGET=linux-amd64-integration-4-cpu
  44. - go: tip
  45. env: TARGET=linux-amd64-functional
  46. - go: tip
  47. env: TARGET=linux-amd64-unit
  48. - go: tip
  49. env: TARGET=all-build
  50. - go: tip
  51. env: TARGET=linux-amd64-grpcproxy
  52. - go: tip
  53. env: TARGET=linux-amd64-coverage
  54. - go: 1.13.1
  55. env: TARGET=linux-amd64-fmt-unit-go-tip
  56. - go: tip
  57. env: TARGET=linux-386-unit
  58. before_install:
  59. - if [[ $TRAVIS_GO_VERSION == 1.* ]]; then docker pull gcr.io/etcd-development/etcd-test:go${TRAVIS_GO_VERSION}; fi
  60. install:
  61. - go get -t -v -d ./...
  62. script:
  63. - echo "TRAVIS_GO_VERSION=${TRAVIS_GO_VERSION}"
  64. - >
  65. case "${TARGET}" in
  66. linux-amd64-fmt)
  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='fmt bom dep' ./test"
  70. ;;
  71. linux-amd64-integration-1-cpu)
  72. docker run --rm \
  73. --volume=`pwd`:/go/src/go.etcd.io/etcd gcr.io/etcd-development/etcd-test:go${TRAVIS_GO_VERSION} \
  74. /bin/bash -c "GOARCH=amd64 CPU=1 PASSES='integration' ./test"
  75. ;;
  76. linux-amd64-integration-2-cpu)
  77. docker run --rm \
  78. --volume=`pwd`:/go/src/go.etcd.io/etcd gcr.io/etcd-development/etcd-test:go${TRAVIS_GO_VERSION} \
  79. /bin/bash -c "GOARCH=amd64 CPU=2 PASSES='integration' ./test"
  80. ;;
  81. linux-amd64-integration-4-cpu)
  82. docker run --rm \
  83. --volume=`pwd`:/go/src/go.etcd.io/etcd gcr.io/etcd-development/etcd-test:go${TRAVIS_GO_VERSION} \
  84. /bin/bash -c "GOARCH=amd64 CPU=4 PASSES='integration' ./test"
  85. ;;
  86. linux-amd64-functional)
  87. docker run --rm \
  88. --volume=`pwd`:/go/src/go.etcd.io/etcd gcr.io/etcd-development/etcd-test:go${TRAVIS_GO_VERSION} \
  89. /bin/bash -c "./build && GOARCH=amd64 PASSES='functional' ./test"
  90. ;;
  91. linux-amd64-unit)
  92. docker run --rm \
  93. --volume=`pwd`:/go/src/go.etcd.io/etcd gcr.io/etcd-development/etcd-test:go${TRAVIS_GO_VERSION} \
  94. /bin/bash -c "GOARCH=amd64 PASSES='unit' ./test"
  95. ;;
  96. all-build)
  97. docker run --rm \
  98. --volume=`pwd`:/go/src/go.etcd.io/etcd gcr.io/etcd-development/etcd-test:go${TRAVIS_GO_VERSION} \
  99. /bin/bash -c "GOARCH=amd64 PASSES='build' ./test \
  100. && GOARCH=386 PASSES='build' ./test \
  101. && GO_BUILD_FLAGS='-v' GOOS=darwin GOARCH=amd64 ./build \
  102. && GO_BUILD_FLAGS='-v' GOOS=windows GOARCH=amd64 ./build \
  103. && GO_BUILD_FLAGS='-v' GOARCH=arm ./build \
  104. && GO_BUILD_FLAGS='-v' GOARCH=arm64 ./build \
  105. && GO_BUILD_FLAGS='-v' GOARCH=ppc64le ./build"
  106. ;;
  107. linux-amd64-grpcproxy)
  108. sudo HOST_TMP_DIR=/tmp TEST_OPTS="PASSES='build grpcproxy'" make docker-test
  109. ;;
  110. linux-amd64-coverage)
  111. sudo HOST_TMP_DIR=/tmp make docker-test-coverage
  112. ;;
  113. linux-amd64-fmt-unit-go-tip)
  114. GOARCH=amd64 PASSES='fmt unit' ./test
  115. ;;
  116. linux-386-unit)
  117. docker run --rm \
  118. --volume=`pwd`:/go/src/go.etcd.io/etcd gcr.io/etcd-development/etcd-test:go${TRAVIS_GO_VERSION} \
  119. /bin/bash -c "GOARCH=386 PASSES='unit' ./test"
  120. ;;
  121. esac