blob: 7adf5b0239ab3fa1e03f910820eab70a66e615c0 [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.13.x
- 1.12.x
- master
os:
- linux
- osx
- windows
env:
global:
- GO111MODULE=on
- GOFLAGS="-mod=readonly"
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
exclude:
- os: osx
env: TAGS="-tags bounds"
- os: osx
env: TAGS="-tags noasm"
- os: osx
env: TAGS="-tags appengine"
- os: osx
go: master
- os: windows
env: TAGS="-tags bounds"
- os: windows
env: TAGS="-tags noasm"
- os: windows
env: TAGS="-tags appengine"
- os: windows
go: master
allow_failures:
- go: master
before_install:
# Make sure we have the origin master to compare HEADs and
# save the sha for comparison in test-coverage.sh.
# It is necessary to do this here since the rigmarole for
# Windows loses the link to the real origin master.
- git fetch --depth=1 origin master
- export ORIGIN_MASTER=$(git ls-remote origin master | cut -f1)
# This garbage is necessary because on windows, Travis
# helpfully sets core.autocrlf to true.
#
# The block here repeats the clone after having unset
# core.autcrlf. There is no simple way to do this
# conditionally on OS because windows will not allow
# a file to be removed or moved while the file is open,
# and we use constructed paths to scripts to get
# conditional execution.
#
# Happy windowsing!
- pushd ../../..
- mv gonum.org/v1/gonum .
- git config --global core.autocrlf false
- git clone gonum gonum.org/v1/gonum
- popd
- ${TRAVIS_BUILD_DIR}/.travis/run-parts ${TRAVIS_BUILD_DIR}/.travis/deps.d/${TRAVIS_OS_NAME}
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/run-parts ${TRAVIS_BUILD_DIR}/.travis/run.d/${TRAVIS_OS_NAME}