mirror of
https://github.com/imjasonh/nescript
synced 2026-07-09 01:16:12 +00:00
CI: add emulator smoke test job
Runs the jsnes + puppeteer harness on every push/PR so the same execution-level bugs that the test suite previously couldn't catch (missing JMP/JSR fixups, orphaned handler locals, uninitialized struct fields, silently-swallowed intrinsic calls) will be caught in CI going forward. The job installs the handful of shared libs Chrome for Testing needs on the ubuntu-latest runner, builds the compiler in release, compiles every example, then drives each ROM through the harness. On failure it uploads the captured screenshots and the JSON report as a build artifact so regressions are easy to triage without re-running locally. Kept separate from the existing `Build Examples` job so compile-time and execution-time issues report independently. https://claude.ai/code/session_014Z5y3Q9krLcAxYpZQJhZ5V
This commit is contained in:
parent
81f3fd7de0
commit
24db4e6cda
1 changed files with 55 additions and 0 deletions
55
.github/workflows/ci.yml
vendored
55
.github/workflows/ci.yml
vendored
|
|
@ -77,3 +77,58 @@ jobs:
|
|||
size=$(stat -c%s "$f")
|
||||
echo " OK: $size bytes"
|
||||
done
|
||||
|
||||
emulator:
|
||||
name: Emulator Smoke Test
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '22'
|
||||
- name: Install Chrome runtime deps for puppeteer
|
||||
# puppeteer ships its own Chrome for Testing binary via the
|
||||
# package's postinstall hook, but the runner image is missing
|
||||
# a handful of shared libs that Chrome needs to launch.
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y --no-install-recommends \
|
||||
libnss3 \
|
||||
libatk-bridge2.0-0 \
|
||||
libatk1.0-0 \
|
||||
libatspi2.0-0 \
|
||||
libcups2t64 \
|
||||
libdbus-1-3 \
|
||||
libdrm2 \
|
||||
libgbm1 \
|
||||
libpango-1.0-0 \
|
||||
libxcomposite1 \
|
||||
libxdamage1 \
|
||||
libxfixes3 \
|
||||
libxkbcommon0 \
|
||||
libxrandr2 \
|
||||
libasound2t64
|
||||
- name: Build compiler
|
||||
run: cargo build --release
|
||||
- name: Compile all .ne examples
|
||||
run: |
|
||||
for f in examples/*.ne; do
|
||||
echo "==> Compiling $f"
|
||||
./target/release/nescript build "$f"
|
||||
done
|
||||
- name: Install emulator harness dependencies
|
||||
working-directory: tests/emulator
|
||||
run: npm ci
|
||||
- name: Run each ROM in jsnes and verify it renders
|
||||
working-directory: tests/emulator
|
||||
run: node run_examples.mjs
|
||||
- name: Upload emulator screenshots on failure
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: emulator-screenshots
|
||||
path: |
|
||||
tests/emulator/screenshots/
|
||||
tests/emulator/report.json
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue