blob: 5847d94e5512d7c51ba4ac879f521b8631024bab [file] [log] [blame]
iamqizhao5d3ee6a2015-02-26 18:30:54 -08001language: go
2
dfawley47d85912017-08-29 16:29:31 -07003matrix:
4 include:
Doug Fawley27096e82020-04-10 16:01:05 -07005 - go: 1.14.x
dfawleyba4eb682018-09-04 15:10:01 -07006 env: VET=1 GO111MODULE=on
Doug Fawley27096e82020-04-10 16:01:05 -07007 - go: 1.14.x
dfawleyba4eb682018-09-04 15:10:01 -07008 env: RACE=1 GO111MODULE=on
Doug Fawley27096e82020-04-10 16:01:05 -07009 - go: 1.14.x
Menghan Li59dd9b32018-08-27 13:31:20 -070010 env: RUN386=1
Doug Fawley27096e82020-04-10 16:01:05 -070011 - go: 1.14.x
Menghan Li59dd9b32018-08-27 13:31:20 -070012 env: GRPC_GO_RETRY=on
Doug Fawley27096e82020-04-10 16:01:05 -070013 - go: 1.14.x
Doug Fawley895b36d2019-12-04 15:55:45 -080014 env: TESTEXTRAS=1
Doug Fawley27096e82020-04-10 16:01:05 -070015 - go: 1.13.x
Doug Fawley1950dc92019-09-27 09:48:01 -070016 env: GO111MODULE=on
Doug Fawley27096e82020-04-10 16:01:05 -070017 - go: 1.12.x
Doug Fawley73e56792019-06-04 11:19:23 -070018 env: GO111MODULE=on
Doug Fawley8bec2f52020-07-31 11:00:10 -070019 - go: 1.11.x # Keep until interop tests no longer require Go1.11
20 env: GO111MODULE=on
Tamir Duberstein8ab0d242016-07-26 15:25:04 -040021
22go_import_path: google.golang.org/grpc
Chris Broadfoot785723e2016-03-24 13:48:16 -070023
iamqizhao4af0b512015-09-25 14:30:24 -070024before_install:
dfawleyba4eb682018-09-04 15:10:01 -070025 - if [[ "${GO111MODULE}" = "on" ]]; then mkdir "${HOME}/go"; export GOPATH="${HOME}/go"; fi
26 - if [[ -n "${RUN386}" ]]; then export GOARCH=386; fi
27 - if [[ "${TRAVIS_EVENT_TYPE}" = "cron" && -z "${RUN386}" ]]; then RACE=1; fi
Menghan Li4b071052020-04-29 09:40:14 -070028 - if [[ "${TRAVIS_EVENT_TYPE}" != "cron" ]]; then export VET_SKIP_PROTO=1; fi
dfawleyf3361fd2018-07-06 11:09:40 -070029
30install:
Doug Fawleydc3d58f2018-10-11 13:07:48 -070031 - try3() { eval "$*" || eval "$*" || eval "$*"; }
32 - try3 'if [[ "${GO111MODULE}" = "on" ]]; then go mod download; else make testdeps; fi'
Garrett Gutierrez35afeb62020-08-27 11:04:57 -070033 - if [[ -n "${GAE}" ]]; then source ./install_gae.sh; make testappenginedeps; fi
Menghan Li6c487742019-11-05 10:34:44 -080034 - if [[ -n "${VET}" ]]; then ./vet.sh -install; fi
iamqizhao773bcae2015-10-02 11:09:57 -070035
iamqizhao5d3ee6a2015-02-26 18:30:54 -080036script:
dfawleyf3361fd2018-07-06 11:09:40 -070037 - set -e
ZhenLian829af012020-10-27 09:58:31 -070038 - if [[ -n "${TESTEXTRAS}" ]]; then examples/examples_test.sh; security/advancedtls/examples/examples_test.sh; interop/interop_test.sh; make testsubmodule; exit 0; fi
Menghan Li6c487742019-11-05 10:34:44 -080039 - if [[ -n "${VET}" ]]; then ./vet.sh; fi
Garrett Gutierrez35afeb62020-08-27 11:04:57 -070040 - if [[ -n "${GAE}" ]]; then make testappengine; exit 0; fi
Menghan Li6c487742019-11-05 10:34:44 -080041 - if [[ -n "${RACE}" ]]; then make testrace; exit 0; fi
dfawleyf3361fd2018-07-06 11:09:40 -070042 - make test