.travis.yml 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  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-build
  14. - TARGET=linux-amd64-unit
  15. - TARGET=linux-amd64-fmt
  16. - TARGET=linux-amd64-integration-1-cpu
  17. - TARGET=linux-amd64-integration-2-cpu
  18. - TARGET=linux-amd64-integration-4-cpu
  19. - TARGET=linux-amd64-functional
  20. - TARGET=linux-386-build
  21. - TARGET=linux-386-unit
  22. - TARGET=darwin-amd64-build
  23. - TARGET=windows-amd64-build
  24. - TARGET=linux-arm-build
  25. - TARGET=linux-arm64-build
  26. - TARGET=linux-ppc64le-build
  27. - TARGET=linux-amd64-fmt-unit-go-tip
  28. matrix:
  29. fast_finish: true
  30. allow_failures:
  31. - go: tip
  32. env: TARGET=linux-amd64-fmt-unit-go-tip
  33. exclude:
  34. - go: tip
  35. env: TARGET=linux-amd64-build
  36. - go: tip
  37. env: TARGET=linux-amd64-unit
  38. - go: tip
  39. env: TARGET=linux-amd64-fmt
  40. - go: tip
  41. env: TARGET=linux-amd64-integration-1-cpu
  42. - go: tip
  43. env: TARGET=linux-amd64-integration-2-cpu
  44. - go: tip
  45. env: TARGET=linux-amd64-integration-4-cpu
  46. - go: tip
  47. env: TARGET=linux-amd64-functional
  48. - go: tip
  49. env: TARGET=linux-386-build
  50. - go: tip
  51. env: TARGET=linux-386-unit
  52. - go: tip
  53. env: TARGET=darwin-amd64-build
  54. - go: tip
  55. env: TARGET=windows-amd64-build
  56. - go: tip
  57. env: TARGET=linux-arm-build
  58. - go: tip
  59. env: TARGET=linux-arm64-build
  60. - go: tip
  61. env: TARGET=linux-ppc64le-build
  62. - go: 1.10.3
  63. env: TARGET=linux-amd64-fmt-unit-go-tip
  64. before_install:
  65. - if [[ $TRAVIS_GO_VERSION == 1.* ]]; then docker pull gcr.io/etcd-development/etcd-test:go${TRAVIS_GO_VERSION}; fi
  66. install:
  67. - go get -t -d ./...
  68. script:
  69. - echo "TRAVIS_GO_VERSION=${TRAVIS_GO_VERSION}"
  70. - >
  71. case "${TARGET}" in
  72. linux-amd64-build)
  73. docker run --rm \
  74. --volume=`pwd`:/go/src/github.com/coreos/etcd gcr.io/etcd-development/etcd-test:go${TRAVIS_GO_VERSION} \
  75. /bin/bash -c "GOARCH=amd64 PASSES='build' ./test"
  76. ;;
  77. linux-amd64-unit)
  78. docker run --rm \
  79. --volume=`pwd`:/go/src/github.com/coreos/etcd gcr.io/etcd-development/etcd-test:go${TRAVIS_GO_VERSION} \
  80. /bin/bash -c "GOARCH=amd64 PASSES='unit' ./test"
  81. ;;
  82. linux-amd64-fmt)
  83. docker run --rm \
  84. --volume=`pwd`:/go/src/github.com/coreos/etcd gcr.io/etcd-development/etcd-test:go${TRAVIS_GO_VERSION} \
  85. /bin/bash -c "GOARCH=amd64 PASSES='fmt bom dep' ./test"
  86. ;;
  87. linux-amd64-integration-1-cpu)
  88. docker run --rm \
  89. --volume=`pwd`:/go/src/github.com/coreos/etcd gcr.io/etcd-development/etcd-test:go${TRAVIS_GO_VERSION} \
  90. /bin/bash -c "GOARCH=amd64 CPU=1 PASSES='integration' ./test"
  91. ;;
  92. linux-amd64-integration-2-cpu)
  93. docker run --rm \
  94. --volume=`pwd`:/go/src/github.com/coreos/etcd gcr.io/etcd-development/etcd-test:go${TRAVIS_GO_VERSION} \
  95. /bin/bash -c "GOARCH=amd64 CPU=2 PASSES='integration' ./test"
  96. ;;
  97. linux-amd64-integration-4-cpu)
  98. docker run --rm \
  99. --volume=`pwd`:/go/src/github.com/coreos/etcd gcr.io/etcd-development/etcd-test:go${TRAVIS_GO_VERSION} \
  100. /bin/bash -c "GOARCH=amd64 CPU=4 PASSES='integration' ./test"
  101. ;;
  102. linux-amd64-functional)
  103. docker run --rm \
  104. --volume=`pwd`:/go/src/github.com/coreos/etcd gcr.io/etcd-development/etcd-test:go${TRAVIS_GO_VERSION} \
  105. /bin/bash -c "./build && GOARCH=amd64 PASSES='functional' ./test"
  106. ;;
  107. linux-386-build)
  108. docker run --rm \
  109. --volume=`pwd`:/go/src/github.com/coreos/etcd gcr.io/etcd-development/etcd-test:go${TRAVIS_GO_VERSION} \
  110. /bin/bash -c "GOARCH=386 PASSES='build' ./test"
  111. ;;
  112. linux-386-unit)
  113. docker run --rm \
  114. --volume=`pwd`:/go/src/github.com/coreos/etcd gcr.io/etcd-development/etcd-test:go${TRAVIS_GO_VERSION} \
  115. /bin/bash -c "GOARCH=386 PASSES='unit' ./test"
  116. ;;
  117. darwin-amd64-build)
  118. docker run --rm \
  119. --volume=`pwd`:/go/src/github.com/coreos/etcd gcr.io/etcd-development/etcd-test:go${TRAVIS_GO_VERSION} \
  120. /bin/bash -c "GO_BUILD_FLAGS='-v' GOOS=darwin GOARCH=amd64 ./build"
  121. ;;
  122. windows-amd64-build)
  123. docker run --rm \
  124. --volume=`pwd`:/go/src/github.com/coreos/etcd gcr.io/etcd-development/etcd-test:go${TRAVIS_GO_VERSION} \
  125. /bin/bash -c "GO_BUILD_FLAGS='-v' GOOS=windows GOARCH=amd64 ./build"
  126. ;;
  127. linux-arm-build)
  128. docker run --rm \
  129. --volume=`pwd`:/go/src/github.com/coreos/etcd gcr.io/etcd-development/etcd-test:go${TRAVIS_GO_VERSION} \
  130. /bin/bash -c "GO_BUILD_FLAGS='-v' GOARCH=arm ./build"
  131. ;;
  132. linux-arm64-build)
  133. docker run --rm \
  134. --volume=`pwd`:/go/src/github.com/coreos/etcd gcr.io/etcd-development/etcd-test:go${TRAVIS_GO_VERSION} \
  135. /bin/bash -c "GO_BUILD_FLAGS='-v' GOARCH=arm64 ./build"
  136. ;;
  137. linux-ppc64le-build)
  138. docker run --rm \
  139. --volume=`pwd`:/go/src/github.com/coreos/etcd gcr.io/etcd-development/etcd-test:go${TRAVIS_GO_VERSION} \
  140. /bin/bash -c "GO_BUILD_FLAGS='-v' GOARCH=ppc64le ./build"
  141. ;;
  142. linux-amd64-fmt-unit-go-tip)
  143. GOARCH=amd64 PASSES='fmt unit' ./test
  144. ;;
  145. esac