From a245aff2e4fbb83c346dae23f4c8583247674873 Mon Sep 17 00:00:00 2001 From: Luis Montes Date: Wed, 29 Jul 2026 18:15:38 -0700 Subject: [PATCH 1/2] ci: trim duplicate browser coverage --- .github/workflows/ci.yml | 4 +++- docs/BUILD-AND-CI.md | 6 +++++- scripts/test.sh | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9de6b22..48beb24 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,7 @@ name: ci -# Build every example and run the full suite on each target platform. +# Build every example and run the native suite on each target platform. +# Browser compatibility is checked with the same full-stack game everywhere. # # Each target builds on its OWN runner rather than cross-compiling. scriptc # can cross-compile via SCRIPTC_CC=zigcc, but the FFI archives cannot: Skia, @@ -221,6 +222,7 @@ jobs: SG_TARGET: ${{ matrix.target }} SCRIPTC_CC: ${{ matrix.scriptc_cc }} SCRIPTC_TARGET: ${{ matrix.scriptc_target }} + SG_BROWSER_EXAMPLE: station run: | # Headless: SDL's dummy drivers, and xvfb on Linux for the browser # proof (Firefox headless still wants a display on some runners). diff --git a/docs/BUILD-AND-CI.md b/docs/BUILD-AND-CI.md index c1cc206..c509f8c 100644 --- a/docs/BUILD-AND-CI.md +++ b/docs/BUILD-AND-CI.md @@ -79,7 +79,7 @@ sites, or the build fails. | Job | Runner | What | | --- | --- | --- | -| `linux-x86_64` | ubuntu-24.04 | Build every example, run the full suite, report sizes, upload binaries | +| `linux-x86_64` | ubuntu-24.04 | Build every example, run every native test and the browser smoke | | `linux-aarch64` | ubuntu-24.04-arm | Same | | `macos-aarch64` | macos-14 | Same; ANGLE translates GLES3 to Metal | | `macos-x86_64` | macos-15-intel | Same; ANGLE translates GLES3 to Metal | @@ -87,6 +87,10 @@ sites, or the build fails. ### Conformance details +The browser smoke runs `station` on every platform. It covers the full game +stack in one pass: assets, input, audio, animation, Canvas HUD work, and +WebGL. Native builds and native tests are not reduced. + - **Canvas goldens** are generated by `test/golden/gen.js` (plain JS, runs under Node with @napi-rs/canvas pinned to the same CANVAS_VERSION) and committed. The scriptc-built harness re-renders each scene headless diff --git a/scripts/test.sh b/scripts/test.sh index 8d28948..f0a51e8 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -105,7 +105,7 @@ fi # Skips loudly when firefox/geckodriver are absent. echo echo "==> browser proof" -if "$ROOT/browser/test.sh"; then +if "$ROOT/browser/test.sh" "${SG_BROWSER_EXAMPLE:-}"; then echo " PASS" else echo " FAIL" From c58d563801a1b03f22e99f66c9b8d5af429cc12e Mon Sep 17 00:00:00 2001 From: Luis Montes Date: Wed, 29 Jul 2026 18:37:26 -0700 Subject: [PATCH 2/2] docs: add project badges --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 8ca7ef6..0395d5b 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,9 @@ # scriptc-game +[![CI](https://github.com/monteslu/scriptc-game/actions/workflows/ci.yml/badge.svg)](https://github.com/monteslu/scriptc-game/actions/workflows/ci.yml) +[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE) +[![Native: Linux, macOS, Windows](https://img.shields.io/badge/native-Linux%20%7C%20macOS%20%7C%20Windows-2ea44f.svg)](docs/BUILD-AND-CI.md) + **Write a browser game. Compile it to a NATIVE binary.** **No chromium, No Electron, No node.js, No bun, No JIT, No V8**