ci: cache pip/sccache and parallelize pixel-binary checks #1513
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1520"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T13:32:12Z.
Change
Speeds up
.github/workflows/windows.ymlacross three independent areas without overlapping#1173or touchingtools/run_checks_parallel.py:pipwheels (setup-python): Enablescache: 'pip'withcache-dependency-path: 'requirements-dev.txt'inpython-linux,build-and-test, andbuild-and-test-releasesopefile,iced-x86, andziglangreuse cached wheels across runs.sccacheon Windows builds (build-and-test,build-and-test-release): Installsmozilla-actions/sccache-action(v0.0.11), setsSCCACHE_DIR($env:RUNNER_TEMP\sccache) andSCCACHE_CACHE_SIZE: '2G', restores/savesSCCACHE_DIRviaactions/cachekeyed by MSVC toolset, build preset (pr/devvsrelease), and C/C++/ASM/CMake input hashes, setsX2W_USE_SCCACHE: '1', passes@X2wSccacheCmakeArgs(fromtools/dev.ps1) tocmake --preset, and printssccache --show-statsright aftercmake --build.pixel-binarychecks: Runs all 31spirv_window/ LLVM-15 /rdna2_toolschecks inCheck machine-code inputs with LLVM 15concurrently viaThreadPoolExecutor, grouping each script's output with::group::/::endgroup::, reporting exact failing scripts, and exiting non-zero if any check fails.Verification
f6ca2432:yaml.safe_load(open(".github/workflows/windows.yml"))->YAML OK(['pixel-binary', 'python-linux', 'build-and-test', 'build-and-test-release', 'publish-coverage'])git diff --check-> exit 0python3 -B tests/docs_links_check.py->Checked 16 Markdown files and 344 links.(exit 0)python3 -B tests/bidi_controls_check.py->Checked 1249 tracked source, script and build/CI files: no bidirectional controls.(exit 0)python3 -B tests/dev_ps1_sccache_check.py->dev.ps1 sccache opt-in: ok (text only)(pwshnot installed on Linux host)python3 -B tests/gpu_report_format_check.py->Ran 10 tests in 0.005s / OKpixel-binaryrunner check: verified all 31 script paths exist, syntax compiles, paralleltests/spirv_window/*.pychecks pass, and synthetic failure exits 1 withFAILED: ... (exit 7).R0Y00/Xbox2Windows#1520):45404570418at4cc7a77b, 28pixel-binarychecks): all 3 PR jobs green;pixel-binarystep149s -> 105s;sccachecached81/81C/C++ compilations (0non-cacheable calls,20 MiBsaved);pipwheel cache saved.45411240026at rebasedf6ca2432, 31pixel-binarychecks): all 3 PR jobs green (2m40smax):pixel-binary:Check machine-code inputs with LLVM 15(includingapt-get) finished in 88s (2m02stotal job) vs 149s baseline on45403214617(-61s, even with 3 more checks).python-linux:pipcache hit (Using cached pefile,Using cached iced_x86, 2s install); 56s total job.build-and-test(pr):pipcache hit;sccacherestored fallback PR cache across a 23-commitmainrebase with 33/81 hits (40.74%), cuttingConfigure, build and run PC testsfrom 118s (cold) to 92s (43 MiBupdated cache saved).Evidence and follow-up
build-and-test-release(/O2) is gated ongithub.event_name != 'pull_request'and has the mirroredsetup-pythonpipcache,sccache-action,actions/cache, and@X2wSccacheCmakeArgsconfiguration; it will populate and warm its-release-cache key onmainpushes.Checklist
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T14:23:41Z.
Rebased onto current
main(fa6a5653, preserving therequire_warp_results_check.pystep) and verified all 3 PR CI checks green on run45413002715(python-linux52s,build-and-test2m12s,pixel-binary2m30s).Measured before/after CI timings:
pixel-binary(LLVM 15 / SPIR-V checks step):149s -> 88s(warm run45411240026)build-and-test(prbuild+test step):118s -> 92swithsccache40.7%cache hits across rebasepython-linuxdependency install:pipcache hit in2sAI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-24T14:24:06Z.
Codex Review Summary: ✅ Completed
This comment shows the latest Codex review activity on this pull request.
fa6a565ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.
Imported from R0Y00/Xbox2Windows. Originally posted by ChazY11 on 2026-11-24T15:02:15Z.
Same 32 checks, failures still fail, and the parallel run cannot collide on files
Independent reviewer, not the author. Reviewed
e9ba20ed; nothing pushed to the branch.I cannot run GitHub Actions from here, so this review is static: I compared the old and new command lists, read the
failure path, and checked the working-directory behaviour of every script in the new list.
1. Coverage is identical
Parsing the removed lines and the new
CHECKStable:One apparent difference appeared in my first pass —
tests/rdna2_tools_check.pylooked "new only" — because the old lineis env-prefixed (
LLVM_LIB=… LLVM_MC=… LLVM_OBJCOPY=… python3 -B tests/rdna2_tools_check.py) and my pattern missed it.It is present in both, with the environment now passed through the
extra_envdict:So nothing was dropped and nothing was added.
2. A failure still fails the job
sys.exit(1)is there, and each check's exit code is collected rather than the first one aborting the rest, so a singlerun reports every failure instead of only the first.
stdout=PIPEplusstderr=STDOUTwith a::group::per script alsokeeps the logs readable under concurrency.
3. Parallel execution does not collide on files
I checked all 23 scripts in the list for shared output paths: every one of them creates its own
tempfile.TemporaryDirectory()/mkdtemp(for examplepixel_aot_check.pyatmain()wraps the whole mode dispatch inone, and
mesh_entry_check.pyat__main__). None writes to a fixedout/orbuild/path, somax_workers=cpu_count()does not race.
That matches your note that this does not overlap
tools/run_checks_parallel.py— the isolation here comes from thefixtures themselves.
4. The caching side is wired the way it claims
The
hashFilesset coversCMakeLists.txt,CMakePresets.json,cmake/**and the C/C++/ASM sources, so a source editinvalidates the cache instead of reusing stale objects, and the
restore-keysprefix still gives a warm start.One thing to keep an eye on
sccacheon thebuild-and-test-releasejob means a cache hit can skip compilation while the link still runs; if arelease-only failure ever appears that does not reproduce locally, clearing the
…-release-cache is the first thing totry. Not a request, just the failure mode this introduces.
Verdict
Reviewed
e9ba20ed. Coverage unchanged, failure propagation intact, parallel isolation verified per script, and thecache configuration matches the description. No objection from me.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T15:04:18Z.
Thanks for the independent review and failure-propagation verification on Windows, @ChazY11.