pcbjam/scripts/deploy
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Gergő Törcsvári e94f5b31be ci: cache KiCad WASM build output to skip Docker on unchanged sources
Add an output-cache layer to ci-ubicloud.yml so a build whose inputs are
unchanged (typical when only tests/ or web/ change) skips the in-Docker
compile + the 1-2h host asyncify/wasm-opt chain — the bulk of the ~1h52m
run. On a hit, output/ and the GAL sysroot headers are restored from cache
and the deps restore/seed, build.sh, and sysroot export are all gated on a
miss, so Docker is never started.

Key: kwasm-<os>-bin<ver><opt>-k<kicad-sha>-wx<wx-sha>-sc<hash>-e<epoch>.
The "sc" hash (scripts/deploy/wasm-cache-hash.mjs) folds in just the
build-logic files that shape the wasm bytes (host post-processing,
per-tool compile recipes, scripts/deps, docker/Dockerfile+build.sh) plus
itself; it is content-based, order-independent, and identical on macOS/CI.
*.wasm.debug.wasm (5+ GB, unused by tests) is excluded -> ~0.5 GB entry on
Ubicloud's transparent 30 GB/repo/week cache.

Invalidation:
- bump .ci-cache-epoch in a commit for durable busts (inputs the sc-hash
  can't see: base-image/apt drift, a bad cache);
- [no-cache] or [rebuild-wasm] in the commit message / PR title, or
  workflow_dispatch no_cache=true, for a one-off rebuild (split
  restore/save so the bypass still refreshes the entry).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-19 14:51:33 +02:00
..
lib fix(demo): default WRANGLER_CMD to npx + silence expected R2 not-found probes 2026-06-19 13:31:06 +02:00
build-demo.mjs feat(demo): demo.pcbjam.com deploy — versioned WASM CDN + static gallery + tag CI 2026-06-19 11:39:09 +02:00
publish-content.mjs feat(demo): demo.pcbjam.com deploy — versioned WASM CDN + static gallery + tag CI 2026-06-19 11:39:09 +02:00
publish-wasm.mjs feat(demo): demo.pcbjam.com deploy — versioned WASM CDN + static gallery + tag CI 2026-06-19 11:39:09 +02:00
wasm-cache-hash.mjs ci: cache KiCad WASM build output to skip Docker on unchanged sources 2026-06-19 14:51:33 +02:00