Skip to content

Commit ba5f41b

Browse files
committed
crosscompilation script
1 parent 363fca7 commit ba5f41b

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
# Runtime assets
99
SeraphVaults
1010
seraph
11+
bin/*
12+
!bin/.gitkeep
1113

1214
# Test binary, built with `go test -c`
1315
*.test

bin/.gitkeep

Whitespace-only changes.

crosscompile.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/sh
2+
3+
# @see https://opensource.com/article/21/1/go-cross-compiling
4+
# amd64 is compatible with x86_64
5+
archs=(amd64 arm64 ppc64le ppc64 s390x)
6+
7+
for arch in ${archs[@]}; do
8+
env GOOS=linux GOARCH=${arch} go build -o bin/seraph_${arch}
9+
done

0 commit comments

Comments
 (0)