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.

ci(release): a release waits for its templates to boot - a template that fails on a device holds the release as a draft, and an example the emulator is too slow to judge is a warning, not a stop

yhhd7188beceae7
diff --git a/.github/workflows/native-smoke.yml b/.github/workflows/native-smoke.yml
index 643bd76ea..acbdd25ad 100644
--- a/.github/workflows/native-smoke.yml
+++ b/.github/workflows/native-smoke.yml
@@ -59,6 +59,10 @@ on:
required: false
default: ''
type: string
+ unanswered-passes:
+ required: false
+ default: false
+ type: boolean
permissions:
contents: read
@@ -235,6 +239,7 @@ jobs:
--shard ${{ matrix.shard }}/3
${{ steps.src.outputs.tag == '' && '--recreate' || '' }}
${{ inputs.examples && format('--only {0}', inputs.examples) || '' }}
+ ${{ inputs.unanswered-passes && '--unanswered-passes' || '' }}
- name: Keep the frames and the records
if: always()
@@ -303,6 +308,7 @@ jobs:
node tools/verify-native-boot.mjs --platform ios --examples all
--device "$IOS_DEVICE" --shard ${{ matrix.shard }}/3
${{ inputs.examples && format('--only {0}', inputs.examples) || '' }}
+ ${{ inputs.unanswered-passes && '--unanswered-passes' || '' }}
- name: Keep the frames and the records
if: always()
diff --git a/.github/workflows/release-desktop.yml b/.github/workflows/release-desktop.yml
index ead452bff..32c02c4eb 100644
--- a/.github/workflows/release-desktop.yml
+++ b/.github/workflows/release-desktop.yml
@@ -319,10 +319,6 @@ jobs:
path: artifacts/*.zip
retention-days: 3
- # The boot, and nothing waits on it. It is the only check that starts a template
- # on a device — v0.61.0's found two runtime errors no web gate can see, each on
- # BOTH platforms — and it has also stopped three correct releases by misreading
- # 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, engine]
@@ -330,11 +326,11 @@ jobs:
uses: ./.github/workflows/native-smoke.yml
with:
engine-artifact: engine-wasm
+ unanswered-passes: true
# 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
- # match it. smoke-templates is deliberately NOT in `needs`: a boot that misreads
- # a frame must not leave a finished release sitting as a draft.
+ # match it.
publish-templates:
needs: [draft, native-templates]
if: github.event_name == 'push' && needs.draft.result == 'success'
@@ -676,11 +672,12 @@ jobs:
# `release: published`, when the assets are final and downloadable by tag.
publish:
name: Publish the release
- needs: [draft, release, publish-templates, publish-external-tools]
+ needs: [draft, release, publish-templates, publish-external-tools, smoke-templates]
if: >-
github.event_name == 'push' &&
needs.release.result == 'success' &&
needs.publish-templates.result == 'success' &&
+ needs.smoke-templates.result == 'success' &&
needs.publish-external-tools.result == 'success'
runs-on: ubuntu-latest
timeout-minutes: 10
diff --git a/tools/verify-native-boot.mjs b/tools/verify-native-boot.mjs
index 31390f935..2a4aeadfd 100644
--- a/tools/verify-native-boot.mjs
+++ b/tools/verify-native-boot.mjs
@@ -143,6 +143,7 @@ function parseArgs(argv) {
if (key === 'allow-skip') { opts.allowSkip = true; continue; }
if (key === 'no-frame-judge') { opts.frameJudge = false; continue; }
if (key === 'recreate') { opts.recreate = true; continue; }
+ if (key === 'unanswered-passes') { opts.unansweredPasses = true; continue; }
opts[key.replace(/-([a-z])/g, (_, c) => c.toUpperCase())] = argv[++i];
}
opts.timeout = Number(opts.timeout);
@@ -975,6 +976,10 @@ if (brokeUnexpectedly.length || fixedUnexpectedly.length) {
if (exitCodeFor(results, (r) => !!KNOWN_FAILURES[r.name]) === 2) {
console.error(`\n— UNANSWERED: ${tooSlow.length} example(s) reached no judged frame in two launches`);
for (const r of tooSlow) console.error(` ${r.name} — ${r.unjudged}`);
+ if (opts.unansweredPasses) {
+ console.log(`::warning::${tooSlow.length} example(s) unanswered on ${driver.name}: ${tooSlow.map((r) => r.name).join(', ')}`);
+ process.exit(0);
+ }
process.exit(2);
}