travis: Add env variable for gox cross-compilation

This commit is contained in:
Alexander Neumann 2015-05-06 20:42:11 +02:00
parent 4262f68d45
commit acd4cd985d

View file

@ -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 ./..."