ci(3d): build the 3D WebGL harness + parity report in wasm-build

- build 3d-webgl test app after gal-webgl (same recipe: wx build + docker
  sysroot headers); the capture spec already lives in the default e2e suite
  and self-skips when the app is missing, so it now runs
- report-only parity + webgl-self step after the e2e suites
  (continue-on-error: the committed baseline-webgl set is Mac-Chromium-
  sourced — promote CI renders and flip gating if SwiftShader drifts past
  the 0.005 floor)
- exclude tests/apps/3d-webgl from the test-apps cache (rebuilt every run,
  like gal-webgl) and upload tests/3d-regression/output/** (renders, diffs,
  the 3d:review triptych gallery) with the e2e artifacts

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Istvan Matejcsok 2026-07-03 15:35:27 +02:00
commit 4fd41a31d5

View file

@ -340,6 +340,7 @@ jobs:
tests/apps
!tests/apps/kicad
!tests/apps/gal-webgl
!tests/apps/3d-webgl
key: testapps-${{ runner.os }}-wx${{ steps.keys.outputs.wx }}-k${{ steps.keys.outputs.kicad }}-bin${{ steps.keys.outputs.bin }}-${{ hashFiles('tests/apps/**/*.cpp', 'tests/apps/**/*.h', 'tests/apps/**/*.html', 'tests/apps/Makefile.wasm', 'scripts/build-wx-wasm.sh', 'scripts/build-wasm-test.sh', 'scripts/common/versions.sh', 'scripts/common/env.sh', 'scripts/common/functions.sh', 'scripts/common/apply-asyncify.sh', 'scripts/common/asyncify-imports.txt', 'scripts/common/inject-dyncall-shims.sh', 'scripts/common/shims/**', 'wasm/**') }}
- name: Build wxWidgets test apps
@ -350,6 +351,15 @@ jobs:
if: inputs.run_tests
run: ./scripts/build-gal-webgl-test.sh
# 3D renderer regression harness (tests/3d-regression): same recipe as GAL —
# compiles real KiCad 3D-viewer TUs + the wasm/gl1 GL1->WebGL2 layer against
# the wx build and the docker-exposed sysroot headers. The capture spec
# (e2e/3d-webgl.spec.ts) runs inside the wx e2e step below; it self-skips
# when this app is missing.
- name: Build 3D WebGL test app
if: inputs.run_tests
run: ./scripts/build-3d-webgl-test.sh
# The emsdk cache saves in the post-job phase; the downloads/ tarballs
# (~340 MB) are spent after install — drop them so they never ride in the
# cache. No-op on cache-hit runs (already pruned before the save).
@ -424,6 +434,24 @@ jobs:
working-directory: tests
run: xvfb-run -a npm run test:perf
# 3D renderer parity + browser-self regression (report-only). The wx e2e
# step above captured the 47 scenario renders into
# tests/3d-regression/output/webgl; compare them against the committed
# native goldens (parity — the port-correctness meter) and the committed
# browser goldens (webgl-self). continue-on-error while the committed
# baseline-webgl/ set is Mac-Chromium-sourced: if CI's SwiftShader
# rasterizes past the 0.005 floor, promote CI's renders into
# baseline-webgl/ and flip this step gating. 3d:review writes the full
# 47-pair triptych gallery for the artifact upload below.
- name: 3D renderer parity (report-only)
if: inputs.run_tests && !cancelled() && steps.wx_e2e.outcome != 'skipped'
continue-on-error: true
working-directory: tests
run: |
npm run 3d:check:parity
npm run 3d:check:webgl
npm run 3d:review
# Screenshot drift gate + Discord report (perf + triptychs). Runs whenever
# the e2e suites ran — INCLUDING on e2e failure — so a wrong or missing
# screenshot is visible on Discord even on a red build (a spec that died
@ -485,4 +513,5 @@ jobs:
tests/test-results/**
tests/pw-artifacts/**
tests/playwright-report/**
tests/3d-regression/output/**
if-no-files-found: ignore