2014-06-13 01:42:31 +08:00
language : go
2014-07-16 08:42:12 +08:00
go : 1.3
2014-06-13 01:42:31 +08:00
2014-07-01 06:47:02 +08:00
# let us have pretty experimental Docker-based Travis workers
sudo : false
env :
- TRAVIS_GLOBAL_WTF=1
2014-07-22 00:13:44 +08:00
- _GOOS=linux _GOARCH=amd64 CGO_ENABLED=1
- _GOOS=linux _GOARCH=amd64 CGO_ENABLED=0
# - _GOOS=linux _GOARCH=386 CGO_ENABLED=1 # TODO add this once Travis can handle it (https://github.com/travis-ci/travis-ci/issues/2207#issuecomment-49625061)
- _GOOS=linux _GOARCH=386 CGO_ENABLED=0
2014-07-22 13:44:36 +08:00
- _GOOS=linux _GOARCH=arm CGO_ENABLED=0
2014-07-01 06:47:02 +08:00
2014-06-13 01:42:31 +08:00
install :
2014-07-16 08:42:12 +08:00
- mkdir -pv "${GOPATH%%:*}/src/github.com/docker" && [ -d "${GOPATH%%:*}/src/github.com/docker/libcontainer" ] || ln -sv "$(readlink -f .)" "${GOPATH%%:*}/src/github.com/docker/libcontainer"
- if [ -z "$TRAVIS_GLOBAL_WTF" ]; then
gvm cross "$_GOOS" "$_GOARCH";
export GOOS="$_GOOS" GOARCH="$_GOARCH";
fi
- if [ -z "$TRAVIS_GLOBAL_WTF" ]; then go env; fi
2014-07-01 06:47:02 +08:00
- go get -d -v ./...
2014-07-16 08:42:12 +08:00
- if [ "$TRAVIS_GLOBAL_WTF" ]; then
export DOCKER_PATH="${GOPATH%%:*}/src/github.com/dotcloud/docker";
mkdir -p "$DOCKER_PATH/hack/make";
( cd "$DOCKER_PATH/hack/make" && wget -c 'https://raw.githubusercontent.com/dotcloud/docker/master/hack/make/'{.validate,validate-dco,validate-gofmt} );
sed -i 's!dotcloud/docker!docker/libcontainer!' "$DOCKER_PATH/hack/make/.validate";
fi
2014-06-13 01:42:31 +08:00
script :
2014-07-01 06:47:02 +08:00
- if [ "$TRAVIS_GLOBAL_WTF" ]; then bash "$DOCKER_PATH/hack/make/validate-dco"; fi
- if [ "$TRAVIS_GLOBAL_WTF" ]; then bash "$DOCKER_PATH/hack/make/validate-gofmt"; fi
2014-07-11 01:38:56 +08:00
- if [ -z "$TRAVIS_GLOBAL_WTF" ]; then go build -v ./...; fi
2014-07-22 13:44:36 +08:00
- if [ -z "$TRAVIS_GLOBAL_WTF" -a "$GOARCH" != 'arm' ]; then go test -v ./...; fi