perf(ci): adopt mold linker and lift CARGO_BUILD_JOBS=1 on Reborn CI - #5089
Conversation
|
Note Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported. |
|
🚅 Deployed to the ironclaw-pr-5089 environment in ironclaw-ci-preview
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughSummary by CodeRabbit
WalkthroughBoth Changesmold+clang linker adoption across reborn CI workflows
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
📈 Measured gain (post-merge)Comparing the same
Net effect:
Validation: all four Caveat: Provenance: derived from the measurement spikes in #5086 (mold proven to link the heaviest |
Summary
Adopts the PR #5086-proven mold linker setup for the real Reborn CI workflows and removes the
CARGO_BUILD_JOBS=1serial-link tax so Cargo can use its default parallelism. PR #5086 measured mold on the heaviest Reborn build (--workspace --all-targets --all-features) and proved parallel linking succeeds with no OOM, unlocking the measured ~4x build potential without the prior lld bus-error workaround.Workflow Changes
.github/workflows/reborn-tests.yml: adds global moldRUSTFLAGS, installsclangandmoldin the Rust crate-test matrix and root partition jobs, removes the workflow-level build serialization, and removes the composition crate's local build-job serialization while preserving itsCARGO_INCREMENTAL=0disk guard..github/workflows/reborn-integration.yml: adds global moldRUSTFLAGS, installsclangandmoldin the Rust crate-test matrix and root partition jobs, and removes the workflow-level build serialization.Both workflows use the proven linker flags:
-C linker=clang -C link-arg=--ld-path=/usr/bin/mold, with apt install viasudo apt-get update && sudo apt-get install -y clang mold.Verification Step
Each workflow's root partition job now verifies mold is active by checking that
clang --ld-path=/usr/bin/mold -Wl,--versionreports mold during a real clang link invocation, then compiling and running a tiny Rust binary withrustc -C linker=clang -C link-arg=--ld-path=/usr/bin/mold. This avoids the false-negative pattern of grepping successful rustc linker stdout.Fallback
If runner OOMs recur, the one-line fallback is to restore
CARGO_BUILD_JOBS=1.Local Validation
python3 -c "import yaml;[yaml.safe_load(open(f)) for f in ['.github/workflows/reborn-tests.yml','.github/workflows/reborn-integration.yml']];print('yaml ok')"->yaml ok! grep -rn CARGO_BUILD_JOBS .github/workflows/reborn-tests.yml .github/workflows/reborn-integration.ymlRUSTFLAGS, install steps, and root-job verification are present in both workflows.git diff --checkgit diff --name-onlyshowed only.github/workflows/reborn-tests.ymland.github/workflows/reborn-integration.ymlbefore commit.actionlintwas not available in this environment.Automated agent-authored change.