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.

refactor(ci): desktop takes its corpus from the golden registry

esengine52703d711f48
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 20b814208..2177bbb29 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -682,4 +682,4 @@ jobs:
- name: A game packaged from it renders
run: |
ls -l /usr/share/vulkan/icd.d/ || true
- xvfb-run -a --server-args="-screen 0 1280x720x24" node tools/verify-desktop-render.mjs --examples hello-world
+ xvfb-run -a --server-args="-screen 0 1280x720x24" node tools/verify-desktop-render.mjs --tier pr
diff --git a/.github/workflows/release-desktop.yml b/.github/workflows/release-desktop.yml
index ab6c99e9c..18da7c506 100644
--- a/.github/workflows/release-desktop.yml
+++ b/.github/workflows/release-desktop.yml
@@ -237,9 +237,13 @@ jobs:
# DRAWS. These two runners are the platforms themselves, so the pixel judge
# the web target has always had finally reaches the native runtime — no
# simulator, no device (docs/REARCH_STEAM.md 6.2).
+ # The corpus comes from the golden registry, so "desktop is covered" names the
+ # same games the web and mini-game launchers carry. Pinned to the PR tier
+ # until a nightly has shown the heavier ones (spine, multiplayer) package and
+ # run on these platforms — a release gate is the wrong place to find out.
- name: A game packaged from it renders
if: matrix.name == 'macos' || matrix.name == 'windows'
- run: node tools/verify-desktop-render.mjs --examples hello-world,particle-demo
+ run: node tools/verify-desktop-render.mjs --tier pr
# Under a virtual display, on a software Vulkan driver: an ubuntu runner has
# neither a screen nor a GPU, and the judge reads PIXELS — so give it the two
@@ -251,7 +255,7 @@ jobs:
# an ICD file by hand is how a driver stops being found at all, and the
# symptom is Vulkan reporting no surface extension.
ls -l /usr/share/vulkan/icd.d/ || true
- xvfb-run -a --server-args="-screen 0 1280x720x24" node tools/verify-desktop-render.mjs --examples hello-world
+ xvfb-run -a --server-args="-screen 0 1280x720x24" node tools/verify-desktop-render.mjs --tier pr
- name: Upload template artifact
uses: actions/upload-artifact@v7
diff --git a/tools/verify-desktop-render.mjs b/tools/verify-desktop-render.mjs
index 07f9c6d63..3446f4748 100644
--- a/tools/verify-desktop-render.mjs
+++ b/tools/verify-desktop-render.mjs
@@ -15,6 +15,7 @@
* as the web render checks do. Nothing here re-decides what "drew" means — a
* second threshold would be a second answer to one question.
*
+ * node tools/verify-desktop-render.mjs --tier pr
* node tools/verify-desktop-render.mjs --examples hello-world,particle-demo
* node tools/verify-desktop-render.mjs --project examples/hello-world
*
@@ -27,6 +28,7 @@ import { tmpdir } from 'node:os';
import path from 'node:path';
import { fileURLToPath } from 'node:url';
import { installedTemplateDir } from '../build-tools/utils/nativeTemplate.js';
+import { atTier, projectDir } from './goldenProjects.mjs';
const ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
const HOST_OS = process.platform === 'darwin' ? 'macos' : process.platform === 'win32' ? 'windows' : 'linux';
@@ -96,9 +98,31 @@ if (!templateDir || !existsSync(templateDir)) {
process.exit(1);
}
+/** Golden projects at `tier` that ask for a desktop package. A tier nobody spells
+ * right is a workflow typo, and it should read as one rather than as a stack. */
+function goldenDesktopProjects(tier) {
+ try {
+ return atTier(tier).filter((g) => g.targets.includes('desktop')).map((g) => projectDir(g.id));
+ } catch (err) {
+ console.error(`✗ ${err.message}`);
+ process.exit(2);
+ }
+}
+
+// `--tier` takes the corpus from the golden registry — the same projects the web
+// and mini-game launchers carry, so "desktop is covered" means the same set of
+// games rather than whichever two were named here years ago.
const projects = opts.project
? [path.resolve(opts.project)]
- : opts.examples.split(',').map((n) => path.join(ROOT, 'examples', n.trim()));
+ : opts.tier
+ ? goldenDesktopProjects(opts.tier)
+ : opts.examples.split(',').map((n) => path.join(ROOT, 'examples', n.trim()));
+
+if (projects.length === 0) {
+ console.error(`✗ no projects selected${opts.tier ? ` — no golden project at tier "${opts.tier}" targets desktop` : ''}`);
+ process.exit(1);
+}
+console.log(`${projects.length} project(s)${opts.tier ? ` (golden ${opts.tier})` : ''}`);
const work = mkdtempSync(path.join(tmpdir(), 'estella-desktop-render-'));
let failed = 0;