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
test(build): the harness list is checked from the side that let two through
esengine75002ab3a472
diff --git a/.github/workflows/build.yml b/.github/workflows/build.ymlindex e280157a3..b16696a2f 100644--- a/.github/workflows/build.yml+++ b/.github/workflows/build.yml@@ -29,7 +29,7 @@ env:test_registry_ondestroy test_view_api_matrixtest_shader_device test_draw_params test_texture_fb test_buffer_devicetest_compressed_format test_batch_builder test_boundary_span test_webgpu_device- test_text_edit test_render_graph+ test_text_edit test_render_graph test_device_loss test_physics_interpolationjobs:build-emscripten:diff --git a/tools/check-cpp-tests.mjs b/tools/check-cpp-tests.mjsindex c368ba843..b8712ad32 100644--- a/tools/check-cpp-tests.mjs+++ b/tools/check-cpp-tests.mjs@@ -38,19 +38,39 @@ function harnessTargets() {return block[1].split(/\s+/).filter(Boolean);}+/** Every harness the test tree declares — the set CI's list has to cover. */+function declaredHarnesses() {+ const cmake = readFileSync(path.join(ROOT, 'tests', 'CMakeLists.txt'), 'utf8');+ return [...cmake.matchAll(/add_test\(NAME\s+(\w+)/g)].map((m) => m[1]);+}+/** Targets that link the engine library, which does not build off emscripten. */function enginelinked() {const cmake = readFileSync(path.join(ROOT, 'tests', 'CMakeLists.txt'), 'utf8');return new Set([...cmake.matchAll(/target_link_libraries\((\w+)\s+PRIVATE\s+esengine\)/g)].map((m) => m[1]));}+const targets = harnessTargets();++// The other direction, and the one that actually bit: CI's list is treated as+// authoritative everywhere, so a harness the test tree declares but the list+// omits is built by nobody and run by nobody — the exact failure the list was+// introduced to end, arriving from the side it does not look at.+// `test_device_loss` sat there. This half needs no compiler, so unlike the+// build below it runs on every machine.+const uncovered = declaredHarnesses().filter((t) => !targets.includes(t));+if (uncovered.length) {+ console.error(`check-cpp-tests: tests/CMakeLists.txt declares ${uncovered.join(', ')},`+ + " which build.yml's CPP_TESTS does not name — CI builds and runs neither.");+ process.exit(1);+}+const has = (cmd) => spawnSync(cmd, ['--version'], { stdio: 'ignore' }).status === 0;if (!has('cmake')) {console.log('check-cpp-tests: no cmake on this machine — skipped (CI still builds them).');process.exit(0);}-const targets = harnessTargets();const skip = enginelinked();const buildable = targets.filter((t) => !skip.has(t));