Skip to content

Commit 4821b4e

Browse files
committed
Readd script and update for the new usecase
1 parent ed2b8e4 commit 4821b4e

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

etc/compile_check.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/usr/bin/env bash
2+
set -e # exit when any command fails
3+
set -x # show all commands being run
4+
5+
ARCHITECTURES=("386" "arm" "arm64" "ppc64le" "s390x")
6+
7+
go version
8+
9+
# Standard build
10+
go build ./...
11+
12+
# Check build with tags if specified.
13+
if [ -n "${BUILD_TAGS:-}" ]; then
14+
go build ${BUILD_TAGS} ./...
15+
fi
16+
17+
# Check build with various architectures.
18+
for ARCH in "${ARCHITECTURES[@]}"; do
19+
GOOS=linux GOARCH=$ARCH go build ./...
20+
done

0 commit comments

Comments
 (0)