Skip to content

Commit

Permalink
tools/cross-compile: Make all builds explicitly fully static (disable…
Browse files Browse the repository at this point in the history
… CGO)

Due to this the "Linux 64 fully static" has been marked deprecated
and is only kept for compatibility with:
https://github.com/benweissmann/getmic.ro/blob/f90870e948afab8be9ec40884050044b59ed5b7c/index.sh#L197-L204
  • Loading branch information
JoeKar committed Sep 11, 2024
1 parent 8c52d24 commit 3b296b1
Showing 1 changed file with 16 additions and 15 deletions.
31 changes: 16 additions & 15 deletions tools/cross-compile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,73 +37,74 @@ create_artefact_windows()

# Mac
echo "OSX 64"
GOOS=darwin GOARCH=amd64 make build
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 make build
create_artefact_generic "osx"

# Mac ARM64
echo "MacOS ARM64"
GOOS=darwin GOARCH=arm64 make build
CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 make build
create_artefact_generic "macos-arm64"

# Linux
echo "Linux 64"
GOOS=linux GOARCH=amd64 make build
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 make build
if ./tools/package-deb.sh $VERSION; then
sha256sum micro-$VERSION-amd64.deb > micro-$VERSION-amd64.deb.sha
mv micro-$VERSION-amd64.* binaries
fi
create_artefact_generic "linux64"

echo "Linux 64 fully static"
echo "Linux 64 fully static (deprecated)"
# Only kept for https://github.com/benweissmann/getmic.ro/blob/f90870e948afab8be9ec40884050044b59ed5b7c/index.sh#L197-L204
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 make build
create_artefact_generic "linux64-static"

echo "Linux 32"
GOOS=linux GOARCH=386 make build
CGO_ENABLED=0 GOOS=linux GOARCH=386 make build
create_artefact_generic "linux32"

echo "Linux ARM 32"
GOOS=linux GOARM=6 GOARCH=arm make build
CGO_ENABLED=0 GOOS=linux GOARM=6 GOARCH=arm make build
create_artefact_generic "linux-arm"

echo "Linux ARM 64"
GOOS=linux GOARCH=arm64 make build
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 make build
create_artefact_generic "linux-arm64"

# NetBSD
echo "NetBSD 64"
GOOS=netbsd GOARCH=amd64 make build
CGO_ENABLED=0 GOOS=netbsd GOARCH=amd64 make build
create_artefact_generic "netbsd64"

echo "NetBSD 32"
GOOS=netbsd GOARCH=386 make build
CGO_ENABLED=0 GOOS=netbsd GOARCH=386 make build
create_artefact_generic "netbsd32"

# OpenBSD
echo "OpenBSD 64"
GOOS=openbsd GOARCH=amd64 make build
CGO_ENABLED=0 GOOS=openbsd GOARCH=amd64 make build
create_artefact_generic "openbsd64"

echo "OpenBSD 32"
GOOS=openbsd GOARCH=386 make build
CGO_ENABLED=0 GOOS=openbsd GOARCH=386 make build
create_artefact_generic "openbsd32"

# FreeBSD
echo "FreeBSD 64"
GOOS=freebsd GOARCH=amd64 make build
CGO_ENABLED=0 GOOS=freebsd GOARCH=amd64 make build
create_artefact_generic "freebsd64"

echo "FreeBSD 32"
GOOS=freebsd GOARCH=386 make build
CGO_ENABLED=0 GOOS=freebsd GOARCH=386 make build
create_artefact_generic "freebsd32"

# Windows
echo "Windows 64"
GOOS=windows GOARCH=amd64 make build
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 make build
create_artefact_windows "win64"

echo "Windows 32"
GOOS=windows GOARCH=386 make build
CGO_ENABLED=0 GOOS=windows GOARCH=386 make build
create_artefact_windows "win32"

rm -rf micro-$VERSION

0 comments on commit 3b296b1

Please sign in to comment.