perf(deploy): parallelize publish-wasm brotli (q11) across files

brotli q11 over the ~320MB wasm set ran serially on one core (~0.4MB/s),
dominating the release publish job. Compress every to-be-uploaded file
concurrently on the libuv threadpool (compressBytesAsync + UV_THREADPOOL_SIZE
sized to the machine), so wall time drops from sum-of-files to roughly the
largest single file (kicad_editor.wasm): 329s for the full set locally vs
~11.5min of CPU. Upload ordering invariants unchanged: meta.json still last
per tool, registry last overall; moved-tag guard and reuse path untouched.
Also adds BROTLI_PARAM_SIZE_HINT and moves the publish-wasm job to
ubicloud-standard-8 so there is a core per file.

Verified byte-identical CDN layout vs the old script (local driver, pinned
builtAt), blob roundtrip to source sha, reuse + --from-registry modes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JQ9npuB6uLvkv6gzBV5GPh
This commit is contained in:
Gergő Törcsvári 2026-07-28 12:56:10 +02:00
commit f8ae378645
No known key found for this signature in database
GPG key ID: 8E75F2CDE64E5322
3 changed files with 101 additions and 46 deletions

View file

@ -75,10 +75,12 @@ jobs:
upload_output: true
# 2) Publish the build to the CDN (content-addressed; unchanged tools reuse)
# and write manifest-<tag>.json. Cheap runner — just downloads + uploads.
# and write manifest-<tag>.json. The slow step is brotli-q11 over ~300MB of
# wasm; the script compresses all files in parallel (one core per file), so
# give it enough cores that wall time ≈ the largest single file.
publish-wasm:
needs: [meta, build]
runs-on: ubuntu-latest
runs-on: ubicloud-standard-8
steps:
- uses: actions/checkout@v4
with: