ci: add a coverage-only dispatch mode #3690

Merged
lambirou merged 1 commit from upstream-pr/3690 into main 2026-12-02 02:14:04 +00:00
lambirou commented 2026-12-01 01:50:49 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by lambirou on 2026-12-01T01:50:49Z.


The coverage dashboard is only republished by a full main run, so refreshing it after a coverage change waits for the whole debug suite and the /O2 job. A workflow_dispatch run can now set coverage_only: true:

  • build-and-test builds the dev preset and runs only the tests that write form_coverage records: cpu_*, pixel_aot_*, compute_store_aot_* and mesh_entry_aot_*, with the hardware variants excluded as in the normal run.
  • build-and-test-release, the standalone GPU-check packaging and the SPIR-V WARP gate are skipped.
  • The dashboard is still drawn and uploaded, and publish-coverage keeps its main-only gate.

The selection includes the x64 fixtures because the published chart measures x64 as well as gfx1013/gfx1030; a shader-only run would publish a lower x64 figure. tests/ci_coverage_mode_check.py reads the workflow and CMakeLists.txt and fails when a record-writing test, or a member of a coverage family, falls outside the ctest selection; it also asserts publication still requires R0Y00/Xbox2Windows and refs/heads/main.

Push and pull-request runs keep the full suite. publish-coverage still requires build-and-test to succeed and accepts a skipped /O2 job only for the coverage-only dispatch.

Validation:

  • python -B tests/ci_coverage_mode_check.py -v — 4 tests pass.
  • python -B tests/run_checks_fragments_check.py — ok.
  • python -B tests/docs_links_check.py — 198 files, 765 links.
  • Workflow parsed with PyYAML; the dispatch input, job conditions and selection read back as expected.
  • git diff --check clean.

The normal Windows path is exercised by this PR's CI. The coverage-only branch itself is exercised by the next dispatch.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:5577306138 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3690). Originally posted by [lambirou](https://github.com/lambirou) on 2026-12-01T01:50:49Z. --- The coverage dashboard is only republished by a full `main` run, so refreshing it after a coverage change waits for the whole debug suite and the `/O2` job. A `workflow_dispatch` run can now set `coverage_only: true`: - `build-and-test` builds the dev preset and runs only the tests that write `form_coverage` records: `cpu_*`, `pixel_aot_*`, `compute_store_aot_*` and `mesh_entry_aot_*`, with the hardware variants excluded as in the normal run. - `build-and-test-release`, the standalone GPU-check packaging and the SPIR-V WARP gate are skipped. - The dashboard is still drawn and uploaded, and `publish-coverage` keeps its `main`-only gate. The selection includes the x64 fixtures because the published chart measures x64 as well as gfx1013/gfx1030; a shader-only run would publish a lower x64 figure. `tests/ci_coverage_mode_check.py` reads the workflow and `CMakeLists.txt` and fails when a record-writing test, or a member of a coverage family, falls outside the ctest selection; it also asserts publication still requires `R0Y00/Xbox2Windows` and `refs/heads/main`. Push and pull-request runs keep the full suite. `publish-coverage` still requires `build-and-test` to succeed and accepts a skipped `/O2` job only for the coverage-only dispatch. Validation: - `python -B tests/ci_coverage_mode_check.py -v` — 4 tests pass. - `python -B tests/run_checks_fragments_check.py` — ok. - `python -B tests/docs_links_check.py` — 198 files, 765 links. - Workflow parsed with PyYAML; the dispatch input, job conditions and selection read back as expected. - `git diff --check` clean. The normal Windows path is exercised by this PR's CI. The coverage-only branch itself is exercised by the next dispatch.
lambirou commented 2026-12-01 03:11:05 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by lambirou on 2026-12-01T03:11:05Z.

Review: COMMENTED


Reviewed 28b8ecf0 by reading the workflow and running tests/ci_coverage_mode_check.py.

Verdict: approve. The dispatch input, the coverage-only ctest selection, the skipped /O2 and GPU-check steps, and the publication gate are consistent. The new check passes locally (4 tests).

  • SHOULD tests/ci_coverage_mode_check.py pins the input and the publish gate, but not the two guards that make the mode safe: the -E '_hardware$' exclusion in the coverage-only ctest command and the build-and-test-release skip condition. Removing either would still pass the check while running GPU tests on a runner without a GPU or paying for /O2. Assert both strings in the coverage-only section.
  • NIT github.event.inputs.coverage_only is the legacy string form. The typed inputs.coverage_only context is the direct boolean and avoids a future reader wondering why a boolean input is compared with 'true'; the current expression is still correct for a workflow_dispatch.

Checked, no finding: COVERAGE_ONLY is false on push and pull_request; -E '_hardware$' covers every hardware test name (there are no _hardware_* variants); the selection covers the cpu_, pixel_aot_, compute_store_aot_ and mesh_entry_aot_ families, and every literal FORM_COVERAGE_RECORD test falls under those prefixes; publish-coverage allows a skipped build-and-test-release only when build-and-test succeeded and the repository/ref/event gates still hold.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6124497410 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3690#pullrequestreview-6124497410). Originally posted by [lambirou](https://github.com/lambirou) on 2026-12-01T03:11:05Z. **Review:** COMMENTED --- Reviewed `28b8ecf0` by reading the workflow and running `tests/ci_coverage_mode_check.py`. **Verdict: approve.** The dispatch input, the coverage-only ctest selection, the skipped `/O2` and GPU-check steps, and the publication gate are consistent. The new check passes locally (4 tests). - **SHOULD** `tests/ci_coverage_mode_check.py` pins the input and the publish gate, but not the two guards that make the mode safe: the `-E '_hardware$'` exclusion in the coverage-only ctest command and the `build-and-test-release` skip condition. Removing either would still pass the check while running GPU tests on a runner without a GPU or paying for `/O2`. Assert both strings in the coverage-only section. - **NIT** `github.event.inputs.coverage_only` is the legacy string form. The typed `inputs.coverage_only` context is the direct boolean and avoids a future reader wondering why a boolean input is compared with `'true'`; the current expression is still correct for a `workflow_dispatch`. Checked, no finding: `COVERAGE_ONLY` is false on `push` and `pull_request`; `-E '_hardware$'` covers every hardware test name (there are no `_hardware_*` variants); the selection covers the `cpu_`, `pixel_aot_`, `compute_store_aot_` and `mesh_entry_aot_` families, and every literal `FORM_COVERAGE_RECORD` test falls under those prefixes; `publish-coverage` allows a skipped `build-and-test-release` only when `build-and-test` succeeded and the repository/ref/event gates still hold.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
R0Y00/Xbox2Windows!3690
No description provided.