Unverified Commit 0a2ac17e authored by Steven Allen's avatar Steven Allen Committed by GitHub

Merge pull request #44 from libp2p/feat/test-xbuild

test cross-platform building
parents fd1c23f6 50190f65
......@@ -6,12 +6,13 @@ os:
language: go
go:
- 1.9.x
- 1.10.x
install:
- make deps
script:
- make test-xbuild
- bash <(curl -s https://raw.githubusercontent.com/ipfs/ci-helpers/master/travis-ci/run-standard-tests.sh)
cache:
......
......@@ -9,3 +9,18 @@ deps: gx
publish:
gx-go rewrite --undo
SUPPORTED_OS = windows linux darwin freebsd openbsd netbsd
SUPPORTED_ARCH = 386 arm amd64p32 arm64 amd64
XBUILD_TARGETS=$(foreach os,$(SUPPORTED_OS),$(foreach arch,$(SUPPORTED_ARCH),test-xbuild-$(os)/$(arch)))
$(XBUILD_TARGETS): PLATFORM = $(subst /, ,$(patsubst test-xbuild-%,%,$@))
$(XBUILD_TARGETS): GOOS = $(word 1,$(PLATFORM))
$(XBUILD_TARGETS): GOARCH = $(word 2,$(PLATFORM))
$(XBUILD_TARGETS):
@ if GOOS=$(GOOS) GOARCH=$(GOARCH) go version >/dev/null 2>&1 ; then \
echo "building $(GOOS)/$(GOARCH)"; \
GOOS=$(GOOS) GOARCH=$(GOARCH) go build; \
fi
test-xbuild: $(XBUILD_TARGETS)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment