Skip to content

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.

chore(ci): the template boot is given the engine the release built, so the cook derives a project shader's WGSL twin as the editor does - effects-gallery and physics-3d shipped GLSL alone and failed on both devices; cyber-rooftop's frame is not counted on the Android emulator, which draws one in 45 s on its CPU and hangs on the relaunch

yhh108af0d0f2e3
diff --git a/.github/workflows/native-smoke.yml b/.github/workflows/native-smoke.yml
index 2f0346a2a..643bd76ea 100644
--- a/.github/workflows/native-smoke.yml
+++ b/.github/workflows/native-smoke.yml
@@ -53,6 +53,12 @@ on:
required: false
default: ''
type: string
+ # The artifact holding the engine this run built (desktop/public/wasm), when the caller has one. The cook derives a shader's
+ # WGSL twin with the engine's own headers, and without it a project shader ships GLSL alone and fails on the device.
+ engine-artifact:
+ required: false
+ default: ''
+ type: string
permissions:
contents: read
@@ -188,6 +194,13 @@ jobs:
tag: ${{ steps.src.outputs.tag }}
token: ${{ secrets.GITHUB_TOKEN }}
+ - name: Take the engine this run built, for the cook to derive shader twins with
+ if: inputs.engine-artifact != ''
+ uses: actions/download-artifact@v8
+ with:
+ name: ${{ inputs.engine-artifact }}
+ path: desktop/public
+
- name: Build the SDK the games are bundled against
run: pnpm --filter ./sdk build
@@ -273,6 +286,13 @@ jobs:
tag: ${{ steps.src.outputs.tag }}
token: ${{ secrets.GITHUB_TOKEN }}
+ - name: Take the engine this run built, for the cook to derive shader twins with
+ if: inputs.engine-artifact != ''
+ uses: actions/download-artifact@v8
+ with:
+ name: ${{ inputs.engine-artifact }}
+ path: desktop/public
+
- name: Build the SDK the games are bundled against
run: pnpm --filter ./sdk build
diff --git a/.github/workflows/release-desktop.yml b/.github/workflows/release-desktop.yml
index d7da901fb..ead452bff 100644
--- a/.github/workflows/release-desktop.yml
+++ b/.github/workflows/release-desktop.yml
@@ -325,9 +325,11 @@ jobs:
# its own frame. Reporting and gating are separate jobs; this one reports.
smoke-templates:
name: Boot the templates this release will publish
- needs: [draft, native-templates]
+ needs: [draft, native-templates, engine]
if: github.event_name == 'push' && needs.draft.result == 'success'
uses: ./.github/workflows/native-smoke.yml
+ with:
+ engine-artifact: engine-wasm
# One job holds every archive, so only it can describe the set: the index
# carries a digest per template, and the editor refuses a download that does not
diff --git a/tools/verify-native-boot.mjs b/tools/verify-native-boot.mjs
index 296a70fb0..f2caf666c 100644
--- a/tools/verify-native-boot.mjs
+++ b/tools/verify-native-boot.mjs
@@ -106,6 +106,22 @@ const FRAME_NOT_JUDGED = {
'event-system': 'its first sprite needs 1.5 s of simulated time, which a loaded runner reaches later than the wall clock does',
};
+/**
+ * The same admission for one platform alone: the Android emulator of a runner with no GPU rasterizes on the CPU, and what a scene costs
+ * there is not what it costs on a phone. Named by what was measured, not by how heavy a scene looks.
+ */
+const FRAME_NOT_JUDGED_ON = {
+ android: {
+ // One frame in the 45 s the first launch has, a flat one; the relaunch that follows a "too slow" finds the emulator's GPU thread
+ // hung ("Timeout when waiting for the Qsri fence") and never reports ready. The iOS simulator, on the host's GPU, judges its frame.
+ 'cyber-rooftop': 'a lit 3D night city draws one frame in 45 s on the emulator\'s software rasterizer, and the relaunch that asks for more hangs it',
+ },
+};
+/** Why @p name's frame is not counted on this platform, or undefined when it is. */
+function frameNotJudged(name) {
+ return FRAME_NOT_JUDGED[name] ?? FRAME_NOT_JUDGED_ON[opts.platform]?.[name];
+}
+
function parseArgs(argv) {
const opts = {
platform: 'android', timeout: 120, settle: 3, frames: 30,
@@ -866,10 +882,10 @@ for (const name of examples) {
try {
const { app, work, appId } = packageExample(driver, name, opts);
APP_ID = appId;
- r = await verifyApp(driver, app, name, opts, !FRAME_NOT_JUDGED[name]);
+ r = await verifyApp(driver, app, name, opts, !frameNotJudged(name));
if (worthAnotherLaunch(r)) {
const first = retainFirstLaunch(r, opts.out, `${driver.name}-${name}`);
- r = await verifyApp(driver, app, name, opts, !FRAME_NOT_JUDGED[name], 2);
+ r = await verifyApp(driver, app, name, opts, !frameNotJudged(name), 2);
r.firstTry = first;
}
// Each APK carries the whole runtime template; keeping 40 of them around
@@ -879,7 +895,7 @@ for (const name of examples) {
r = { ok: false, why: err.message, log: '', colors: 0, frames: 0, unjudged: null, size: '-' };
}
results.push({ name, ...r });
- const frameNote = FRAME_NOT_JUDGED[name] ? ' (frame not judged)'
+ const frameNote = frameNotJudged(name) ? ' (frame not judged)'
: r.unjudged ? ` — ${r.unjudged}` : '';
// What the first launch said, kept in the line: a run that needed two is not
// the same event as one that needed one, and a name that starts appearing
@@ -921,10 +937,10 @@ if (known.length) {
console.log(`\n${known.length} example(s) are recorded as already broken:`);
for (const name of known) console.log(` ${name} — ${KNOWN_FAILURES[name]}`);
}
-const unjudged = Object.keys(FRAME_NOT_JUDGED).filter((n) => examples.includes(n));
+const unjudged = examples.filter((n) => frameNotJudged(n));
if (unjudged.length) {
console.log(`\n${unjudged.length} example(s) launched but had their frame taken on trust:`);
- for (const name of unjudged) console.log(` ${name} — ${FRAME_NOT_JUDGED[name]}`);
+ for (const name of unjudged) console.log(` ${name} — ${frameNotJudged(name)}`);
}
for (const r of brokeUnexpectedly) {