mirror of https://github.com/sirupsen/logrus.git
add full cross compilation in travis (#963)
* add full cross compilation in travis * reduce the travis build matrix * disable cross build for plan9 and nacl
This commit is contained in:
parent
f0375eb5b5
commit
f2849a8fb2
10
.travis.yml
10
.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 ./...
|
||||
|
|
|
@ -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
|
|
@ -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
|
Loading…
Reference in New Issue