1
1
mirror of https://github.com/walles/moar.git synced 2024-08-16 07:20:31 +03:00

Add Linux/arm32 builds

Fixes #122

Or actually works around rather than fixes. The fix would be to have
moar packaged for Debian.
This commit is contained in:
Johan Walles 2023-02-22 19:48:31 +01:00
parent 742a6ac7e3
commit ce49d99a9a
3 changed files with 10 additions and 4 deletions

View File

@ -8,12 +8,12 @@ fi
VERSION="$(git describe --tags --dirty --always)"
BINARY="moar"
if [ -n "$GOOS$GOARCH" ]; then
if [ -n "${GOOS}${GOARCH}" ]; then
EXE=""
if [ "$GOOS" = "windows" ]; then
if [ "${GOOS}" = "windows" ]; then
EXE=".exe"
fi
BINARY="releases/$BINARY-$VERSION-$GOOS-$GOARCH$EXE"
BINARY="releases/${BINARY}-${VERSION}-${GOOS}-${GOARCH}${EXE}"
fi
# Linker flags version number trick below from here:
@ -25,4 +25,4 @@ fi
# This line must be last in the script so that its return code
# propagates properly to its caller
go build -ldflags="-s -w -X main.versionString=$VERSION" -o "$BINARY"
go build -ldflags="-s -w -X main.versionString=${VERSION}" -o "${BINARY}"

View File

@ -48,6 +48,7 @@ git tag --annotate "${VERSION}"
#
# NOTE: Make sure this list matches the one in test.sh
GOOS=linux GOARCH=386 ./build.sh
GOOS=linux GOARCH=arm ./build.sh # Ref: https://github.com/walles/moar/issues/122
GOOS=darwin GOARCH=amd64 ./build.sh
GOOS=windows GOARCH=amd64 ./build.sh

View File

@ -26,6 +26,11 @@ go test -timeout 20s ./...
echo "Testing cross compilation..."
echo " Linux i386..."
GOOS=linux GOARCH=386 ./build.sh
# Ref: https://github.com/walles/moar/issues/122
echo " Linux ARM32..."
GOOS=linux GOARCH=arm ./build.sh
echo " macOS amd64..."
GOOS=darwin GOARCH=amd64 ./build.sh
echo " Windows amd64..."