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

Merged
rwZephyr merged 1 commit from upstream-pr/726 into main 2026-11-22 23:52:49 +00:00
rwZephyr commented 2026-11-22 23:18:29 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by rwZephyr on 2026-11-22T23:18:29Z.


Fixes #720, following R0Y00's spec in https://github.com/R0Y00/Xbox2Windows/issues/720#issuecomment-7087209496 (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

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6549117768 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/726). Originally posted by [rwZephyr](https://github.com/rwZephyr) on 2026-11-22T23:18:29Z. --- Fixes #720, following R0Y00's spec in https://github.com/R0Y00/Xbox2Windows/issues/720#issuecomment-7087209496 (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)
upstream-sync closed this pull request 2026-11-24 06:44:31 +00:00
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!720
No description provided.