blob: 87f40b83d9dd742da3b93ae79607a3001aeae50c [file] [log] [blame]
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -07001language: go
2
3matrix:
4 include:
Arjun E K57a7fcb2020-01-30 06:44:45 +00005 - go: 1.13.x
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -07006 env: VET=1 GO111MODULE=on
Arjun E K57a7fcb2020-01-30 06:44:45 +00007 - go: 1.13.x
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -07008 env: RACE=1 GO111MODULE=on
Arjun E K57a7fcb2020-01-30 06:44:45 +00009 - go: 1.13.x
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070010 env: RUN386=1
Arjun E K57a7fcb2020-01-30 06:44:45 +000011 - go: 1.13.x
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070012 env: GRPC_GO_RETRY=on
Arjun E K57a7fcb2020-01-30 06:44:45 +000013 - go: 1.13.x
David K. Bainbridgec415efe2021-08-19 13:05:21 +000014 env: TESTEXAMPLES=1
Arjun E K57a7fcb2020-01-30 06:44:45 +000015 - go: 1.12.x
16 env: GO111MODULE=on
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070017 - go: 1.11.x
18 env: GO111MODULE=on
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070019 - go: 1.9.x
20 env: GAE=1
21
22go_import_path: google.golang.org/grpc
23
24before_install:
25 - 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
Arjun E K57a7fcb2020-01-30 06:44:45 +000028 - if [[ "${TRAVIS_EVENT_TYPE}" != "cron" ]]; then export VET_SKIP_PROTO=1; fi
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070029
30install:
31 - try3() { eval "$*" || eval "$*" || eval "$*"; }
32 - try3 'if [[ "${GO111MODULE}" = "on" ]]; then go mod download; else make testdeps; fi'
Arjun E K57a7fcb2020-01-30 06:44:45 +000033 - if [[ -n "${GAE}" ]]; then source ./install_gae.sh; make testappenginedeps; fi
34 - if [[ -n "${VET}" ]]; then ./vet.sh -install; fi
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070035
36script:
37 - set -e
David K. Bainbridgec415efe2021-08-19 13:05:21 +000038 - if [[ -n "${TESTEXAMPLES}" ]]; then examples/examples_test.sh; exit 0; fi
Arjun E K57a7fcb2020-01-30 06:44:45 +000039 - if [[ -n "${VET}" ]]; then ./vet.sh; fi
40 - if [[ -n "${GAE}" ]]; then make testappengine; exit 0; fi
41 - if [[ -n "${RACE}" ]]; then make testrace; exit 0; fi
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070042 - make test