Parallelize background CI tasks with wait steps - #15511
Closed
reaperhulk wants to merge 1 commit into
Closed
Conversation
The coverage install sits on the critical path ahead of the artifact download, which it has nothing to do with, and steps otherwise execute in sequence. Mark it `background: true` and `wait:` for it once the download is done. Measured, the install and the download now occupy the same two second window and the wait costs nothing, taking the job from 20s to 17s. A background step that fails is reported at the wait, so a broken install still fails the job. The alls-green check moves to the end of the job because of an awkward interaction: a `wait:` step does not accept an `if:` (the workflow fails to parse with "Unexpected value 'if'"), so the wait cannot carry `always()` and has to sit in a prefix of steps that nothing failing can skip. Every step in this job already ran under `always()`, so the check's position was not gating anything - it only sets the job's conclusion. It keeps `always()` in its new position so a coverage failure doesn't skip it and lose the report of which needed job failed. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GFG654D9KD6rxzQ6R453qm
reaperhulk
force-pushed
the
claude/ci-parallelization-msr605
branch
from
August 24, 2026 12:39
02e0d89 to
66a1269
Compare
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.
Optimize CI workflow performance by running long-running installation tasks in the background and waiting for them to complete only when needed.
Summary
This change refactors the GitHub Actions CI workflows to parallelize independent setup tasks. Instead of running
llvm-toolsandnoxinstallations sequentially, they now run in the background while other tasks (cache restoration, vector downloads, OpenSSL setup) proceed in parallel. Wait steps are strategically placed to ensure dependencies are satisfied before they're needed.Key Changes
llvm-toolsandnoxinstallations to background tasks that overlap with cache/vector operations, with wait steps before bindgen install and nox environment creationnoxinstallation to background, running before cache restore and vector download, with wait step before nox environment creationnoxinstallation to background with the same pattern as FIPS jobllvm-toolsandnoxinstallations to background tasks that overlap with cache/vector/artifact operations, with a combined wait step before the buildcoverageinstallation to background so it overlaps with the alls-green check, with wait step before combining coverage dataImplementation Details
background: trueand given uniqueidvalues for referencewaitfield to reference background task IDscreate pip cache dirstep in FIPS and Alpine jobs is moved before the background nox install to ensure the cache directory exists before pip runshttps://claude.ai/code/session_01GFG654D9KD6rxzQ6R453qm