From acd4cd985d56395964188877fb7d4b92442aa360 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Wed, 6 May 2015 20:42:11 +0200 Subject: [PATCH] travis: Add env variable for gox cross-compilation --- .travis.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 951973aa5..e1793c187 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,5 @@ language: go + go: - 1.3.3 - 1.4.2 @@ -15,15 +16,17 @@ notifications: on_success: change on_failure: change +env: GOX_OS="linux darwin openbsd freebsd" + install: - go get github.com/mitchellh/gox - - gox -build-toolchain -os "linux darwin openbsd freebsd" + - gox -build-toolchain -os "$GOX_OS" - go get -v -t ./... script: - go build -ldflags "-s" ./... - go build -ldflags "-s" -o restic ./cmd/restic - - sh -c "cd cmd/restic && gox -verbose -os 'linux darwin openbsd freebsd' && ls -al" + - sh -c 'cd cmd/restic && gox -verbose -os "$GOX_OS" && ls -al' - go test -v ./... - ./testsuite.sh - sh -c "cd backend && go test -v -test.sftppath /usr/lib/openssh/sftp-server ./..."