Skip to content

Commit cbfb277

Browse files
jaredLundeclaude
andcommitted
ci(release): pin beyond-queue glibc to 2.39 via cargo-zigbuild
The release-api workflow built the binary with native `cargo build`, linking the runner's glibc unpinned. When the runner's glibc exceeds the noble (24.04) floor of 2.39, the resulting binary fails to boot on the target host. Build via cargo-zigbuild against the `*-linux-gnu.2.39` targets so the glibc symbol versioning ceiling is pinned to 2.39 regardless of the runner's system glibc. Keep glibc (not musl): beyond-queue does internal DNS lookups to postgres, and musl's resolver is unreliable for that. - mise.toml: add `zig` + `cargo:cargo-zigbuild` tools. - release-api.yml: add matrix `zigtarget` (x86_64/aarch64 .2.39) and base `target` for the output dir; build with `cargo zigbuild --target <zigtarget> -p beyond-queue`; package from target/<target>/release. Tag, asset name, and gh-release unchanged. Verified locally: `cargo zigbuild --release --target x86_64-unknown-linux-gnu.2.39 -p beyond-queue` builds; max required symbol is GLIBC_2.38 (under the 2.39 ceiling). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 733dfd8 commit cbfb277

2 files changed

Lines changed: 13 additions & 2 deletions

File tree

.github/workflows/release-api.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,12 @@ jobs:
1515
include:
1616
- os: ubuntu-latest
1717
arch: amd64
18+
target: x86_64-unknown-linux-gnu
19+
zigtarget: x86_64-unknown-linux-gnu.2.39
1820
- os: ubuntu-24.04-arm
1921
arch: arm64
22+
target: aarch64-unknown-linux-gnu
23+
zigtarget: aarch64-unknown-linux-gnu.2.39
2024
runs-on: ${{ matrix.os }}
2125
steps:
2226
- uses: actions/checkout@v7
@@ -26,13 +30,16 @@ jobs:
2630
run: sudo apt-get install -y libreadline-dev uuid-dev
2731
- uses: jdx/mise-action@v4
2832
- uses: Swatinem/rust-cache@v2
33+
# Pin glibc 2.39 via cargo-zigbuild so the binary boots on noble (24.04)
34+
# and never links a newer glibc symbol from the runner. Pure-Rust crate,
35+
# but we keep glibc (not musl) for a reliable internal-DNS resolver.
2936
- name: build
30-
run: cargo build --release --bin beyond-queue
37+
run: cargo zigbuild --release --target ${{ matrix.zigtarget }} -p beyond-queue
3138
- name: package
3239
run: |
3340
VERSION=${GITHUB_REF_NAME#api-v}
3441
tar -czf beyond-queue-v${VERSION}-linux-${{ matrix.arch }}.tar.gz \
35-
-C target/release beyond-queue
42+
-C target/${{ matrix.target }}/release beyond-queue
3643
- uses: actions/upload-artifact@v7
3744
with:
3845
name: binary-${{ matrix.arch }}

mise.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ yamlfmt = "latest"
88
cargo-binstall = "latest"
99
"cargo:sqlx-cli" = "latest"
1010
"cargo:cross" = "latest"
11+
# Release binaries are built with cargo-zigbuild pinned to glibc 2.39 (the
12+
# noble/24.04 floor) so the runner's newer glibc never leaks into the link.
13+
zig = "latest"
14+
"cargo:cargo-zigbuild" = "latest"
1115
node = "lts"
1216
postgres = "18"
1317

0 commit comments

Comments
 (0)