Skip to content

perf(ci): cache smoke downloads, dedup portable, narrow detect#56

Merged
Sunrisepeak merged 1 commit into
mainfrom
perf/ci-cache-downloads
Jun 29, 2026
Merged

perf(ci): cache smoke downloads, dedup portable, narrow detect#56
Sunrisepeak merged 1 commit into
mainfrom
perf/ci-cache-downloads

Conversation

@Sunrisepeak

Copy link
Copy Markdown
Member

Cuts smoke-CI time. Today every run re-downloads xim:python/xim:make, the gcc/llvm toolchains, and every compat source archive — the only actions/cache path is ~/.mcpp/registry (just the static prebuilt registry from the mcpp tarball). Three independent levers:

1. Cross-run download cache. Add actions/cache for the smoke download dir (${{ runner.temp }}/mcpp-smoke-cache) in smoke-full-linux and smoke-portable, keyed smoke-dl-<os>-<mcppver>-<hash(pkgs)> with a smoke-dl-<os>-<mcppver>- restore-keys prefix → a partial hit survives any pkg/test edit; only changed archives re-download.

2. Portable within-run dedup. smoke-portable never set MCPP_INDEX_SMOKE_CACHE_DIR, and smoke_compat_portable.sh had only a restore half — so its 5 projects each re-downloaded the full llvm toolchain + archives within one run. Added the save_smoke_cache half (+ a pbuild wrapper routing all 5 builds through it) and wired the env var in the job.

3. Narrow detect. smoke-full-linux and smoke-portable run disjoint scripts on disjoint platforms, so the single full=true is split into full_linux/full_portable. A change to one platform's harness no longer triggers the other's suite (editing smoke_compat_portable.sh skips the ~12-min Linux job; editing a Linux smoke script skips win+mac). Common harness, unclassified tests/ changes, and pkgs without an example still fall back to BOTH — no coverage is silently dropped. Classification was unit-tested against 9 representative changed-file sets.

Python is pulled only by compat.xcb (build-dep xim:python@latest, transitively via x11/glfw); Linux-only. compat.xorgproto/compat.x11 do not shell out to Python.

Note: this PR touches validate.yml + a smoke script, so per lever 3 it correctly runs BOTH suites (validate.yml = common harness).

… detect

Three independent levers to cut smoke-CI time (was: every run re-downloads
xim:python/make, gcc/llvm toolchains, and every compat source archive — only
~/.mcpp/registry was cached).

1. Cross-run download cache: add actions/cache for the smoke download dir
   (${runner.temp}/mcpp-smoke-cache) in smoke-full-linux AND smoke-portable,
   keyed by MCPP_VERSION + a restore-keys prefix so a partial hit survives any
   pkg/test edit (only changed archives re-download).

2. Portable within-run dedup: smoke-portable never set MCPP_INDEX_SMOKE_CACHE_DIR
   and smoke_compat_portable.sh had only a restore half — so its 5 projects each
   re-downloaded the full llvm toolchain + archives within one run. Add the
   save_smoke_cache half (+ pbuild wrapper routing all 5 builds through it) and
   wire MCPP_INDEX_SMOKE_CACHE_DIR in the portable job.

3. Narrow detect: smoke-full-linux and smoke-portable run disjoint scripts on
   disjoint platforms, so split the single full=true into full_linux/full_portable.
   A change to one platform's harness no longer triggers the other's suite
   (a smoke_compat_portable.sh edit skips the ~12-min Linux job; a Linux smoke
   script edit skips win+mac). Common harness, unclassified test changes, and
   pkgs without an example still fall back to BOTH — no coverage is dropped.
   Classification verified against 9 representative changed-file sets.

Diagnosis: see memory mcpp-index-ci-repeated-downloads. Python is pulled only by
compat.xcb (build-dep, transitively via x11/glfw), Linux-only.
@Sunrisepeak Sunrisepeak merged commit 8c46866 into main Jun 29, 2026
7 checks passed
@Sunrisepeak Sunrisepeak deleted the perf/ci-cache-downloads branch June 29, 2026 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant