ci: run the SPIR-V bridge WARP tests on both Windows jobs #726

Manually merged
github merged 1 commit from gh-pr/726/head into gh-pr/726/base 2026-11-26 22:14:35 +00:00
Owner

@⁠rwZephyr on GitHub · 2026-11-22 23:18 UTC · original
rwZephyr:ci/spirv-bridge-windows → main · +224 −23 · 6 files · 1 commits · merged 2026-11-22 23:52 UTC

Fixes #720, following R0Y00's spec in #720 (pinned source revisions, a cache keyed by revisions and toolchain, only the three CLIs, skip 77 locally, failure in hosted CI, physical GPU stays manual).

Problem

spirv_{address_window,sampler_views,ballot_extract,compare_sampler}_{hardware,warp} were registered only when CMake found spirv-as, spirv-val and spirv-cross. The windows-2025 runners have none of them, so the tests never existed in CI, and a missing toolchain anywhere showed up as an absent test rather than a skip.

What changes

  • tools/setup-spirv-tools.ps1 builds exactly spirv-as, spirv-val and spirv-cross from pinned sources into out/tools/spirv/bin, with the static CRT:

    • SPIRV-Tools v2025.5 = 262bdab48146c937467f826699a40da0fdfc0f1a
    • SPIRV-Headers b824a462d4256d720bebb40e78b9eb8f78bbb305 (the revision SPIRV-Tools' DEPS names for that release)
    • SPIRV-Cross 57e4efcc84112abcd426dc5ec248b5339bee04f2 (as used by the bridge fixtures)

    Each checkout is verified against its pin. A revisions.txt stamp makes reruns a no-op. It follows the pattern of tools/setup-xbdepends.ps1.

  • CMake looks in out/tools/spirv/bin first, then PATH and $env:VULKAN_SDK\Bin, and registers all eight spirv_* tests unconditionally through tests/spirv_window/run_bridge_test.py:

    • Tool missing: the test is reported as skip 77, with a hint to run the setup script.
    • X2W_REQUIRE_SPIRV_TOOLS=1: a missing tool, or a 77 from the test itself (for example a WARP capability skip), fails instead.
  • Both Windows jobs (dev and release/O2):

    • read the MSVC toolset version from the dev shell;
    • restore out/tools/spirv/bin with actions/cache (v5.0.5, pinned by SHA), keyed by runner.os, the MSVC toolset and hashFiles('tools/setup-spirv-tools.ps1'), which holds the revisions;
    • build the tools on a cache miss;
    • run CTest with X2W_REQUIRE_SPIRV_TOOLS=1.
  • A dedicated step in each job, tests/spirv_window/require_warp_results.py, reads the CTest JUnit report and fails unless all four spirv_*_warp tests are present and passed. It runs even when CTest fails, so the reason is named. The release job now also writes a JUnit report.

  • _hardware tests stay excluded in CI and remain manual evidence.

  • docs/experiments.md describes the setup script, the skip and the CI behaviour.

Local evidence

Commit 87d3677d828715bd775131d17b0ba68c321898c2 on 121fdc3, clean tree. Windows 11 25H2 build 26200.9974, MSVC 19.44.35230, CMake 3.31.12, Python 3.12.10, DXC 1.8.2502.8. WARP 10.0.26100.9818, RX 9070 XT driver 32.0.32029.2010, debug layer unavailable.

Tool build:

.\tools\setup-spirv-tools.ps1

This produced SPIRV-Tools v2025.5 262bdab… and SPIRV-Cross 57e4efc. A clean build took 42 s on a 16-thread machine with sources already fetched. A rerun found the stamp and finished in 0.4 s.

Both presets, CI mode:

$env:X2W_REQUIRE_SPIRV_TOOLS = '1'
foreach ($p in 'dev', 'release') {
    cmake --preset $p
    cmake --build --preset $p --target offscreen_check
    ctest --preset $p --no-tests=error -R '^spirv_.*_warp$' --output-junit "$PWD/out/junit-$p.xml"
    python -B tests/spirv_window/require_warp_results.py "out/junit-$p.xml"
}
Preset CTest Dedicated check
dev 4/4 passed all 4 ran and passed (exit 0)
release (/O2) 4/4 passed all 4 ran and passed (exit 0)

spirv_*_hardware on the RX 9070 XT, dev, not strict: 4/4 passed.

Tool-less local case. I hid out/tools/spirv/bin (no tools on PATH, no VULKAN_SDK) and configured a separate build directory:

Check Result
CMake cache SPIRV_WINDOW_{AS,VAL,CROSS}-NOTFOUND
ctest -N -R '^spirv_' Total Tests: 8 (still registered)
WARP tests, default 4 × Skipped, CTest exit 0
require_warp_results.py on that report exit 1, all four skipped
WARP tests with X2W_REQUIRE_SPIRV_TOOLS=1 4 × Failed, CTest exit 8

Wrapper paths with stub drivers:

Driver result Default X2W_REQUIRE_SPIRV_TOOLS=1
exit 77 77 1, with "the test skipped, but X2W_REQUIRE_SPIRV_TOOLS=1 requires it to run"
exit 0 0 0
missing spirv-as 77, with the setup hint 1

tests/docs_links_check.py and tests/bidi_controls_check.py pass.

Not verified locally

  • Hosted-runner behaviour: this PR's own CI run is the first test of the cache, the uncached tool build on a 4-vCPU windows-2025 runner and the runner's WARP. If that WARP lacks a capability one of the four fixtures needs, the strict step fails by design, and I'll report which one.
  • Cold-cache time: the uncached build adds a few minutes to each Windows job on first run. The jobs' 20-minute timeout is unchanged.

AI-assisted; all local commands were run on the machine above.

🤖 Generated with Claude Code

**@⁠rwZephyr** on GitHub · 2026-11-22 23:18 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/726) `rwZephyr:ci/spirv-bridge-windows` → `main` · +224 −23 · 6 files · 1 commits · merged 2026-11-22 23:52 UTC Fixes #720, following R0Y00's spec in https://git.gtahub.st/github/R0Y00--Xbox2Windows/issues/720 (pinned source revisions, a cache keyed by revisions and toolchain, only the three CLIs, skip 77 locally, failure in hosted CI, physical GPU stays manual). ## Problem `spirv_{address_window,sampler_views,ballot_extract,compare_sampler}_{hardware,warp}` were registered only when CMake found `spirv-as`, `spirv-val` and `spirv-cross`. The `windows-2025` runners have none of them, so the tests never existed in CI, and a missing toolchain anywhere showed up as an absent test rather than a skip. ## What changes - **`tools/setup-spirv-tools.ps1`** builds exactly `spirv-as`, `spirv-val` and `spirv-cross` from pinned sources into `out/tools/spirv/bin`, with the static CRT: - SPIRV-Tools `v2025.5` = `262bdab48146c937467f826699a40da0fdfc0f1a` - SPIRV-Headers `b824a462d4256d720bebb40e78b9eb8f78bbb305` (the revision SPIRV-Tools' `DEPS` names for that release) - SPIRV-Cross `57e4efcc84112abcd426dc5ec248b5339bee04f2` (as used by the bridge fixtures) Each checkout is verified against its pin. A `revisions.txt` stamp makes reruns a no-op. It follows the pattern of `tools/setup-xbdepends.ps1`. - **CMake** looks in `out/tools/spirv/bin` first, then `PATH` and `$env:VULKAN_SDK\Bin`, and registers all eight `spirv_*` tests unconditionally through **`tests/spirv_window/run_bridge_test.py`**: - **Tool missing:** the test is reported as skip 77, with a hint to run the setup script. - **`X2W_REQUIRE_SPIRV_TOOLS=1`:** a missing tool, or a 77 from the test itself (for example a WARP capability skip), fails instead. - **Both Windows jobs** (`dev` and `release`/O2): - read the MSVC toolset version from the dev shell; - restore `out/tools/spirv/bin` with `actions/cache` (v5.0.5, pinned by SHA), keyed by `runner.os`, the MSVC toolset and `hashFiles('tools/setup-spirv-tools.ps1')`, which holds the revisions; - build the tools on a cache miss; - run CTest with `X2W_REQUIRE_SPIRV_TOOLS=1`. - **A dedicated step in each job**, **`tests/spirv_window/require_warp_results.py`**, reads the CTest JUnit report and fails unless all four `spirv_*_warp` tests are present and passed. It runs even when CTest fails, so the reason is named. The release job now also writes a JUnit report. - `_hardware` tests stay excluded in CI and remain manual evidence. - `docs/experiments.md` describes the setup script, the skip and the CI behaviour. ## Local evidence Commit `87d3677d828715bd775131d17b0ba68c321898c2` on `121fdc3`, clean tree. Windows 11 25H2 build 26200.9974, MSVC 19.44.35230, CMake 3.31.12, Python 3.12.10, DXC 1.8.2502.8. WARP 10.0.26100.9818, RX 9070 XT driver 32.0.32029.2010, debug layer unavailable. **Tool build:** ```powershell .\tools\setup-spirv-tools.ps1 ``` This produced `SPIRV-Tools v2025.5 262bdab…` and SPIRV-Cross `57e4efc`. A clean build took 42 s on a 16-thread machine with sources already fetched. A rerun found the stamp and finished in 0.4 s. **Both presets, CI mode:** ```powershell $env:X2W_REQUIRE_SPIRV_TOOLS = '1' foreach ($p in 'dev', 'release') { cmake --preset $p cmake --build --preset $p --target offscreen_check ctest --preset $p --no-tests=error -R '^spirv_.*_warp$' --output-junit "$PWD/out/junit-$p.xml" python -B tests/spirv_window/require_warp_results.py "out/junit-$p.xml" } ``` | Preset | CTest | Dedicated check | |---|---|---| | `dev` | 4/4 passed | all 4 ran and passed (exit 0) | | `release` (/O2) | 4/4 passed | all 4 ran and passed (exit 0) | `spirv_*_hardware` on the RX 9070 XT, `dev`, not strict: 4/4 passed. **Tool-less local case.** I hid `out/tools/spirv/bin` (no tools on `PATH`, no `VULKAN_SDK`) and configured a separate build directory: | Check | Result | |---|---| | CMake cache | `SPIRV_WINDOW_{AS,VAL,CROSS}-NOTFOUND` | | `ctest -N -R '^spirv_'` | `Total Tests: 8` (still registered) | | WARP tests, default | 4 × `Skipped`, CTest exit 0 | | `require_warp_results.py` on that report | exit 1, all four `skipped` | | WARP tests with `X2W_REQUIRE_SPIRV_TOOLS=1` | 4 × `Failed`, CTest exit 8 | **Wrapper paths with stub drivers:** | Driver result | Default | `X2W_REQUIRE_SPIRV_TOOLS=1` | |---|---|---| | exit 77 | 77 | 1, with "the test skipped, but X2W_REQUIRE_SPIRV_TOOLS=1 requires it to run" | | exit 0 | 0 | 0 | | missing `spirv-as` | 77, with the setup hint | 1 | `tests/docs_links_check.py` and `tests/bidi_controls_check.py` pass. ## Not verified locally - **Hosted-runner behaviour:** this PR's own CI run is the first test of the cache, the uncached tool build on a 4-vCPU `windows-2025` runner and the runner's WARP. If that WARP lacks a capability one of the four fixtures needs, the strict step fails by design, and I'll report which one. - **Cold-cache time:** the uncached build adds a few minutes to each Windows job on first run. The jobs' 20-minute timeout is unchanged. _AI-assisted; all local commands were run on the machine above._ 🤖 Generated with [Claude Code](https://claude.com/claude-code)
The spirv_* GPU tests were registered only when CMake found spirv-as,
spirv-val and spirv-cross. The Windows runners have none of them, so the
tests silently disappeared from CI (#720).

- tools/setup-spirv-tools.ps1 builds the three CLI tools from pinned
  SPIRV-Tools (v2025.5, 262bdab), SPIRV-Headers (b824a46, from its DEPS) and
  SPIRV-Cross (57e4efc) sources into out/tools/spirv/bin, with the static
  CRT. It does nothing if that directory already holds the pinned build.
- CMake looks there first and registers all eight spirv_* tests
  unconditionally, through tests/spirv_window/run_bridge_test.py. A missing
  tool is reported as CTest skip 77. With X2W_REQUIRE_SPIRV_TOOLS=1, a
  missing tool or a skip from the test fails instead.
- Both Windows jobs cache the tools, keyed by runner OS, MSVC toolset and
  the setup script (which holds the revisions), build them on a miss, run
  CTest with X2W_REQUIRE_SPIRV_TOOLS=1, and then require all four
  spirv_*_warp tests to have passed in the CTest JUnit report
  (tests/spirv_window/require_warp_results.py). Physical-GPU tests stay
  manual.

Fixes #720

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 22:14:34 +00:00
github manually merged commit 87d3677d82 into gh-pr/726/base 2026-11-26 22:14:35 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.