Skip to content

ci(release): measure static linkage on dry runs instead of inferring it#80

Merged
bashandbone merged 2 commits into
mainfrom
ci/verify-static-linkage
Jul 26, 2026
Merged

ci(release): measure static linkage on dry runs instead of inferring it#80
bashandbone merged 2 commits into
mainfrom
ci/verify-static-linkage

Conversation

@bashandbone

Copy link
Copy Markdown
Owner

Why

The musl targets added in #79 exist so submod ships a fully static Linux binary. But dry-run builds the archive and then discards it, so that property was only ever argued — from curl-sys/openssl-sys build-script logic — never observed. The last dispatch confirmed vendored OpenSSL compiled and that rustls/aws-lc appear nowhere in the build, but said nothing about the final binary's linkage.

What

Two workflow_dispatch-only steps on the build job:

  • Verify Linux binary linkage — extracts the archive and runs file. For musl targets it asserts the binary is static and fails the job otherwise; for glibc targets it just reports, since dynamic linking is expected there.
  • Upload dry-run archive for inspection — keeps the archive as an artifact for 7 days, so a human can check by hand.

Both gated on workflow_dispatch, so a v* tag release is unchanged.

One detail worth flagging

Rust links musl targets as static-pie by default, which file reports as static-pie linked, not statically linked. A naive grep "statically linked" would have failed on a correctly-static binary. The check accepts both forms and rejects anything dynamic.

🤖 Generated with Claude Code

https://claude.ai/code/session_01XocU6NjgZricrRWMLyLXDn

The musl targets exist so submod ships a fully static Linux binary, but a
dry run built the archive and discarded it, so that property was only ever
argued from curl-sys/openssl-sys build-script logic — never observed.

Adds two workflow_dispatch-only steps to the build job: one that extracts
the archive and asserts musl binaries are static (accepting both
"statically linked" and the "static-pie linked" form Rust actually produces
for musl, and failing loudly on anything dynamic), and one that keeps the
archive as an artifact for 7 days so it can be inspected by hand.

Both are gated on workflow_dispatch, so a v* tag release is unchanged.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XocU6NjgZricrRWMLyLXDn
@codecov

codecov Bot commented Jul 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@bashandbone
bashandbone merged commit f751eea into main Jul 26, 2026
8 checks passed
@bashandbone
bashandbone deleted the ci/verify-static-linkage branch July 26, 2026 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant