1sudo: false
2language: go
3go:
4- 1.6.x
5- 1.10.x
6- 1.x
7
8install:
9  - go get -v -d -t github.com/golang/protobuf/...
10  - curl -L https://github.com/google/protobuf/releases/download/v3.5.1/protoc-3.5.1-linux-x86_64.zip -o /tmp/protoc.zip
11  - unzip /tmp/protoc.zip -d "$HOME"/protoc
12  - mkdir -p "$HOME"/src && ln -s "$HOME"/protoc "$HOME"/src/protobuf
13
14env:
15  - PATH=$HOME/protoc/bin:$PATH
16
17script:
18  - make all
19  - make regenerate
20  # TODO(tamird): When https://github.com/travis-ci/gimme/pull/130 is
21  # released, make this look for "1.x".
22  - if [[ "$TRAVIS_GO_VERSION" == 1.10* ]]; then
23      if [[ "$(git status --porcelain 2>&1)" != "" ]]; then
24        git status >&2;
25        git diff -a >&2;
26        exit 1;
27      fi;
28      echo "git status is clean.";
29    fi;
30  - make test
31