.travis.yml 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. language: go
  2. go_import_path: github.com/coreos/etcd
  3. sudo: required
  4. services: docker
  5. go:
  6. - 1.9.2
  7. - tip
  8. notifications:
  9. on_success: never
  10. on_failure: never
  11. env:
  12. matrix:
  13. - TARGET=amd64
  14. - TARGET=amd64-go-tip
  15. - TARGET=darwin-amd64
  16. - TARGET=windows-amd64
  17. - TARGET=arm64
  18. - TARGET=arm
  19. - TARGET=386
  20. - TARGET=ppc64le
  21. matrix:
  22. fast_finish: true
  23. allow_failures:
  24. - go: tip
  25. env: TARGET=amd64-go-tip
  26. exclude:
  27. - go: 1.9.2
  28. env: TARGET=amd64-go-tip
  29. - go: tip
  30. env: TARGET=amd64
  31. - go: tip
  32. env: TARGET=darwin-amd64
  33. - go: tip
  34. env: TARGET=windows-amd64
  35. - go: tip
  36. env: TARGET=arm
  37. - go: tip
  38. env: TARGET=arm64
  39. - go: tip
  40. env: TARGET=386
  41. - go: tip
  42. env: TARGET=ppc64le
  43. before_install:
  44. - docker pull gcr.io/etcd-development/etcd-test:go1.9.2
  45. install:
  46. - pushd cmd/etcd && go get -t -v ./... && popd
  47. script:
  48. - >
  49. case "${TARGET}" in
  50. amd64)
  51. docker run --rm \
  52. --volume=`pwd`:/go/src/github.com/coreos/etcd gcr.io/etcd-development/etcd-test:go1.9.2 \
  53. /bin/bash -c "GOARCH=amd64 ./test"
  54. ;;
  55. amd64-go-tip)
  56. GOARCH=amd64 ./test
  57. ;;
  58. darwin-amd64)
  59. docker run --rm \
  60. --volume=`pwd`:/go/src/github.com/coreos/etcd gcr.io/etcd-development/etcd-test:go1.9.2 \
  61. /bin/bash -c "GO_BUILD_FLAGS='-a -v' GOOS=darwin GOARCH=amd64 ./build"
  62. ;;
  63. windows-amd64)
  64. docker run --rm \
  65. --volume=`pwd`:/go/src/github.com/coreos/etcd gcr.io/etcd-development/etcd-test:go1.9.2 \
  66. /bin/bash -c "GO_BUILD_FLAGS='-a -v' GOOS=windows GOARCH=amd64 ./build"
  67. ;;
  68. 386)
  69. docker run --rm \
  70. --volume=`pwd`:/go/src/github.com/coreos/etcd gcr.io/etcd-development/etcd-test:go1.9.2 \
  71. /bin/bash -c "GOARCH=386 PASSES='build unit' ./test"
  72. ;;
  73. *)
  74. # test building out of gopath
  75. docker run --rm \
  76. --volume=`pwd`:/go/src/github.com/coreos/etcd gcr.io/etcd-development/etcd-test:go1.9.2 \
  77. /bin/bash -c "GO_BUILD_FLAGS='-a -v' GOARCH='${TARGET}' ./build"
  78. ;;
  79. esac