Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -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,
Expand Down Expand Up @@ -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).
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -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**

Expand Down
6 changes: 5 additions & 1 deletion docs/BUILD-AND-CI.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,18 @@ 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 |
| `windows-x86_64` | windows-latest | Same; MSVC ABI, SDL2/ANGLE DLLs and `icudtl.dat` staged with artifacts |

### 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
Expand Down
2 changes: 1 addition & 1 deletion scripts/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down