chore: cache the TomBox console DLLs in CI instead of rebuilding them #208

Manually merged
github merged 3 commits from gh-pr/208/head into gh-pr/208/base 2026-11-26 05:37:28 +00:00
Owner

@⁠Exorion1er on GitHub · 2026-11-25 14:25 UTC · original
Exorion1er:claude/ci-tombox-cache-07d1b2 → main · +17 −0 · 1 files · 3 commits · merged 2026-11-25 14:44 UTC

Why

In the pytest job, the "DLL console de TomBox" step takes ~2m45s on every run, even when
the Rust cache from #201 restores a full match (run 45630781451: full match: true, then
Finished release profile [optimized + debuginfo] in 2m 43s).

Swatinem/rust-cache only caches dependency crates (cache-workspace-crates: false). The 15
crates compiled in that step are all TomBox workspace members (compat-common, d3d12_xs, xg_xs,
xmem…), so they are rebuilt every time. Enabling workspace-crate caching would not help:
cargo checks path crates by mtime, and a fresh checkout makes every source newer than the
cached artifacts.

What

Cache the 8 DLLs in runtime/build/tombox (the only TomBox output the tests read) with
actions/cache, keyed on the OS, the TomBox submodule commit, the rustc version and
hashFiles('tools/build_tombox.py'). On a hit, tools/build_tombox.py is skipped.
A submodule bump, a new rustc or a script change gives a new key and a normal build.

Expected effect

About 160 s less per pytest run when the cache hits (the step was 166 s; restoring 8 DLLs
takes a few seconds). The first run after merge, and any PR that bumps the submodule, still
builds once.

Verification

Measured on this PR: the first run (cache miss, 45633908884) built TomBox in 157 s and saved
the cache; the second (45635113253) restored it in 1 s, skipped the build, and the pytest job
went from 355 s to 213 s with all tests green.

🤖 Generated with Claude Code

**@⁠Exorion1er** on GitHub · 2026-11-25 14:25 UTC · [original](https://github.com/LooperSalty/AnyXboxX/pull/208) `Exorion1er:claude/ci-tombox-cache-07d1b2` → `main` · +17 −0 · 1 files · 3 commits · merged 2026-11-25 14:44 UTC ## Why In the `pytest` job, the "DLL console de TomBox" step takes ~2m45s on every run, even when the Rust cache from #201 restores a full match (run 45630781451: `full match: true`, then `Finished release profile [optimized + debuginfo] in 2m 43s`). Swatinem/rust-cache only caches dependency crates (`cache-workspace-crates: false`). The 15 crates compiled in that step are all TomBox workspace members (compat-common, d3d12_xs, xg_xs, xmem…), so they are rebuilt every time. Enabling workspace-crate caching would not help: cargo checks path crates by mtime, and a fresh checkout makes every source newer than the cached artifacts. ## What Cache the 8 DLLs in `runtime/build/tombox` (the only TomBox output the tests read) with `actions/cache`, keyed on the OS, the TomBox submodule commit, the rustc version and `hashFiles('tools/build_tombox.py')`. On a hit, `tools/build_tombox.py` is skipped. A submodule bump, a new rustc or a script change gives a new key and a normal build. ## Expected effect About 160 s less per `pytest` run when the cache hits (the step was 166 s; restoring 8 DLLs takes a few seconds). The first run after merge, and any PR that bumps the submodule, still builds once. ## Verification Measured on this PR: the first run (cache miss, 45633908884) built TomBox in 157 s and saved the cache; the second (45635113253) restored it in 1 s, skipped the build, and the pytest job went from 355 s to 213 s with all tests green. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Swatinem/rust-cache only keeps dependency crates: the 15 TomBox workspace
crates (compat-common, d3d12_xs, xg_xs...) were rebuilt on every run even on
a full cache hit, about 2m45s of the pytest job. The 8 DLLs copied to
runtime/build/tombox only depend on the submodule commit, rustc and
tools/build_tombox.py, so cache them under that key and skip the build on a hit.

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