Merge pull request #98 from omribahumi/travis-cross-compilation

Added GOOS={linux,darwin,windows} to the Travis-CI build matrix
This commit is contained in:
Miek Gieben 2014-07-11 13:38:36 +01:00
commit 5c48f3623a
1 changed files with 15 additions and 1 deletions

View File

@ -3,4 +3,18 @@ go:
- 1.1
- 1.2
- 1.3
script: go test -bench=.
env:
# "gvm update" resets GOOS and GOARCH environment variable, workaround it by setting
# BUILD_GOOS and BUILD_GOARCH and overriding GOARCH and GOOS in the build script
global:
- BUILD_GOARCH=amd64
matrix:
- BUILD_GOOS=linux
- BUILD_GOOS=darwin
- BUILD_GOOS=windows
script:
- gvm cross $BUILD_GOOS $BUILD_GOARCH
- GOARCH=$BUILD_GOARCH GOOS=$BUILD_GOOS go build
# only test on linux
- if [ $BUILD_GOOS == "linux" ]; then GOARCH=$BUILD_GOARCH GOOS=$BUILD_GOOS go test -bench=.; fi