diff --git a/.travis.yml b/.travis.yml index 4fac79a..848938a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,11 +6,19 @@ env: - GO111MODULE=on - GO111MODULE=off go: [ 1.11.x, 1.12.x ] -os: [ linux, osx, windows ] +os: [ linux, osx ] +matrix: + exclude: + - go: 1.12.x + env: GO111MODULE=off + - go: 1.11.x + os: osx install: + - ./travis/install.sh - if [[ "$GO111MODULE" == "on" ]]; then go mod download; fi - if [[ "$GO111MODULE" == "off" ]]; then go get github.com/stretchr/testify/assert golang.org/x/sys/unix github.com/konsorten/go-windows-terminal-sequences; fi script: + - ./travis/cross_build.sh - export GOMAXPROCS=4 - export GORACE=halt_on_error=1 - go test -race -v ./... diff --git a/travis/cross_build.sh b/travis/cross_build.sh new file mode 100755 index 0000000..7bb9449 --- /dev/null +++ b/travis/cross_build.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +if [[ "$TRAVIS_GO_VERSION" =~ ^1.\12\. ]] && [[ "$TRAVIS_OS_NAME" == "linux" ]]; then + /tmp/gox/gox -build-lib -all -os '!plan9 !nacl' +fi diff --git a/travis/install.sh b/travis/install.sh new file mode 100755 index 0000000..07f4532 --- /dev/null +++ b/travis/install.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +set -e + +if [[ "$TRAVIS_GO_VERSION" =~ ^1.\12\. ]] && [[ "$TRAVIS_OS_NAME" == "linux" ]]; then + git clone https://github.com/dgsb/gox.git /tmp/gox + pushd /tmp/gox + git checkout new_master + go build ./ + popd +fi