From 282994e2f29875d9f613d6c0b45f6bd023829243 Mon Sep 17 00:00:00 2001 From: Istvan Matejcsok <119620946+matejcsok-ee@users.noreply.github.com> Date: Thu, 11 Jun 2026 17:43:13 +0200 Subject: [PATCH] ci(ubicloud): add the wxWidgets e2e suite to the run MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Host-side wxUniversal build + wx test apps (build-wxuniversal-wasm.sh / build-wasm-test.sh, mirroring the dispatch-only ci.yml) followed by `npm run test` before the KiCad e2e. The wx suite runs on bundled headless Chromium; several specs use WebGL (gal-webgl.spec.ts), so the chromium project gains a CI-gated --enable-unsafe-swiftshader launch arg — without it newer headless Chromium refuses software WebGL on the GPU-less runner. First time this suite runs on a working CI runner; treat as experimental. Co-Authored-By: Claude Fable 5 --- .github/workflows/ci-ubicloud.yml | 19 ++++++++++++++++++- tests/playwright.config.ts | 11 ++++++++++- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-ubicloud.yml b/.github/workflows/ci-ubicloud.yml index 8959916..5eaf7f4 100644 --- a/.github/workflows/ci-ubicloud.yml +++ b/.github/workflows/ci-ubicloud.yml @@ -39,7 +39,9 @@ jobs: # xvfb: kicad e2e runs headed Firefox under a virtual display — headless # Firefox cannot create any GL context on the GPU-less VM (see # tests/playwright-kicad.config.ts CI prefs). - sudo apt-get install -y cmake ninja-build g++ libjemalloc2 xvfb + # autoconf/automake/make: the host-side wxWidgets + wx test-app builds + # (build-wxuniversal-wasm.sh regenerates ./configure on fresh checkouts). + sudo apt-get install -y cmake ninja-build g++ libjemalloc2 xvfb autoconf automake make - uses: actions/checkout@v4 with: { submodules: recursive } @@ -70,6 +72,15 @@ jobs: echo "wasm-opt used:"; ./scripts/common/get-wasm-opt.sh --version 2>/dev/null || true ls -lh output/*.wasm + # Host-side wxWidgets build producing the wx test apps for `npm run test` + # (separate from the in-docker wxWidgets that KiCad links against). + # Auto-installs emsdk into tools/ on first run. + - name: Build wxWidgets (wxUniversal WASM) + run: ./scripts/build-wxuniversal-wasm.sh + + - name: Build wxWidgets test apps + run: ./scripts/build-wasm-test.sh + - name: Install test deps working-directory: tests run: npm ci @@ -82,6 +93,12 @@ jobs: working-directory: tests run: npm run setup:kicad + # wxWidgets e2e: bundled headless Chromium + SwiftShader (CI-gated launch + # arg in tests/playwright.config.ts). + - name: wxWidgets e2e (npm run test) + working-directory: tests + run: npm run test + - name: KiCad e2e (npm run test:kicad:ci) working-directory: tests # xvfb-run: headed Firefox on a virtual display — WebGL needs GLX + Mesa diff --git a/tests/playwright.config.ts b/tests/playwright.config.ts index 22f56ed..ee600bc 100644 --- a/tests/playwright.config.ts +++ b/tests/playwright.config.ts @@ -84,7 +84,16 @@ export default defineConfig({ projects: [ { name: 'chromium', - use: { ...devices['Desktop Chrome'] }, + use: { + ...devices['Desktop Chrome'], + // CI runners have no GPU and several wx specs use WebGL + // (gal-webgl.spec.ts etc.): newer headless Chromium refuses software + // WebGL without --enable-unsafe-swiftshader. CI-gated so local runs + // keep stock behavior (same pattern as playwright-kicad.config.ts). + ...(process.env.CI ? { + launchOptions: { args: ['--enable-unsafe-swiftshader'] }, + } : {}), + }, }, ],