Skip to content

Commit a3664cc

Browse files
wesmclaude
andcommitted
Build Linux binaries in Rocky Linux 8 container for glibc 2.28 compat
Use rockylinux:8 container on native runners (ubuntu-latest for amd64, ubuntu-24.04-arm for arm64) to produce binaries compatible with glibc 2.28+ (RHEL 8+, Debian 10+, Ubuntu 20.04+). Install Go from the official tarball since actions/setup-go doesn't work in bare containers. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 4cf9411 commit a3664cc

File tree

1 file changed

+23
-5
lines changed

1 file changed

+23
-5
lines changed

.github/workflows/release.yml

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,37 @@ jobs:
1515
include:
1616
- goarch: amd64
1717
runner: ubuntu-latest
18+
go_arch_name: amd64
1819
- goarch: arm64
1920
runner: ubuntu-24.04-arm
21+
go_arch_name: arm64
2022
runs-on: ${{ matrix.runner }}
23+
container:
24+
image: rockylinux:8
2125

2226
steps:
27+
- name: Install build tools
28+
run: |
29+
dnf install -y gcc gcc-c++ make git tar gzip file
30+
2331
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
2432

25-
- uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5
26-
with:
27-
go-version-file: go.mod
33+
- name: Install Go
34+
run: |
35+
GO_VERSION=$(grep '^go ' go.mod | awk '{print $2}')
36+
curl -fsSL "https://go.dev/dl/go${GO_VERSION}.linux-${{ matrix.go_arch_name }}.tar.gz" -o go.tar.gz
37+
tar -C /usr/local -xzf go.tar.gz
38+
rm go.tar.gz
39+
echo "/usr/local/go/bin" >> $GITHUB_PATH
40+
echo "$HOME/go/bin" >> $GITHUB_PATH
2841
2942
- name: Build
3043
env:
3144
GOOS: linux
3245
GOARCH: ${{ matrix.goarch }}
33-
CGO_ENABLED: 1
46+
CGO_ENABLED: '1'
3447
run: |
48+
export PATH="/usr/local/go/bin:$HOME/go/bin:$PATH"
3549
VERSION=${GITHUB_REF#refs/tags/v}
3650
3751
mkdir -p dist
@@ -42,7 +56,11 @@ jobs:
4256
file dist/msgvault
4357
ldd dist/msgvault || true
4458
45-
# Smoke test — both architectures build natively now
59+
# Verify glibc version requirement is reasonable
60+
echo "--- GLIBC requirement ---"
61+
objdump -T dist/msgvault 2>/dev/null | grep -oP 'GLIBC_\d+\.\d+' | sort -uV | tail -1 || true
62+
63+
# Smoke test
4664
echo "--- Smoke test ---"
4765
SMOKE_OUT=$(dist/msgvault version 2>&1)
4866
echo "$SMOKE_OUT"

0 commit comments

Comments
 (0)