Skip to content

ci(hardware-artifacts): build the bundle's test binaries without whole-program LTO - #352

Merged
lunarthegrey merged 1 commit into
mainfrom
claude/hwtest-artifacts-speedup
Oct 9, 2026
Merged

lunarthegrey merged 1 commit into
mainfrom
claude/hwtest-artifacts-speedup

Conversation

@lunarthegrey

Copy link
Copy Markdown
Contributor

Summary

The hardware-artifacts test binaries job takes 9–14 min. 7 of those minutes are one cross-build, and all of that time goes to the workspace's own crates, since dependencies come from the cache. Under [profile.release], codegen-units = 1 plus thin LTO turns each of the ~50 test binaries into its own single-threaded whole-program link.

  • New hwtest profile for the bundle's test binaries. It inherits release but drops cross-crate LTO and goes back to the default codegen units. On a router these binaries measure BPF programs (bpf_prog_test_run reports kernel time) and correctness, and the userspace build profile doesn't affect either.
  • Some binaries stay on release. The packetframe CLI does, so the .deb packages the same build as before. So does vpp_convergence_bench, because its 1.05M-route programming time is a userspace measurement that decisions rest on. Staging takes that bench from the release build (RELEASE_TESTS).
  • Cache key includes the root Cargo.toml. An exact key hit never saves the cache. Without this, a key that outlives a profile change would rebuild the new profile's dependencies on every run.
  • Fixed the cargo-deb version check. 2.7.0 prints the bare version, so awk '{print $2}' came out empty and the cached copy was reinstalled every run. That cost 45 s here and in release.yml's gnu legs. It now uses $NF.

Test plan

  • One cross-package invocation, --bins -p packetframe-cli --test vpp_convergence_bench -p packetframe-vpp-offload, selects exactly the CLI bin and the bench (checked locally with cargo's JSON output)
  • Cargo accepts --profile hwtest
  • Staging script run against synthetic two-profile JSON: the CLI and vpp_convergence_bench are taken from release, everything else from hwtest, and packetframe-unittests keeps its suffix
  • cargo-deb 2.7.0 --version prints 2.7.0, checked in a container
  • actionlint finds nothing new in either workflow
  • This PR's hardware-artifacts run (the workflow file changed, so its path filter runs it): job time and bundle contents

🤖 Generated with Claude Code

…e-program LTO

The test-binaries job spent 7 of its 9-14 minutes in one cross-build, all
of it on the workspace's own crates (dependencies come from the cache):
under [profile.release], codegen-units = 1 and thin LTO made each of ~50
test binaries its own single-threaded whole-program link. What those
binaries measure on a router is BPF (bpf_prog_test_run reports kernel
time) and correctness, which the userspace profile does not move.

So they build on a new `hwtest` profile: release optimisation, default
codegen units, no cross-crate LTO. What ships or times userspace stays on
`release`: the CLI that the .deb packages, and vpp_convergence_bench,
whose 1.05M-route programming time is a number decisions rest on.
Staging takes that bench from the release build.

The hwtest cache key now includes the root Cargo.toml: an exact key hit
never saves, so a key that outlives a profile change would rebuild the
new profile's dependencies on every run.

Also: the cargo-deb version check compared `awk '{print $2}'` with
2.7.0, but 2.7.0 prints the bare version, so the cached binary was
reinstalled on every run (45 s here, and in release.yml's gnu legs).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-09T08:49:04.684733Z 70387ae PR opened
🔒 Security Review ✅ Completed 2026-10-09T08:47:00.381943Z 70387ae PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@lunarthegrey
lunarthegrey merged commit 13d7fb6 into main Oct 9, 2026
17 checks passed
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