Skip to content

ci: run the release build on PRs and fix its aarch64 and macOS jobs - #619

Open
adriencaccia wants to merge 3 commits into
mainfrom
cod-4123-release-valgrind-codspeed-and-runner
Open

adriencaccia wants to merge 3 commits into
mainfrom
cod-4123-release-valgrind-codspeed-and-runner

Conversation

@adriencaccia

@adriencaccia adriencaccia commented Nov 9, 2026 •

Copy link
Copy Markdown
Member

The v5.7.0 Release workflow failed on two targets that PR CI never built the release way. aarch64-unknown-linux-musl failed to link with undefined reference to __aarch64_ldadd4_sync (job): dist sets RUSTFLAGS for musl targets, which makes cargo ignore the -lgcc in target.aarch64-unknown-linux-musl.rustflags, while musl-build's plain cargo build kept it. aarch64-apple-darwin never started, since GitHub no longer runs the macos-14 runner dist 0.31.0 picks.

PRs now run the release build itself in place of musl-build (pr-run-mode = "upload": artifacts stay on the workflow run, only a tag push publishes). The vendored C code is compiled with -mno-outline-atomics, so the link needs nothing from libgcc; it only changes three attach-time atomics in libbpf, as the ring buffer read path uses plain acquire/release loads. The macOS build runs on macos-latest, as CI does.

Before Now
PR check cargo build of the musl targets (musl-build) dist build of all 3 release targets
aarch64 musl release fails: __aarch64_ldadd4_sync undefined links
macOS release cancelled: macos-14 not supported builds on macos-latest

The CI commit alone reproduces the aarch64 failure on this PR (job). With all three commits every target builds (run), and the aarch64 binary is static and runs codspeed --version in Alpine arm64.

Refs COD-4123

@greptile-apps

greptile-apps Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable issues were found.

Summary

Replaces explicit libgcc linking with -mno-outline-atomics for AArch64 musl C builds.

  • Aarch64 musl C code inlines atomics before linking.

Reviews (1) · Last reviewed commit: "build: inline aarch64 atomics in musl C ..." · Reviewed by Greptile

@codspeed

codspeed Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

Merging this PR will not alter performance

2 warnings

⚠️ Walltime results may be unreliable

Some benchmarks used the Walltime instrument outside CodSpeed Macro Runners, which can make the results inconsistent.

Learn more about Macro Runners

See affected benchmarks

⚠️ 8 benchmarks are dominated by system calls

System calls cannot be simulated consistently and are left out of the measure. The reported value understates the real cost. Switch to the Walltime instrument to measure them.

Learn more about system calls

See affected benchmarks

✅ 53 untouched benchmarks
⏩ 6 skipped benchmarks1


Comparing cod-4123-release-valgrind-codspeed-and-runner (c9e6764) with main (34b48f1)

Open in CodSpeed

Footnotes

  1. 6 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

@GuillaumeLagrange GuillaumeLagrange left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, @not-matthias FYI in case we ever need to troubleshoot this

`pr-run-mode = "upload"` makes dist build every release artifact on pull
requests and attach it to the workflow run; publishing still needs a tag
push. The draft release job, the one custom job dist also runs on pull
requests in this mode, skips them.

This replaces `musl-build`, which built the musl targets with plain
`cargo build` and so kept the `-lgcc` from
`target.aarch64-unknown-linux-musl.rustflags`. dist sets `RUSTFLAGS`, which
makes cargo ignore that table: the 5.7.0 aarch64 musl release failed to link
while `musl-build` passed.

Refs COD-4123
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@adriencaccia
adriencaccia force-pushed the cod-4123-release-valgrind-codspeed-and-runner branch from df1e3ad to dac1f13 Compare November 9, 2026 22:21
The v5.7.0 release failed to link codspeed for aarch64-unknown-linux-musl:
dist sets `RUSTFLAGS` for musl targets, which replaces the `-lgcc` from
`target.aarch64-unknown-linux-musl.rustflags`, so libbpf's calls to gcc's
outline-atomic helpers (`__aarch64_ldadd4_sync`) stayed unresolved.

Compile the C code with `-mno-outline-atomics` instead, so the atomics are
inlined and nothing is needed at link time, whatever `RUSTFLAGS` holds.

Refs COD-4123
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@adriencaccia
adriencaccia force-pushed the cod-4123-release-valgrind-codspeed-and-runner branch from 673134d to b2e2f52 Compare November 9, 2026 23:06
GitHub no longer runs macos-14 jobs ("The configuration
'macos-14-arm64-us-default' is not supported"), and dist 0.31.0 picks it for
aarch64-apple-darwin, so the v5.7.0 macOS build was cancelled before it
started. Use macos-latest, as CI does.

Refs COD-4123
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@adriencaccia adriencaccia changed the title build: inline aarch64 atomics in musl C code instead of linking libgcc ci: run the release build on PRs and fix its aarch64 and macOS jobs Nov 9, 2026
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.

2 participants