New tooling in tests/tools/screenshots/ (TypeScript via tsx): - compare.ts: one pixelmatch engine (AA-excluded), connected-component "where to look" boxes, old|new+boxes|heatmap triptych, per-engine floors. - promote.ts: churn-free updater — overwrite a baseline only when decoded pixels differ beyond the floor, copying CI bytes verbatim (no re-encode churn); pulls a CI run via `gh run download` or a local --from dir. - post-discord.ts: always-on CI-on-main report (SHA + e2e status + the track-only runtime-perf table), then screenshot triptychs, batched + size-capped + flood-collapsed + 429-aware. - perf-report.ts: perf table with Δ vs the previous main run (via gh). - changelog.ts: no-build git-history baseline differ (Discord trigger B). - noise.ts / gen-manifest.ts: calibration + manifest generation. CI wiring: - wasm-build.yml: post-test step runs the gate + report on the already- produced test-results (no extra build); report-only (continue-on-error), posts only on push to main, inert without DISCORD_WEBHOOK_URL. - ci-ubicloud.yml: secrets: inherit (pass the webhook through). - screenshot-changelog.yml: ~30s no-build changelog on baseline changes. screenshot-manifest.json: canonical 354-name set + best-effort engine tags (313 chromium-swiftshader / 41 firefox-llvmpipe). Normalize scale:'device'->'css' across 18 spec files (no-op at CI DSF=1) so committed baselines are uniformly css-scaled. Design: CI's Linux render is the single source of truth; no pinned container (accept rare env drift -> re-promote); dev commits via promote. Replaces the byte-cmp compare-screenshots.sh + file-size-proxy update-baseline-screenshots.sh (kept for now until the first re-baseline). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
47 lines
1.8 KiB
YAML
47 lines
1.8 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
|
|
# Pass repo secrets (DISCORD_WEBHOOK_URL) through to the reusable build so the
|
|
# post-test step can post the screenshot + perf report on push to main.
|
|
secrets: inherit
|
|
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 }}
|