Repository navigation
ci(hardware-artifacts): build the bundle's test binaries without whole-program LTO - #352
Merged
Merged
Conversation
…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>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The hardware-artifacts
test binariesjob 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 = 1plus thin LTO turns each of the ~50 test binaries into its own single-threaded whole-program link.hwtestprofile for the bundle's test binaries. It inheritsreleasebut drops cross-crate LTO and goes back to the default codegen units. On a router these binaries measure BPF programs (bpf_prog_test_runreports kernel time) and correctness, and the userspace build profile doesn't affect either.release. ThepacketframeCLI does, so the .deb packages the same build as before. So doesvpp_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).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.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
--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)--profile hwtestvpp_convergence_benchare taken from release, everything else from hwtest, andpacketframe-unittestskeeps its suffix--versionprints2.7.0, checked in a container🤖 Generated with Claude Code