ci: scope-aware build matrix#1206
Conversation
🧾 Changes by Scope
🔝 Top Files
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #1206 +/- ##
========================================
Coverage 82.12% 82.12%
========================================
Files 33 33
Lines 3149 3149
Branches 734 734
========================================
Hits 2586 2586
Misses 387 387
Partials 176 176
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6af4ad2d2e
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
An automated preview of the documentation is available at https://1206.mrdocs.prtest2.cppalliance.org/index.html If more commits are pushed to the pull request, the docs will rebuild at the same URL. 2026-05-16 05:38:43 UTC |
Cuts CI time on PRs that don't touch the build inputs, and splits the monolithic
ci-releases.ymlso docs work is scope-gated and publication runs once.A new
scope-detectorreusable workflow classifies the changed files into the same scope buckets Danger uses (util/danger/logic.ts) and probes thedevelop-releaseGitHub Release plus thecoverage-developartifact for warmth. It derives amatrix-selectorvalue (full,releases-and-coverage,releases,coverage, ornone) thatci.ymluses to dispatchci-build.ymlinto the right cpp-matrix submatrix. Pushes to develop/master/tags, a[full ci]body marker, and afull-cilabel all force the full matrix.When both caches are warm and no code-affecting file changed,
ci-buildis skipped entirely. The per-OSReleaseandDocumentationjobs then pull packages fromdevelop-releaseinstead of from a fresh build, so the required status checks still reflect a real install and run of the binary.Changes
codeChangeScopes,scopesTouched(), andisCodeChange()(51 total).ci-scope-detector.ymlreusable workflow with twelve outputs:is-code-change,is-docs-change,is-push,force-full,release-cache-warm,coverage-cache-warm,run-full-matrix,run-release-build,run-coverage-build,run-documentation,matrix-selector,merge-base-sha,scopes-json.ci-matrix.ymladdscoverageandreleases-and-coveragesubmatrices alongside the existingreleases.ci.ymlwires the detector, dispatchesbuildinto the selected (sub)matrix, and adds the new per-OSRelease/Documentationjobs plus a singlePublishjob. Thereleaseanddocumentationjobs useif: always()so a skippedbuilddoesn't block them on no-code PRs.ci-build.ymluploads the produced LCOV as acoverage-developartifact (90-day retention) on develop pushes only. The strict coverage probe checks for this artifact by name and merge-base SHA.ci-utility-tests.ymlreplays that LCOV to codecov on PRs that skipped the Coverage matrix entry, tagged with the PR's commit SHA, socodecov/patchandcodecov/projectpost statuses without rebuilding.ci-releases.ymlinto three workflows:ci-release.yml: per-OS smoke and third-party demo generation. Always required.ci-documentation.yml: per-OS docs, website, and Antora UI render. Scope-gated on source, docs, build, and third-party.ci-publish.yml: single Linux runner, push to develop/master/tags only. Renders the multi-ref Antora site, publishes to GitHub Pages and the dev-websites rsync target, and creates one consolidated GitHub Release with all three platform packages.ci-release.ymlandci-documentation.ymlaccept ause-develop-binariesinput that switches the package source fromactions/download-artifacttogh release download develop-release.util/danger/detect-scopes.tsCLI (stdin to JSON) andnpm run danger:detect-scopesscript.Testing
npm --prefix util/danger testpasses 51/51 locally.src/lib/foo.cpp + docs/index.adocreturnsis_code_change: true;docs/index.adoc + README.adocreturnsis_code_change: false.coverage-developartifact exists. Until then every PR is coverage-cold and rebuilds the Coverage entry for real, which is the documented fallback.workflow_run.head_sha == merge_base(PR, develop), so a PR built on a develop SHA that's behind the latest pushed develop falls back to a fresh Coverage build.Branch protection
Required status check names change with the split:
Releases / Linux,Releases / Windows,Releases / macOS(plural, from the old monolithic workflow).Release / Linux,Release / Windows,Release / macOS(singular, fromci-release.yml).The
codecov/patchandcodecov/projectchecks are unchanged.Documentation
No user-facing changes; this PR only touches CI. The
util/danger/README.mdalready documents the scope buckets the detector reuses. Theutil/danger/detect-scopes.tsscript header explains the stdin/JSON contract for anyone wiring it up elsewhere.