Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
p2p
go-reuseport
Commits
0a2ac17e
Unverified
Commit
0a2ac17e
authored
Mar 24, 2018
by
Steven Allen
Committed by
GitHub
Mar 24, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #44 from libp2p/feat/test-xbuild
test cross-platform building
parents
fd1c23f6
50190f65
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
1 deletion
+17
-1
.travis.yml
.travis.yml
+2
-1
Makefile
Makefile
+15
-0
No files found.
.travis.yml
View file @
0a2ac17e
...
...
@@ -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
:
...
...
Makefile
View file @
0a2ac17e
...
...
@@ -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)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment