Skip to content

Commit 8bb2127

Browse files
committed
fix(ci): accept static-pie binaries in the static-link check
`file` on the Ubuntu CI runner reports our musl binary as "static-pie linked" (position-independent + statically linked) rather than "statically linked" — that's the modern default for musl + Rust 1.93 and means the binary is fully static, not dynamically linked. Our grep only accepted the older "statically linked" string, so the check rejected a perfectly-static binary. See run 25212930359 (job "Static (musl) Build", step "Confirm binary is statically linked"). Now accept either form, and add a positive check that the binary isn't "dynamically linked" (defence in depth — if `file`'s output ever changes again to some new third form, we'll catch "dynamically linked" still being absent). The binary itself is unchanged; only the verification logic moved.
1 parent 6dedc5d commit 8bb2127

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

.github/workflows/build.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,13 @@ jobs:
7777
run: |
7878
file target/x86_64-unknown-linux-musl/release/postgresql-trino-gateway \
7979
| tee /tmp/file.out
80-
grep -q "statically linked" /tmp/file.out
80+
# `file` reports a fully-static musl binary as either
81+
# "statically linked" (older builds) or "static-pie linked"
82+
# (newer Rust + musl default — position-independent AND
83+
# statically linked). Both are fine; reject only "dynamically
84+
# linked".
85+
grep -qE 'statically linked|static-pie linked' /tmp/file.out
86+
! grep -q 'dynamically linked' /tmp/file.out
8187
8288
# Single required check for branch protection rules.
8389
finished:

0 commit comments

Comments
 (0)