pcbjam/.github/workflows/ci-ubicloud.yml
Gergő Törcsvári e7640d0a97
build(wasm): standardize asyncify wasm-opt tail to -O1 everywhere
The Binaryen wasm-opt shrink after Asyncify was the only -O2 in the
pipeline: -O2 by default (local + tag release) but -O1 in main CI. The
C++/wx/deps compile is already -O1 everywhere (DEBUG_BUILD defaults to 1;
nothing passes --release in CI/release). Pin the tail to -O1 too:

- apply-asyncify.sh: BINARYEN_OPT_LEVEL default -O2 -> -O1
- release.yml: opt_level -O2 -> -O1 (demo now ships -O1)
- ci-ubicloud.yml / wasm-build.yml / docker/build.sh: refresh stale -O2 comments

Because both callers now build at -O1, the FINAL cache key converges, so a
tag release FINAL-cache-hits main's build and skips the asyncify-tail
rebuild entirely (previously the ~1-2h -O2 wasm-opt was rerun per release).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-01 12:18:57 +02:00

44 lines
1.6 KiB
YAML

name: CI full build + e2e (Ubicloud)
# Main/PR gate: build all 6 KiCad WASM tools + run the wxWidgets + KiCad e2e
# suites on a Ubicloud runner. The actual recipe lives in the reusable
# wasm-build.yml (the SINGLE build definition) — this is just the main/PR caller.
# The asyncify wasm-opt tail is -O1 everywhere (main, release, local); the tag
# release (release.yml) calls the same recipe at the same -O1 and then publishes,
# so the build can never diverge from what ships.
#
# Routine edits under scripts/ do NOT bust the WASM output cache — only the subset
# in scripts/deploy/wasm-cache-hash.mjs does. For inputs the sc-hash can't see
# (base-image / apt drift, a bad cache) bump .ci-cache-epoch; for a one-off
# rebuild put [no-cache] or [rebuild-wasm] in the commit message / PR title.
on:
push:
branches: ["main", "ubicloud-ci"]
paths-ignore: ["docs/**", "**.md"]
pull_request:
branches: ["main"]
paths-ignore: ["docs/**", "**.md"]
workflow_dispatch:
inputs:
no_cache:
description: "Bypass the KiCad WASM output cache (force a full rebuild this run)"
type: boolean
required: false
default: false
concurrency:
# Per-ref: a new push queues behind its own in-flight run (don't cancel).
group: ci-ubicloud-${{ github.ref }}
cancel-in-progress: false
jobs:
build:
uses: ./.github/workflows/wasm-build.yml
with:
# -O1 asyncify shrink — the level we ship (release.yml uses the same -O1).
# 3D viewer ON so 3d-viewer.spec.ts has a viewer.
opt_level: "-O1"
build_3d_viewer: "ON"
run_tests: true
no_cache: ${{ inputs.no_cache || false }}