blob: eebcb8fc274a35820cf367ff3b79558af392645d [file] [log] [blame]
sudo: false
language: go
# Do not move these lines; they are referred to by README.md.
# Versions of go that are explicitly supported by gonum plus go tip.
go:
- 1.12.x
- 1.11.x
- 1.10.x
- master
env:
global:
- GO111MODULE=on
matrix:
- TAGS=""
- TAGS="-tags bounds"
- TAGS="-tags noasm"
- TAGS="-tags appengine"
cache:
directories:
- $HOME/.cache/go-build
- $HOME/gopath/pkg/mod
git:
depth: 1
matrix:
fast_finish: true
allow_failures:
- go: master
before_install:
# Required for format check.
- go get golang.org/x/tools/cmd/goimports
# Required for imports check.
- go get gonum.org/v1/tools/cmd/check-imports
# Required for copyright header check.
- go get gonum.org/v1/tools/cmd/check-copyright
# Required for coverage.
- go get golang.org/x/tools/cmd/cover
- go get github.com/mattn/goveralls
# Required for dot parser checks.
- ./.travis/install-gocc.sh 66c61e91b3657c517a6f89d2837d370e61fb9430
addons:
apt:
packages:
- graphviz
go_import_path: gonum.org/v1/gonum
# 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:
- ${TRAVIS_BUILD_DIR}/.travis/check-copyright.sh
- ${TRAVIS_BUILD_DIR}/.travis/check-formatting.sh
- go get -d -t -v ./...
- go build -v ./...
- go test $TAGS -v ./...
# Only run test coverage analysis if we are secure and even with origin master.
- if [[ "${TRAVIS_SECURE_ENV_VARS}" == true && "$(git ls-remote origin master | cut -f1)" == "$(git rev-parse HEAD)" ]]; then bash ./.travis/test-coverage.sh; fi
- ${TRAVIS_BUILD_DIR}/.travis/check-imports.sh
# This is run last since it alters the tree.
- ${TRAVIS_BUILD_DIR}/.travis/check-generate.sh