sudo: false

language: go

# Versions of go that are explicitly supported by gonum.
go:
 - 1.5.4
 - 1.6.3
 - 1.7.3

# Required for coverage, and testing.
before_install:
 - go get golang.org/x/tools/cmd/cover
 - go get github.com/mattn/goveralls

# Get deps, build, test, and ensure the code is gofmt'ed.
# If we are building as gonum, then we have access to the coveralls api key, so we can run coverage as well.
script:
 - go get -d -t -v ./...
 - go build -x -v ./...
 - go test -a -x -v ./...
 - go test -a -tags bounds -x -v ./...
 - go test -a -tags noasm -x -v ./...
 - go test -a -tags appengine -x -v ./...
 - test -z "$(gofmt -d .)"
 - if [[ $TRAVIS_SECURE_ENV_VARS = "true" ]]; then bash .travis/test-coverage.sh; fi
 # This is run last since it alters the tree.
 - ${TRAVIS_BUILD_DIR}/.travis/check-generate.sh
