Skip to content

ci: fix the aarch64 musl and macOS release builds and run them on PRs - #623

Merged
GuillaumeLagrange merged 4 commits into
mainfrom
fix-release-and-macos-build
Nov 12, 2026
Merged

GuillaumeLagrange merged 4 commits into
mainfrom
fix-release-and-macos-build

Conversation

@GuillaumeLagrange

Copy link
Copy Markdown
Contributor

Fixes the two release jobs that broke the 5.7.0 release, and makes every PR run the release build so the next such failure shows up before a release.

  • aarch64 musl failed to link: libbpf calls gcc's outline-atomic helpers (__aarch64_ldadd4_sync). The -lgcc from target.aarch64-unknown-linux-musl.rustflags is dropped because dist sets RUSTFLAGS. The musl C code is now built with -mno-outline-atomics, so nothing is needed at link time. Only 3 atomics in libbpf change, all at attach time. Linking libgcc from memtrack's build script does not work: rustc places it before libbpf.
  • macOS never started: dist 0.31.0 picks macos-14, which GitHub no longer runs. The release now builds on macos-latest, like CI. dist 0.34.0 defaults to macos-15; the override stays so a retired image cannot break a release again.
  • CI missed both: musl-build used plain cargo build. It is replaced by pr-run-mode = "upload", which runs the dist build of every target on PRs without publishing. create-draft-release is skipped on PRs.
  • cargo-dist 0.31.0 → 0.34.0: regenerated release.yml and re-applied its two hand edits. Reusable workflows are now called with the $/ self-repository syntax. The action pins in dist-workspace.toml were behind the ones dependabot set in release.yml, so regenerating would have downgraded them; they are synced, and the config now lists the hand edits to redo after a regen.

The first three commits come from #619, minus its release commit.

Refs COD-4123

adriencaccia and others added 4 commits November 12, 2026 13:39
`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>
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>
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>
Sync the action pins with the ones dependabot set in release.yml, otherwise
regenerating downgrades them, and list the hand edits to redo after a regen.

Refs COD-4123
@codspeed

codspeed Bot commented Nov 12, 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 fix-release-and-macos-build (3a2bbac) with main (21b0cda)

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 marked this pull request as ready for review November 12, 2026 13:07
@greptile-apps

greptile-apps Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

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

Summary

This PR fixes the aarch64 musl link settings and moves macOS release builds to macos-latest.

  • The ARM release builds use working compiler and runner settings.
  • Pull requests now build release artifacts without publishing them.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  PR[Pull request] --> Plan[Plan release artifacts]
  Tag[Version tag] --> Plan
  Plan --> Build[Build target artifacts]
  PR --> Skip[Skip draft release creation]
  Tag --> Draft[Create draft release]
  Build --> Gate{Publishing a tag?}
  Gate -->|No| Stop[Keep artifacts on workflow run]
  Gate -->|Yes| Publish[Publish release artifacts]
Loading

Reviews (1) · Last reviewed commit: "ci: bump cargo-dist to 0.34.0" · Reviewed by Greptile

@GuillaumeLagrange
GuillaumeLagrange merged commit 3a2bbac into main Nov 12, 2026
69 checks passed
@GuillaumeLagrange
GuillaumeLagrange deleted the fix-release-and-macos-build branch November 12, 2026 13:20
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.

3 participants