From c7ae6d7ab3520a36f6674b2ba21e125c12114c42 Mon Sep 17 00:00:00 2001 From: Omri Bahumi Date: Fri, 11 Jul 2014 12:59:29 +0300 Subject: [PATCH] Added GOOS={linux,darwin,windows} to the Travis-CI build matrix --- .travis.yml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index a00415dd..2cda4fc3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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