Skip to content

Commit

Permalink
Build ARM binaries.
Browse files Browse the repository at this point in the history
For my personal use.
  • Loading branch information
skx committed Feb 22, 2019
1 parent c705889 commit 9676024
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .travis/build-all
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ D=$(pwd)
#
# We build on multiple platforms/archs
#
BUILD_PLATFORMS="linux windows darwin freebsd"
BUILD_PLATFORMS="linux windows darwin freebsd arm64"
BUILD_ARCHS="amd64 386"

# For each platform
Expand Down Expand Up @@ -44,6 +44,14 @@ for OS in ${BUILD_PLATFORMS[@]}; do
export GOOS=${OS}
export CGO_ENABLED=0

# hack for ARM
if [ "${GOOS}" = "arm64" ]; then
export GOOS=""
export GOARCH=arm64
export GOARM=7
SUFFIX="arm64"
fi

# Build the main-binary
go build -ldflags "-X main.version=$(git describe --tags 2>/dev/null || echo 'master')" -o "${BASE}-${SUFFIX}"

Expand Down

0 comments on commit 9676024

Please sign in to comment.