A fast 2D and 3D game engine — TypeScript SDK, C++/WebAssembly core, visual editor. Ship one project to web, desktop, WeChat MiniGames, playable ads, and native Android / iOS.
TypeScript 2d-game-engine3d3d-game-engineandroidcppecsgame-editorgame-enginegamedeviostypescriptwebassemblywebglwebgpuwechat-minigame
ci(nightly): an emulator answers the android criterion, and a tag runs the list
yhhb843db053518
diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.ymlindex 61113ada1..f5bb91253 100644--- a/.github/workflows/nightly.yml+++ b/.github/workflows/nightly.yml@@ -10,10 +10,17 @@ name: Nightly# The list is NOT repeated here. Each job calls run-release-gate.mjs for the host# it is standing on, because a workflow that named the commands itself would be# the second list gates.mjs exists to prevent. `host` lives on the criterion.+#+# A release tag runs the same thing: an exit criterion is what a RELEASE has to+# be able to say, so the list is answered again against the commit being shipped+# rather than trusted from whatever the cron last saw.on:schedule:# 04:00 UTC, after the day's pushes have settled.- cron: '0 4 * * *'+ push:+ tags:+ - 'v*'workflow_dispatch:jobs:@@ -87,3 +94,38 @@ jobs:- name: Run the exit criteriarun: node tools/run-release-gate.mjs --host macos++ # The two criteria that package for Android and boot what they packaged. An+ # emulator answers both: verify-native-boot installs on a simulator by design,+ # and what it asks — did the boot record reach `ready in`, is the frame more+ # than one flat colour — is not a question about a driver. Ubuntu minutes, so+ # this rides the cron with the rest.+ android:+ name: Exit criteria (android)+ runs-on: ubuntu-latest+ needs: build-emscripten+ timeout-minutes: 90++ steps:+ - uses: actions/checkout@v7++ - uses: ./.github/actions/engine-submodules+ - uses: ./.github/actions/setup+ - uses: ./.github/actions/render-host++ # Nested virtualisation for the emulator, as the compat matrix does.+ - name: Enable KVM+ run: |+ echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules+ sudo udevadm control --reload-rules+ sudo udevadm trigger --name-match=kvm++ # The runner IS the emulator: the criteria's own commands run inside it, so+ # the list stays in releaseGate.mjs and this file names none of them.+ - name: Run the exit criteria+ uses: reactivecircus/android-emulator-runner@v2+ with:+ api-level: 34+ arch: x86_64+ disable-animations: true+ script: node tools/run-release-gate.mjs --host androiddiff --git a/tools/check-release-gate.mjs b/tools/check-release-gate.mjsindex 6a0260b0a..0297f5dd5 100644--- a/tools/check-release-gate.mjs+++ b/tools/check-release-gate.mjs@@ -54,7 +54,7 @@ for (const c of CRITERIA) {// A criterion that can only be answered somewhere particular owes the reason,// exactly as a gate's `where` owes its `why`: unexplained, it reads as a// criterion somebody quietly stopped running.- const HOSTS = ['linux', 'macos', 'android', 'device'];+ const HOSTS = ['linux', 'macos', 'android', 'device', 'desktop-and-android'];if (c.host !== undefined) {if (!HOSTS.includes(c.host)) fail(`"${c.id}" declares host "${c.host}" (have: ${HOSTS.join(', ')})`);if (!c.why?.trim()) fail(`"${c.id}" narrows to one host without saying why the others cannot answer it`);diff --git a/tools/releaseGate.mjs b/tools/releaseGate.mjsindex 3ad2009b6..cd2dde5fc 100644--- a/tools/releaseGate.mjs+++ b/tools/releaseGate.mjs@@ -59,8 +59,8 @@ export const CRITERIA = [},{id: 'launch-smoke-every-platform',- host: 'android',- why: 'verify-native-boot boots the package on an emulator, which needs the Android SDK',+ host: 'desktop-and-android',+ why: 'its command chains three verifiers across two environments — desktop render wants clang, Dawn, Vulkan and xvfb, the boot wants an emulator — so no one CI job answers it; note golden and the desktop pixels are already criteria and jobs of their own',says: 'every shipping platform launches a package and draws',answeredBy: 'node tools/verify-golden.mjs --tier release'+ ' && node tools/verify-desktop-render.mjs --tier pr'@@ -192,7 +192,7 @@ export const CRITERIA = [{id: 'a-crash-leaves-something-the-player-can-send',host: 'device',- why: '--require-device: a boot record surviving a crash is a claim about real hardware, and a simulator cannot make it',+ why: '--require-device reads `adb devices` on the machine it runs on, and the Device Farm path uploads a bundle rather than attaching one — so no runner here can answer it; a release captain with a phone plugged in and `pnpm run gate:run --host device` can',says: 'the boot record survives a crash on a real device, with the phase and a backtrace',// `--require-device` on purpose: without it the tool skips where there is no// phone, which is right on a laptop and is a false pass under a release.