language: go
sudo: required

go:
  - 1.9.x
  - 1.10.x
  - 1.11.x
  - tip

go_import_path: github.com/containerd/continuity

env:
# NOTE: we cannot set GOOS directly (because gimme overrides the value)
  - TRAVIS_GOOS=windows
  - TRAVIS_GOOS=linux
  - TRAVIS_GOOS=darwin

install:
  - go get -u github.com/vbatts/git-validation
  - go get -u github.com/kunalkushwaha/ltag
  - go get -u github.com/LK4D4/vndr

before_script:
  - pushd ..; git clone https://github.com/containerd/project; popd

script:
  - export GOOS=${TRAVIS_GOOS}
  - DCO_VERBOSITY=-q ../project/script/validate/dco
  - ../project/script/validate/fileheader ../project/
  - ../project/script/validate/vendor
  - make build binaries
  - if [ "$GOOS" = "linux" ]; then make vet test; fi
  - if [ "$GOOS" != "linux" ]; then make test-compile; fi
