Every change ships with tests, and every suite runs the same way on any machine: inside the Docker images under docker/, through tools/build.sh. This page lists
the suites, how to run them, where a new test goes, and the rules that keep a green run honest.
The design and acceptance record is docs/specs/S02-build-ci-tests.md.
| Suite | What it covers | Run it | Results |
|---|---|---|---|
jasperengine-core-tests |
engine code (engine/core, engine/renders) against the static engine: ECS, math, registry, shaders, render state, utilities, the job system, allocators, asset I/O, the pose animation core (pose/) and the animation clips core (animation/: clip IO, sampling, binding, the clip pool and the Animation Player, on a temporary asset root around each of its tests); *Gpu suites render into a headless device |
tools/build.sh unit-tests |
build/test-results/core.xml |
jasperengine-editor-tests |
editor logic (editor/): scene serialization (Stream), undo (CommandHistory, the S24 suites CommandHistoryTests, UndoTimelineTests, PrefabUndoTests, PlayChangeReviewTests, CommandHistoryBench), the asset database, Physics Placement, FBX import, texture synthesis, the Pose Animation window's logic and templates (pose/), animation clip documents, the clip controller, Record and the converters (animation/); and in editor/tests/engine/ engine code driven through the editor's shared engine (physics sync and shapes, placement worlds, convex decomposition, actions, shader and texture keys, water, terrain) |
tools/build.sh unit-tests |
build/test-results/editor.xml |
jasperengine-htmlui-tests |
the HTML/CSS UI, with its golden images | tools/build.sh htmlui-tests (HTMLUI_BACKEND=vulkan) |
build/test-results/htmlui-<backend>.xml |
jasperengine-htmlui-editor-tests |
the HTML UI importers against a local HTTP fixture server | tools/build.sh htmlui-editor-tests |
build/test-results/htmlui-editor.xml |
| MCP tests | the editor's MCP server, driven like an agent (tools/mcp/tests/test_*.py) |
tools/build.sh linux, then tools/build.sh mcp-tests -j 2 |
build/test-results/mcp.json |
| Benchmarks | the job system's and the allocators' budgets (S06 R23-R26): je-bench-jobs, je-bench-memory, gated by tools/perf/check_bench.py against tools/perf/bench-thresholds.json |
docs/jobs-memory.md (on an otherwise idle machine) |
their --json files |
| Foliage (T5) | placement, cull, tree store, rules (Foliage*, TreeStore*: core CPU), the system (FoliageSystemCore, FoliageTreesCore, FoliageRuntime), the draws (FoliageGpu: goldens in engine/tests/core/render/golden/foliage_*), je-bench-foliage, tools/mcp/tests/test_foliage*.py; docs/specs/checklists/T5.md by hand |
UNIT_SUITE=core UNIT_TEST_ARGS=--gtest_filter='Foliage*:TreeStore*' tools/build.sh unit-tests; MCP_SUITE=all tools/build.sh mcp-tests -k foliage -j 2 |
docs/perf/foliage.md |
| Terrain budgets (T1) | the stamps, whole-map ops, queries, refit and runtime edits (je-bench-terrain, gated by tools/perf/check_bench.py), the delta step (TerrainDeltaBench: editor, budgets under JASPER_TEST_PERF_SLACK), the player's growth (tools/perf/terrain_size.py); pen tablets by hand, docs/specs/checklists/T1.md |
cmake --build <core-tests tree> --target je-bench-terrain, run it with --json, then check_bench.py; UNIT_SUITE=editor UNIT_TEST_ARGS=--gtest_filter='TerrainDeltaBench.*' tools/build.sh unit-tests |
docs/perf/terrain.md |
| Animator benchmark on WebAssembly | je-bench-anim under node in the web image, with and without -msimd128 (S77 R11); tools/perf/check_bench.py gates the owner's budgets as je-bench-anim-wasm |
tools/perf/bench-anim-wasm.sh, results read in docs/perf/animator.md |
build/test-results/anim-wasm/ |
| Smoke test | export, build and run a project, then open it in the editor; screenshots | tools/smoke-test.sh tools/fixtures/post-processing |
build/smoke/ |
| Upgrade from origin/main | a game an origin/main editor made (tools/test-projects/upgrade-from-main) opened, migrated, played, exported for Linux and the web in this editor, against the old editor's transcripts (upgrading-from-main.md) |
tools/build.sh linux, then tools/ci/upgrade_from_main/check.sh (the editor part also in the MCP suite: test_upgrade_from_main.py) |
build/upgrade-from-main/check/report.md |
| Web gate | the web build in headless Chrome (WebGL2 on SwiftShader) | tools/build.sh web, then tools/build.sh web-gate |
build/test-results/web/ |
| Android render gate | an APK on the Android emulator: logcat, GLES errors, and the screen against goldens (a lit 3D scene, 2D/UI, HTML UI) | ANDROID_PROJECT=render-gate ANDROID_ABIS=x86_64 tools/build.sh android, then tools/android-emulator-test.sh (below; KVM servers A and C) |
build/android-emulator/<scene>/ |
| Crash diagnostics | the crash handler's report folders, sessions, hook and ring, the hang watchdog (HangWatchdog.*, Crash* in jasperengine-core-tests, which start jasperengine-crash-test, engine/tests/crash/CrashTestMain.cpp), the symbolication tool, the web crash hooks |
tools/build.sh unit-tests; python3 -I tools/crash/test_symbolicate.py <jasperengine-crash-test>; WEB_PROJECT=crash-diagnostics tools/build.sh web, then GATE=crash-diagnostics tools/build.sh web-gate |
as above |
| Android packaging | what Build makes for Android, run for real: APK and App Bundle from the prebuilt player, the bundletool download (real URL), the debug and release keys, wrong passwords, publish prepare, then both installed on the emulator and their screens compared with the golden |
tools/ci/android_packaging.sh (needs tools/build.sh linux, the Android player; KVM: server A) |
build/android-packaging/ |
| iOS packaging | what Build makes for iOS on a Mac: the Xcode project through xcodebuild, installed and launched on a simulator device of its own (no window), a device build as far as signing, the IPA path without a developer account, publish prepare |
tools/ci/ios_packaging.sh (needs the editor on a Mac with Xcode, tools/players/ios_player.sh; IOS_PACKAGING_GOLDEN=1 compares the screen with tools/fixtures/unified-lighting/golden/ios/screen.png, from an iPhone 17 simulator) |
build/ios-packaging/ |
| Tool checks | the shader lint, the CI scripts' own tests, the presets, the HTML UI golden ledger, the exported projects' jasperengine.py, C++ scripts linking Box2D and Jolt (run it on Windows and macOS by hand: nothing else checks those), the Android Gradle files |
python3 tools/ci/test_check_shader_lod.py (with python3 tools/check_shader_lod.py: no implicit derivatives in a shader loop with a per-fragment exit or branch), python3 tools/ci/test_gtest_gate.py, python3 -I tools/ci/test_pr_evidence.py, python3 tools/ci/test_smoke_jit_hangs.py, python3 tools/ci/test_android_screen_check.py, python3 tools/ci/test_check_notices.py, python3 tools/ci/test_jasperengine_py.py, python3 tools/ci/check-script-physics-link.py <editor>, python3 tools/ci/test_check_gradle_warnings.py (and tools/build.sh android runs check_gradle_warnings.py on its Gradle log: a deprecation in our Gradle files fails the build), python3 tools/ci/test_check_golden_ledger.py, python3 tools/htmlui/check_golden_ledger.py, python3 tools/check-editor-modals.py (--self-test), tools/build.sh exec linux tools/ci/check-presets.sh, python3 tools/procmat/test_import_mm_nodes.py (S90's node importer: licences, the deny-list, what is data) |
stdout |
The only host requirement is Docker. Builds go to build/<target>/, a ccache shared by every
worktree of a checkout makes rebuilds cheap.
Each image is tagged jasperengine/<target>-build:<hash>, the first 12 hex digits of a sha256 over
its Dockerfile and what that COPYs or ADDs from docker/; :latest names the newest build.
Worktrees with different Dockerfiles therefore keep one image each instead of retagging one name
back and forth (a rebuild on every switch, and an untagged image that docker image prune deletes
under a job still running it by id). The containers run the image by id.
Builds jasperengine-core-tests in the standalone engine tree (build/linux/core-tests, preset
engine-linux-tests, RelWithDebInfo) and jasperengine-editor-tests in the editor tree
(build/linux/editor-tests, preset linux-ci), runs both under Xvfb, and puts each result
through the gate (below). The test targets start their X server with tools/with-xvfb.sh, not
xvfb-run: xvfb-run waits forever when Xvfb signals ready before its wait starts (a loaded
builder), whereas the helper reads the display from Xvfb -displayfd within XVFB_TIMEOUT
seconds (30). An unfiltered run must execute at least 300 core and 150 editor tests,
with none skipped.
tools/build.sh unit-tests # both binaries
UNIT_SUITE=core tools/build.sh unit-tests # one of them (core or editor)
UNIT_TEST_ARGS='--gtest_filter=Matrix4.*' tools/build.sh unit-tests
GRAPHIC_BACKEND=vulkan UNIT_SUITE=core tools/build.sh unit-tests # GPU suites on lavapipe
GRAPHIC_BACKEND=gles3 UNIT_SUITE=core tools/build.sh unit-tests # GPU suites in an OpenGL ES 3.2 context (llvmpipe, linux-backends image)
WERROR=1 tools/build.sh unit-tests
RUN=0 tools/build.sh unit-tests # build only
UNIT_SHARD=1/2 UNIT_SUITE=editor tools/build.sh unit-tests # shard 1 of 2 of the selected tests
UNIT_PROCESSES=6 tools/build.sh unit-tests # each binary in 6 processes, one after another
UNIT_BUILD_PART=1/2 UNIT_SUITE=editor tools/build.sh unit-tests # compile part 1 of 2 of the objects, then stopUNIT_SHARD=K/N runs whole suites, balanced by test count, out of what the filter selects (the filter
minus the other shards' suites; single tests when there are fewer suites than shards, all of them in
every shard when there are fewer tests), so no shard runs nothing; an unfiltered shard must reach its
share of the counts above. UNIT_PROCESSES=N runs each binary's tests as N such shards, one process
after another, each with its own <result>-<k>.xml (the nightly's TSan lane: its runtime keeps
everything a process ever allocated and every stack it recorded, so one process over the whole editor
suite reached 15 GB where none of the suite needs more than 1.7 GB without TSan).
UNIT_BUILD_PART=K/N compiles every Nth object of the binary's compile
steps (ninja -t commands, sorted), the same part in every tree of one configure, through
unit-part.ninja: build.ninja without the libraries and executables CMake makes compiles and code
generators wait for (order-only), so a part links nothing. CI's editor parts share them through ccache
(below, "CI"). Both are tools/ci/unit_split.py
(python3 -I tools/ci/test_unit_split.py).
The binaries also register with CTest (ctest --preset linux-ci in an IDE build), labelled
unit, gpu and slow by suite name.
Picking (S26): JASPER_PICK_SIMD=scalar|avx2|neon forces the mesh BVH's slab test path; MeshPose.MatchesGpuSkinning is a GPU suite (the
CPU pose against the skinned shaders, glcore and Vulkan). JASPER_PICK_BUILD_DELAY_MS=<ms> holds
every background mesh BVH build pending that long (the wait runs on a blocking thread, so it holds no
Background gate slot other loads queue for): the MCP tests use it to see the Scene view's
waiting click and refused drop (tools/mcp/tests/test_scene_view*.py).
JASPER_TEXTURE_LOAD_DELAY_MS=<ms> holds every async texture decode that long: a screenshot must
then wait for the texture, never show its stand-in (tools/mcp/tests/test_screenshot_waits.py).
JASPER_SHADER_LIST_SYNC_MS=<ms> is the time get_build_info may read closed scenes before it hands
the rest to a job; 0 always hands them over (tools/mcp/tests/test_shader_lists.py).
JASPER_SHADER_LIST_WRITE_HOLD_FILE=<path> holds the write of that cache while the file exists, up to 20 s (same test).
JASPER_TEST_RECORDER_FAIL=<list> forces Recorder failures (editor/recorder/RecorderSettings.h): audio@N,
audio-header, video@N, encoder-kill@N, mux, png@N, publish (they read as a full disk),
hold-limit=<ms> (the wait for a frame's loads), stall-limit=<ms> (the wait for a game frame) and free=<MB>
(the free space seen); read once per
recording, nothing when unset (tools/mcp/tests/test_recorder_integrity.py).
JASPER_MESH_LOAD_HOLD_FILE=<path> holds the first load (the binding) of the meshes of a scene that
loaded a model in the background while that file exists, so what else loads the same model meanwhile
(a Project window thumbnail's preview) comes first (tools/mcp/tests/test_model_texture_bind.py).
JASPER_TEST_MCP_LOG_MAX_BYTES=<bytes> lowers the MCP call log's 16 MB rotation size (test_call_log in tools/mcp/tests/test_protocol.py).
JASPER_TEST_MATERIAL_THUMBNAIL_STUCK=<project-relative file> keeps a material thumbnail loading while that file exists (test_material_thumbnail.py).
JASPER_TEST_TRANSITION_TWIN_SKEW=<coverage> shifts the CPU evaluation a transition capture's transition_edges compares the frames with, for the lint's red path (tools/mcp/tests/test_contact_sheet.py).
JASPER_TEST_STAGING_HOLD=<path> holds a Project Hub import or template copy with part of its files in
its staging folder while that file exists, after creating <path>.held: the tests kill the editor
there (CrashLeftovers.* in editor/tests/hub/HubTest.cpp, tools/mcp/tests/test_crash_leftovers.py).
JASPER_UI_LAYOUT_AUDIT=<file> has the editor write, each time they change, the layout findings of its last frame
(editor/util/UiLayoutAudit.h): text drawn over other text, text cut off by its box and labels wider than their
widget, read from the frame's glyphs and ImGui's label hooks; a UI sweep opens each surface at several UI scales and
window sizes and reads them (UiLayoutAudit.* in editor/tests/util/UiLayoutAuditTest.cpp).
tools/build.sh htmlui-tests: about 3,300 tests, 74 of them skipped on purpose (the gate allows exactly those).HTMLUI_TEST_ARGSfilters,JASPER_HTMLUI_PERF_SLACKrelaxes the performance targets on a loaded host;MarkdownHtml.Perf20KBis enforced only when it is set (below, Writing load-robust tests).- The HTML UI rendering suites of S16 (
docs/specs/S16-ui-render-text.md):RenderBatch.*,RenderClip.*,RenderPrimitive.*,TextSharpness.*,TestFontEngine.AtlasBudget*and, in Release builds, the benchmarkHtmlUIRenderPerf.*(fixtures/bench/; results inbuild/linux/htmlui-render-bench[-vulkan].json, the table indocs/html-ui/render-benchmark.md; its timings are judged on an otherwise idle machine). Changed HTML UI goldens need a row indocs/html-ui/goldens-S16.md:python3 tools/htmlui/check_golden_ledger.py(tested bytools/ci/test_check_golden_ledger.py) fails on a changed golden without one and on any change of a Chromium reference (golden/browser/**). tools/build.sh mcp-testsrunstools/mcp/run-tests.shin the Linux image againstbuild/linux/editor-install.MCP_SUITE=ci(the default) runs the files that declareCI = True(tools/ci/check-mcp-ci-suite.py, run by check-changed: every file is classified, docs/mcp/README.md);MCP_SUITE=allruns every file and needs the default fixture project, which is not in git:JASPER_FIXTURE, elsebuild/fixture-unityof the checkout or the main checkout, else~/je/fixture-unity(the build servers' copy), mounted at/fixture. The harness looks in the same places (harness.default_fixture()); without a fixture, the tests that need it skip and say where they looked.MCP_SUITE=allfirst builds the mesh-raycast web test project (build/web-mesh-raycast, the web image; up to date after the first time) fortest_mesh_raycast.py's web latency gate. The Linux image carries the suite's test tools (lua-language-server, clangd, FFmpeg with AV1, chrome-headless-shell), so none of their tests skips there. Seedocs/mcp/README.mdfor writing MCP tests. A project the harness creates (Editor(create=True)) keeps the flat layout the tests are written against, its assets and scripts at its root: the harness setsJASPER_TEST_FLAT_NEW_PROJECT=1unless the test passesenv={"JASPER_TEST_FLAT_NEW_PROJECT": "0"}, which gives a new project's real layout (assets/,scripts/,test_asset_stripping.py).test_audio_meter.pytakes no editor: it compilesengine/tests/core/audio/AudioMeterProbe.cppwithAudioMeter.cppandTruePeak.cppalone (so it needs a C++ compiler; FFmpeg decodes the fixtures) and compares the meter with pyloudnorm (uv run --with, pinned in the test).- An MCP test asserts behaviour; a wall-clock budget (a CLI start in 300 ms, a reload frame under
16 ms, ...) goes through
harness.over_budget(what, measures, budget), which prints a[bench]line and fails only whenJASPER_MCP_PERF_SLACKis set: a shared build server's load alone misses those budgets. The benchmark run enforces them on a quiet machine, with nothing else running:JASPER_MCP_PERF_SLACK=1 tools/build.sh mcp-tests tools/mcp/tests/test_call_cli.py tools/mcp/tests/test_hot_reload.py tools/mcp/tests/test_checks.py. - Compiled and prebuilt game builds: see the next section.
- With
-j Nthe runner starts the longest files first. It orders them by each file's wall time in the last unfiltered run (build/test-results/mcp-file-seconds.json); files with no time yet go first. So no long file starts last and alone. Each file has its own process, editor and scratch directory, so the order changes nothing a test sees. SMOKE_METHOD=build SMOKE_PLAY=1 tools/smoke-test.sh tools/fixtures/title3d-fixed: a Compile build with only the engine modules the project needs (jasperengine-editor build --method compile): a fixed-text Realtime 3D title without the mesher, checked against the editor's frame.tools/smoke-test.sh <project>: see its header. It also checks that the exported project configures as a user's game does: no presets file, no warnings as errors, no sanitizer. A hang watchdog report fails it, with one exception: on a project's first editor open, when every report's stack is llvmpipe's JIT inside a draw (tools/ci/smoke_jit_hangs.py), it opens the editor again with the Mesa disk cache warm, and that open must have no hang at all. A software GL compiles a program's variant at its first draw on the render thread (S32 deviation 6), and a scene of many Lit variants holds that frame 7-9 s (tools/fixtures/pbr-extended-export; S32, Progress).tools/build.sh web-gateservesbuild/webwith cross-origin isolation, opensjasperengine-project.html?jasperengine_ready_signal=1in the web image's pinned Chrome for Testing headless shell, and fails on an uncaught exception, a console error, an engine error line, a missing ready line, or a centre pixel orcrossOriginIsolatedthat differ fromtools/web/gates/sample-project.json.GATE=sample-project-threadschecks the pthreads build (WEB_THREADS=1 tools/build.sh web).tools/web/serve.pyserves a build the same way for a look in a desktop browser.- A gate baseline can also list
consolelines ({"text", "level"},"ordered": true): each must appear at that console level (log, info, warning, error), in order; an error listed there is expected and fails nothing.GATE=core-utilities(afterBUILD_TYPE=Release WEB_PROJECT=core-utilities tools/build.sh web) checks the logger's browser console sink and a LuaTimerthat way, and the Culling Group and Simulation Culling evaluation p99 against their release web budgets. GATE=mesh-raycast(afterBUILD_TYPE=Release WEB_PROJECT=mesh-raycast tools/build.sh web: its budgets are release figures) times 10,000 MeshRaycast rays against 1,000 meshes in WebAssembly and fails on a p99 over 4 ms (S26 AC17), then 10,000 overlap queries of each kind against 0.04 ms (spatial-queries AC15).- The other test projects with a gate:
atmosphere(S12),post-fx(S13),pcss(PCSS's two views of the shadow atlas in one WebGL2 draw, the Ultra tier's contact hardening) andterrain, a terrain displaced by a 16-bit heightmap, which WebGL2 and GLES3 cannot sample as R16 (the renderer uploads it as R32F or R16F there).terrain-editruns the op sequences ofTerrainGolden.*in WebAssembly and fails when their digest differs from the one the native core suite pins (T1 AC5).foliagehashes T5's placement fixture the same way, then fills a new ring after a camera jump with one thread, within 4 ms a frame at the p99 (T5 AC1, AC4). GATE=web-keys-audio(afterWEB_PROJECT=web-keys-audio tools/build.sh web) runs Chrome with the desktop autoplay policy (chrome_flagsin the baseline): the page's audio is suspended until the first key press (keys: trusted CDP key events,eval_before_inputbefore them,evalafter), and Meta, ContextMenu and events without a code reach the game as their engine keys.GATE=web-pointer(afterWEB_PROJECT=web-pointer tools/build.sh web) drags mouse presses off a canvas smaller than the window (drags: trusted CDP mouse events): each release reaches the game once, clamped to the canvas (S93 R2).GATE=pixel-perfect(afterWEB_PROJECT=pixel-perfect tools/build.sh web) runs at a device scale factor of 2 and checks that a Pixel Perfect Camera sizes the canvas backing store at its CSS size timesdevicePixelRatioand draws it pixelated (S41 AC13).
Compiling a game (Build Method Compile: CMake, then the engine with the game) takes 20 to 60
minutes on a build server. Building one with a prebuilt player runtime (S30, docs/shipping.md)
takes about a second. So an MCP test compiles only when the compile path is what it checks:
-
(a) Compiled (
build_project ... method="compile", and it checksmethod_usediscompile). A deliberate, minimal set, at least one for each target and backend the suite compiles (Linux desktop, glcore):Test Why it compiles test_build.py::test_desktop_build_and_runthe compile path end to end (CMake, the engine, the link, a player that runs), and a broken C++ source's errors parsed as file:line(only a compiler produces them)test_html_ui_effects_export.py::test_desktop_player_draws_the_effectsgraphics.runtime_shaders: false: a compiled game ships without the runtime shader compiler whatever its scripts do (a prebuilt variant leaves it out only when no script can need it, S34), so it shows the exported UI effect variants are all the game needstest_build.py::test_cancel_desktop_build,test_busy.py::test_export_job_refusalsa compile runs long enough to cancel, and to refuse other tools while it runs (a prebuilt build ends first); both are cancelled within seconds test_localization_export.py::test_compiled_game_loads_the_manifestthe generated main of a compiled game loads l10n/manifest.json(a prebuilt player reads it fromgame.json): the String Tables reach a compiled gametest_lifecycle_export.py::test_play_and_export_log_the_same_lifecyclea C++ script's lifecycle in an exported player: C++ scripts ship only in a compiled game -
(b) Prebuilt (
method="prebuilt", and it checksmethod_usedand theplayer_idit used). The test needs a real game that runs, not the compile:test_build.py::test_development_build_crash_report(the Development runtime crashes on purpose and writes its report),test_html_ui_export.py::test_desktop_build_runs_the_document,test_html_ui_video_export.py::test_desktop_build_plays_the_video,test_navigation_export.py::test_desktop_export_ships_navmesh(a baked.navmeshin the build'scontent.jpak, an agent of the headless player reaching its destination from Lua, and the preflight's stale-navmesh warning after static geometry moved; S19 AC27, S74 AC29) andtest_call_cli.py::test_wait_job_build(the CLI's--wait-jobon a build job). The runtime is the onetools/build.sh playersbuilds, from the same engine sources as the editor under test. -
(c) Shared builds: a runtime is built once per suite run for each backend and flavour, and every test and
-jworker shares it (tools/mcp/build_cache.py). A file declares the runtimes its tests use (PREBUILT_PLAYERS = ["glcore-release"]). WithJASPER_SLOW_BUILD=1and no-k, the runner starts building them as the run starts. It starts a file that needs one only once that runtime is built, and runs the other files meanwhile, so no worker waits for a build. A test gets one withawait build_cache.player_runtime(ed, "glcore", "release")(it waits undered.busy()while another worker builds it) and points its editor at it withenv=build_cache.player_env("glcore", "release")(JASPER_PLAYERS_DIR; set it for the editors that build with it only: a players directory changes what Build Method Auto picks).
The cache cannot hide a bug:
- Its key covers everything a runtime is built from. That is the content (not the commit or the
file times) of every file under
engine/,tools/players/andtools/performance/, plustools/ci/check-notices.py,NOTICE.md,LICENSE, the Linux image'sdocker/linux.Dockerfileand the cache's own source. It also covers the exact CMake arguments, the compiler, linker, CMake and Ninja versions, the compiler environment (CC,CXX,CFLAGS, ...), and the editor version the runtime is locked to.python3 tools/mcp/build_cache.py key glcore releaseprints it. - The runtimes are a test's: no GCC link-time optimisation (
-DJASPERENGINE_RELEASE_LTO=OFF, in the key); the rest of the release link (sections, hidden visibility, split symbols) is as shipped. LTO was most of a release runtime's build (its link alone a quarter of an hour on a loaded server) and changes nothing a test of the game checks. The suite keeps one LTO check:test_build.py::test_desktop_build_and_runcompiles a shipped game's release link with LTO, runs the player and checks its compile tree was configured withJASPERENGINE_RELEASE_LINKandJASPERENGINE_RELEASE_LTOon;tools/build.sh playersandtools/build.sh linux's sample project (the gate's WERROR build) link with LTO too. - Shared per machine (
JASPER_MCP_SHARED_BUILD_CACHE=<dir>, whichtools/build.sh mcp-testsmounts at/mcp-build-cache): one entry per runtime and key,<dir>/v1/<runtime id>/<key>/, used by every worktree, stream and run of the machine. One process builds a key (an exclusive lock), every other one that needs it waits for that build; the build goes to a staging directory renamed into place complete, so no reader sees half an entry. A run holds a shared lock on each entry it uses for as long as it runs; the size limit (JASPER_MCP_BUILD_CACHE_MAX_GB, default 15) evicts the least recently used entries nobody holds, and the staging directories of builds that died.python3 tools/mcp/build_cache.py list(orevict) shows them;statussays whether this checkout's runtimes are built. The run'sbuild/linux/mcp-build-cache/<runtime id>/playersis a link to its entry's. - Without a shared cache it lives under the run's build directory, next to the editor under test:
build/linux/mcp-build-cache/<runtime id>/(players/,key.json,build.log;JASPER_MCP_BUILD_CACHEmoves it), and an entry whose key differs from the current one is deleted before anything is built. - Either way a runtime of other sources (another commit, an uncommitted edit) is never reused.
- Each build starts from an empty CMake tree at a fixed path (
build/linux/mcp-build-cache/<runtime id>/tree,/src/...in the image whatever the worktree), throughtools/players/build_linux_player.sh(whattools/build.sh playersruns). Below it, ccache (CCACHE_DIR, as for the editor itself) keys each object on its preprocessed source, compiler, flags and directory; the build's hits and misses go in itskey.jsonand in the run's output. - A failed build fails every test that needs it, with its log, for the rest of the run. The next run tries again.
- The nightly's shards build none of a release's runtimes. When the nightly's
decidejob names a release of the same commit (this run's, or the published one when main did not move), the shards' editor is stamped with its version (JASPERENGINE_VERSION).tools/ci/mcp_shard.shwithMCP_RELEASE_PLAYERSthen fetches that release'slinux-x64-glcore-releasearchive in the background (tools/ci/nightly-mcp-players.sh, which waits for build-release.yml's players-linux artifact). WithJASPER_MCP_RELEASE_PLAYERS=<dir>,build_cache.pywaits for it, installs it with the editor'splayers install, and uses it in place of a build, but only when itsengineVersionis the editor's. Such a runtime is linked with LTO, as shipped. A runtime the release lacks (a development flavour) or one that did not come is built as above. - The compiled games (
method="compile") build through ccache too: their editors getharness.compile_env(name), a user cache (where the kit's compile tree goes) at the fixed pathbuild/mcp-compile-home/<file>/, emptied as the file's first editor starts (not as the file loads: any run's-klisting loads every file), and ccache as CMake's compiler launcher. Each run still configures and compiles a fresh tree and links; an object comes from ccache only when its preprocessed source, flags and directory are those it was made from. They link without LTO (JASPERENGINE_RELEASE_LTO=OFFin the editor's environment, which an exported game's first configure takes as the option's default) excepttest_build.py's (lto=True). - The engine library (S102 AC8): the files that check the compile path itself (
test_build.py,test_compile_without_modules.py,test_build_parity.py:compile_env(..., local=True)) always compile the engine (JASPER_ENGINE_LIBRARY=local). The other compile tests link the run's engine library archives when it names them inJASPER_ENGINE_LIBS_DIR, strictly (prebuilt: a fallback fails the build with its reasons), or with a fallback for another version's archives (R17's override,JASPER_ENGINE_LIBS_ANY_VERSION=1:auto); without archives the editor chooses (tools/mcp/build_cache.pyengine_library_env).
A new test that needs a game that runs builds it prebuilt. One that needs what only a compiled
game has (C++ scripts, ProjectBuild.cmake, capacities above the player's, native plugins a player cannot carry, no runtime
shader compiler, compiler output) compiles, and joins the table above with its reason.
jasperengine-noise-golden (tools/noise/golden: noise, graph and the table, no engine) is the self-check of
T2's one golden table: cmake -S tools/noise/golden -B build/noise-golden -G Ninja -DCMAKE_BUILD_TYPE=Release,
then build/noise-golden/jasperengine-noise-golden --all-backends --report -. It prints
noise-golden <target> <backend> <cases> pass|FAIL table=<hash>, exits 1 on any mismatch, and --self-test must
exit 1. tools/build.sh exec android tools/noise/cross_check.sh runs it on the four Android ABIs (ARM under
qemu-user); --red-contract must fail. WEB_PROJECT=noise tools/build.sh web, then GATE=noise tools/build.sh web-gate,
runs the same table on the web, also with WASM_SIMD=0. python3 tools/noise/check_kernels.py [--self-test] is
the lint for this area, which tools/check-changed does not run. A difference is a kernel bug, never a new
table; record each platform's report in docs/perf/noise.md.
tools/mcp/tests/test_linked_folders_export.py builds and runs a Desktop game with
JASPER_SLOW_BUILD=1. A web game needs the web image, which has no editor, so it takes two steps:
JASPER_LINKED_WEB_EXPORT=build/linked-web tools/mcp/run-tests.sh tools/mcp/tests/test_linked_folders_export.py -k web_export leaves
the source export there (the links resolved into real files), then tools/web/linked_folder_game.sh build/linked-web, in the web
image, builds it and runs tools/web/browser_gate.py on it with tools/web/gates/linked-folder-game.json:
the centre pixel is the linked texture's red and the console has the linked Lua module's line.
tools/test-projects/<name>/ are small engine projects (main.cpp, lua/, assets/) that a
platform test builds instead of engine/project: WEB_PROJECT=<name> tools/build.sh web
(build/web-<name>, checked by GATE=<name> tools/build.sh web-gate with
tools/web/gates/<name>.json) and ANDROID_PROJECT=<name> tools/build.sh android
(build/android-<name>/app-debug.apk, checked by the emulator runner below). Keep one project per
behaviour under test, with its expectations next to it.
Installs an APK on a headless Android emulator, launches it with its LAUNCHER intent and checks
its logcat. It needs KVM: run it on a Linux host with /dev/kvm.
ANDROID_PROJECT=core-utilities tools/build.sh android
tools/android-emulator-test.sh build/android-core-utilities/app-debug.apk --ordered \
--expect-file tools/test-projects/core-utilities/android-expect.txt
tools/android-emulator-test.sh build/android/app-debug.apk --seconds 30 --forbid 'E/JasperEngine'-
The image is
docker/android-emulator.Dockerfile: the Android build image plus the emulator and an x86_64 Automated Test Device system image (EMULATOR_API34,EMULATOR_TAGaosp_atd, build arguments). The first run builds it (about 2 GB). The APK needs the x86_64 ABI, whichtools/build.sh androidbuilds with the others. -
Each run boots from wiped user data (
-no-window -no-snapshot -wipe-data,-gpu $EMULATOR_GPU: see "The emulator's GPU" below), installs the APK with every permission granted, clears logcat, launches the app and polls logcat until every--expectline is there, the app crashes, or--timeout(120 s) passes. -
--view-losssends the app to the background once it is ready (Home), callsam send-trim-memory <package> COMPLETE(APP_CMD_LOW_MEMORY without a window drops the EGL context) and launches it again; the run needs a new view and its expectations from both sides of the return.--once TEXTfails on a second line containing TEXT.tools/test-projects/app-lifecycleuses both (S95 AC-17: an HTML UI document keeps its DOM through the loss); itsmain.cppsays how to lose and restore the WebGL context of its web build by hand. -
--expectmatches alogcat -v tagline:W/JasperEngine: [render] textchecks the priority, the tag and the text.--orderedrequires the order given,--forbidfails on a line,--expect-filereads expectations one per line. AFATAL EXCEPTION, a native crash of the package orFatal signalfails the run. -
Results in
--out(defaultbuild/android-emulator/):result.txt(each expectation, found or missing, then PASS/FAIL),logcat.txt(-v tag),logcat-full.txt(-v threadtime),screen.pngandemulator.log. Exit 0 pass, 1 fail, 2 could not run (no KVM, no boot, the install failed). -
The AVD lives on a tmpfs inside the container (
EMULATOR_TMPFS_GB, default 10; only the pages the run writes use memory), so a run leaves nothing on the host disk but--out. A boot takes about 40 s; a whole run about 70 s. -
EMULATOR_BOOT_TIMEOUT,EMULATOR_MEMORY,EMULATOR_CORESandJASPER_DOCKER_IMAGE(a prebuilt emulator image) tune it.EMULATOR_GPUis passed to-gpu(below). -
--setprop NAME=VALUEsets a system property before each launch. VALUE may hold spaces and: , =(it reaches the device's shell double-quoted; quotes,$, backquotes, backslashes and; | & < > ( )are refused): the player arguments of a Development build go indebug.jasperengine.args.tools/android-emulator-test.sh --self-testchecks that rule. The project test runner's check (docs/game-tests.md, AC13):ANDROID_PROJECT=game-tests tools/build.sh android tools/android-emulator-test.sh build/android-game-tests/app-debug.apk \ --setprop "debug.jasperengine.args=--run-tests --test-filter tag:smoke" \ --expect-file tools/test-projects/game-tests/android-expect.txt -
--ime TEXTwaits for a logcat line containing TEXT (the game focused a text field), savesdumpsys input_methodasime.txt, typesabcdefghand presses Enter;--ime-editor-infonames whatime.txtmust show. The soft keyboard check of text-entry-gamepad-cursor-back-button AC7:ANDROID_PROJECT=input ANDROID_ABIS=x86_64 tools/build.sh android tools/android-emulator-test.sh build/android-input/app-debug.apk --two-finger-tap \ --expect-file tools/test-projects/input/android-expect.txt \ --ime '[gate] form focused' --ime-editor-info 'inputType=0x21 imeOptions=0x12000004' \ --expect-file tools/test-projects/input/android-ime-expect.txt -
Every run also fails on what the GLES path logs when it goes wrong, expected or not: an
OpenGL error(NativeEngine readsglGetErrorafter every frame; a debug build's sokol also asserts on one after each GL call, which the crash check catches), a shader that did not compile or link (sokol's GL backend, the runtime shader compiler), an incomplete framebuffer, an EGL error or a failed swap, a sokol panic, and libEGL's "call to OpenGL ES API with no current context".
Build And Run and Patch And Run on the same headless emulator (docs/specs/build-and-run-on-device.md
AC10): a Development Build of a copy of tools/fixtures/tween-curve through
jasperengine-editor build --run-device emulator-5554, a Lua string edit, the same command again.
It checks the second run patched (installed: patched), logcat has the new string, the installed
APK's SHA-256 did not change, and prints the patch's time against its 15 s budget as a [bench]
line (JASPER_MCP_PERF_SLACK enforces it). It builds the android-universal-gles3-development
runtime (x86_64) when build/players lacks it, and runs the editor of tools/build.sh linux inside
the emulator image (its SDK and JDK make the APK). test_device_run.py covers the same flow with a
stand-in adb on every MCP run.
The logcat says the engine started; only the screen says it drew. --golden DIR makes each run
wait for I/JasperEngine: Engine presented: 30 frames since ready (NativeEngine reports every
successful swap, Engine::systemFramePresented, and the engine counts them from its ready line),
then screenshots the device (adb exec-out screencap) and checks it with
tools/android-screen-check.py:
- content: a screen where one colour (within 8 per channel) covers all but 2 % of the pixels fails as BLANK: a black screen, or a frame that is only the clear colour;
- golden: the screenshot, box-filtered to 270 pixels wide (270 x 600 for the emulator's
Pixel 6, 1080 x 2400), is compared with
DIR/<scene>.pngbytools/mcp/pngdiff.py: at most 0.25 % of the pixels (405) may differ by more than 24 in a channel (the gate's missing caption is 1.3 %; two runs, and the two GPU modes, differ by none).<scene>.scaled.pngand<scene>.diff.png(differing pixels in red) are written next to the screenshot.JASPER_UPDATE_GOLDEN=1writes the goldens instead (the content check still applies); look at them before committing.
--scene NAME (repeatable) launches the app once per scene with the property
debug.jasperengine.scene set to it (a test project reads it, JASPERENGINE_SCENE elsewhere),
each run checked on its own in --out/<scene>/; {scene} in an expectation is the run's scene.
The gate's project is tools/test-projects/render-gate: a lit 3D scene (lit3d), 2D and UI
(ui2d: a textured Image, Polygons, a Text), an HTML UI document (htmlui), the JasperArcade port's
scaled list of filtered rows clipped by its viewport (htmlui-u27, S92 R11) and Title Art
Renderers (titleart, S81; run it also with --setprop debug.jasperengine.titleart_rgba8=1 against
the same golden), goldens in its golden/:
ANDROID_PROJECT=render-gate ANDROID_ABIS=x86_64 tools/build.sh android
tools/android-emulator-test.sh build/android-render-gate/app-debug.apk \
--expect-file tools/test-projects/render-gate/android-expect.txt \
--scene lit3d --scene ui2d --scene htmlui --scene htmlui-u27 --scene titleart --golden tools/test-projects/render-gate/goldenANDROID_ABIS=x86_64 builds only the emulator's ABI (a third of the build).
The emulator renders on the CPU. EMULATOR_GPU defaults to swangle_indirect: ANGLE on
SwiftShader's Vulkan, GLES 3.1, the path Google maintains; the goldens are made there.
EMULATOR_GPU=swiftshader_indirect runs the emulator's older GLES 3.0 translator on legacy
SwiftShader (the runner's only mode before BF3); the render gate passes there too.
That translator is why Android "never rendered" in the emulator (BF3). It decides texture
completeness without GL_TEXTURE_IMMUTABLE_LEVELS: a texture made with glTexStorage2D(levels = 1) and sampled with a mipmapped min filter (sokol's samplers always use one) counts as
incomplete unless its GL_TEXTURE_MAX_LEVEL is 0, and samples (0, 0, 0, 0). Mip-chained textures
(an Image's) drew; every one-level texture did not: the text font atlas, every HTML UI layer and
post-processing input, so a scene showed its clear colour (or black) with untextured geometry
and Images over it. No GL error, no shader log: per-draw readbacks found the font atlas full and
the draw writing alpha 0. sokol now states the levels as the max level
(_sg_gl_texstorage, SokolGlTextureLevels in the core tests), which conformant GL ignores. A
real device is affected only if its driver has the same completeness bug; the emulator gate
checks both modes. Neither mode can show what depends on a real GPU: driver shader compilers and
precision, tiler bandwidth, ASTC/ETC2 hardware decode (the emulator decodes in software), and
frame timing (SwiftShader draws a frame in tens to hundreds of milliseconds).
jasperengine-crash-test is built with core tests. ctest --test-dir build/linux/core-tests -R 'native-crash|posix-crash' --output-on-failure runs each deliberate fatal mode in a child,
checks registers, frames, log tail, the Gameplay Journal's journal.txt, signal chaining and overflow reporting, and checks the POSIX
object for allocation/stdio/mutex imports. It also verifies a main-thread hang frame. These
checks work in the ASan/UBSan tree too (core-tests-address-undefined). Windows/macOS desktop
CTest builds register the same child-process checks; Windows additionally requires a minidump.
For Android, build ANDROID_PROJECT=crash-diagnostics tools/build.sh android,
then tools/android-emulator-test.sh build/android-crash-diagnostics/app-debug.apk --expect-native-crash --expect 'JASPERENGINE CRASH:'. This fixture segfaults at frame 10.
The opt-in flag requires the engine report and a matching debuggerd tombstone, saves both
under the emulator result directory, and accepts that deliberate crash. Ordinary emulator tests
continue to fail on any native crash.
The fixture's Lua logs the Gameplay Journal entry gate.ready first, so the pulled report folder
also holds journal.txt with it (native-crash-journal checks the same on the desktop:
jasperengine-crash-test --mode segv --journal).
- Per commit of a stream:
tools/check-changed. It builds and runs what the change can affect: the Linux editor and the unit test binaries for C++ underengine/oreditor/(web for the engine, Android for its own code), the gtest suites whose test units include a changed file (Ninja's dependency database: a changedFoo.cppcounts throughFoo.hand everything that includes it), and the MCP test files the coverage map ties to the change (below). Everything for the root CMake,docker/,tools/build.sh, the toolchain and the lockfiles; the whole MCP suite for a change of its harness (harness.py,run_tests.py,build_cache.py); nothing for docs. A header underengine/coreorengine/CMakeLists.txtalso builds the engine with every optional module off (tools/check-physics-off.sh all-off): the editor's engine has every module, so only this shows a source that got a header through a module's code, which breaks Compile builds and the smaller players. - CI owns the full suite (below, "CI"): a PR runs the lanes its diff needs, the merge queue
every lane that can block the merge, the advisory run a push to
maindispatches the advisory test lanes the queue left out, the nightly the whole MCP CI suite. Nobody dispatches the full or advisory run by hand (full=true,advisory=true): one takes more runner capacity than the quota. check-changed is a selection and says so in every summary. The MCP files outside the CI suite (MCP_SUITE=all) run only where someone runs them. - check-changed runs the area lints by the paths they read (
AREA_LINTS):tools/check_raw_writes.pyandtools/check_stream_keys.py(file writes, decoders),tools/check_event_clears.py(engine events),tools/check_text_encoding.py(code-page conversions, Win32-Acalls, Apple string encodings, vswhere) andtools/ci/check-hardcoded-shortcuts.py(editor keys).tools/ci/check-notices.py(vendored libraries andNOTICE.md) runs in the lint lane.
tools/check-changed # build and test what the change touches
tools/check-changed --dry-run # the plan only
tools/check-changed --base main # another base (default: the merge base with oe-port, else main, origin/main)
tools/check-changed --no-mcp # builds and unit tests only, said so in the summary and not cached
tools/check-changed --json # the plan, step results, logs and fix commands as one JSON document
tools/check-changed --red-control # then the selected tests without the change: some must fail
tools/check-changed --red-control --restore # the tree an interrupted red control left reverted
tools/build.sh exec linux tools/check-changed # inside the Linux image (no web or Android build there)- The area lints run first, each when a path it reads changes: what it scans (editor and engine
C++ outside tests and vendored libraries, the decoders and reflection tables for
check_stream_keys.py) or its allow-list. A change of the lint, or of its self-test's fixtures, also runs its--self-test.tools/check_event_clears.pyruns for any engine source outsideengine/libs,engine/testsandengine/workspaces: everyFunctionSubscribemember is in its holder'sforEachEvent, every component holder inComponentEvents.h, every other holder in the lint'sWALKSorTRANSIENT, and every static event in Engine's clears, so the clears at Stop reach it;Easemembers count;tools/build.sh linuxruns it too. - Tool tests: a changed
tools/<dir>/<x>.pyrunstools/<dir>/test_<x>.pybeside it (and a changed test itself), unless it takes arguments only its lane has (SELF_TESTS_ELSEWHERE);SELF_TESTSnames the rest. CI's lint lane runs every tool test that needs no build (tools/ci/lint.sh). - Other checks with triggers: a changed MCP test file runs
tools/ci/check-mcp-ci-suite.py. - The change: committed since the base, staged, unstaged and untracked files. A checkout without
the stream's history reads its diff from
build/.rb-changes.json(with every file's sha256: a diff that does not match the files is refused). - Unit tests: the gtest suites (
TEST,TEST_F,TEST_P, typed) of the test units that see the change, injasperengine-core-testsandjasperengine-editor-tests(--gtest_filter, throughtools/build.sh unit-testsand its no-silent-green gate); a changed test file always runs; a CMake change, or test trees not built yet, run them all. A changed source the tree links but no test unit includes (a.cppwhose functions only other sources call) runs the units that include its nearest consumers: the sources that include it, through their own headers, a step at a time until a test unit includes one (nearest_consumers; onmain's dumps of 2026-11-20 it takes the core tree's sources that selected nothing from 620 of 2,175 to 240, the editor tree's from 1,659 of 4,333 to 600; what is left registers itself, as the Lua bindings do, and no include reaches it). - MCP tests: the files that executed the functions the diff's hunks touch (coverage map: the whole
file when a changed line is outside every function, a declaration or a type; a header then also
through its
.cpp; only new lines outside the functions touch nothing old, a new function counts through its callers' changes; the lines reach the map's through the diff from its commit; a function nearly every editor runs selects the 10 quickest files that run it), the changed test files, the files that call a changed MCP tool (by its tool names), that load a changed fixture, test project, Lua script, shader, HTML, scene or material (by path), and, for an engine change, the files that run a prebuilt game (GAME_BUILD_FILES: it runs engine code no editor coverage sees), those that compile a game when what the compile path reads changes (COMPILE_PATHS), and the guard of what a save writes (test_saved_output_determinism.py, spec S63) when serialization or code generation changes (SAVED_OUTPUT_PATHS). No map, a map older than 14 days or 400 commits, or a changed source the map does not know (new code), or a file no test names adds the CI suite; code the map knows that no test executes selects nothing, and the summary says so. A selected test that skips could not run: that fails the check. - The diff is the stream's, so a long or wide stream selects most of the suite (a tool like
create_entityor the frame reaches most test files).--base HEAD~1checks one commit, when the one before it passed. - A pass is cached in
build/.cache/check-changed.json, keyed by the base, the content of every changed and untracked file, the images' Dockerfiles, the coverage map's version and the script itself: the same inputs reprint the last summary (--no-cacheruns again); a run during which the files changed caches nothing. Exit 1 when a step fails or a selected test cannot run. - Output: the plan, then each step as it ends. Each step's whole output goes to
build/check-changed/<step>.log(CHECK_CHANGED_VERBOSE=1: to the terminal too). A failed step prints its parsed failures, at most 40 lines (googletest, unittest and pytest failures, the MCP results, and build diagnostics, crashes and gate verdicts throughtools/ci/report.py's parsers; else a lint'sfile:linefindings), then its log. The run ends with one line per step,ok|FAIL|skip|cached <step> <seconds>; a FAIL carriesfix:, the command that reruns it, narrowed to the failed googletest tests or MCP files. - Independent steps go on after a failure. A step whose build failed is
skipwith the reason (the unit tests after their build, the header gates and MCP tests after the editor's).--jsonprints one document on stdout (the plan, the steps with their status, log, fix, failures and failed tests, and the red control's verdicts); the progress goes to stderr. --red-controlproves the selected tests pin the change. It refuses a dirty tree, and any run refuses while an interrupted one's marker (build/red-control/in-progress.json) is there, printingtools/check-changed --red-control --restore. After the normal run passes (or its cached pass), it saves the branch's diff from the base over the paths outside the tests (everything butengine/tests,editor/tests,tools/mcp/tests,tools/fixtures,goldenfolders,docs/, and the tools' own tests and fixtures) tobuild/red-control/patch.diffand reverse-applies it in place. It then rebuilds and reruns the same selected tests (logs inbuild/red-control/logs/) and restores the tree in afinally, SIGTERM and Ctrl-C included. It then checks that the tree is byte-identical to before (status, diff, untracked files). Each test step isred(with the tests that failed),red (build)(its build failed),green(it does not pin the change) ornot run. It exits 1 when none went red. The red run is never cached, and it reverts the shared worktree it runs in: do not edit it meanwhile.- Inside the Linux image
tools/build.shhas no Docker to call and runs the image's own targets directly, with the same environment; a target of another image (web, Android) exits 3; check-changed there leaves those builds out, says so in its summary and caches no pass. - Navigation's runtime and the engine's CMake (
NAVIGATION_OFF_PATHS:engine/core/navigation/,engine/libs/recastnavigation/,NavigationSystem.*,engine/core/object/navigation/,engine/core/component/Nav*,engine/CMakeLists.txt, the navigation tests and the script) also plannavigation-off:tools/check-navigation-off.shin the Linux image (below, "Navigation OFF"). - Its tests:
python3 -I tools/test_check_changed.py(the diff and its fallbacks, the build plan, the suites from a syntheticninja -t deps, the MCP selection from a synthetic map, the gcda reader, the cache and its invalidation, the area lints by path, the exit codes, keep-going, the logs, summary and fix lines,--json, and the red control on scratch repositories).
The coverage map (tools/mcp/coverage_map.py): for each MCP test file, the engine and editor
sources its editors executed. A full run of a coverage-instrumented editor records it, off the
critical path (a full suite run, a quiet machine); it is stored with its commit in the machine's
~/je/mcp-build-cache/coverage-map.json (check-changed finds it there, or
JASPER_MCP_COVERAGE_MAP):
COVERAGE=1 SKIP_ENGINE=1 tools/build.sh linux # build/linux/editor-coverage-install
JASPER_MCP_SHARED_BUILD_CACHE=~/je/mcp-build-cache tools/build.sh exec linux bash -c 'JASPER_EDITOR=/src/build/linux/editor-coverage-install/bin/jasperengine-editor \
JASPER_MCP_COVERAGE_DIR=/src/build/coverage/runs JASPER_SLOW_TESTS=1 \
dbus-run-session -- tools/mcp/run-tests.sh -j 4 --split-seconds 900; \
python3 tools/mcp/coverage_map.py collect build/coverage/runs build/linux/editor-coverage \
--commit <the commit> --out /mcp-build-cache/coverage-map.json'Each test file's (and chunk's) editors write their GCC counts under their own GCOV_PREFIX; a
function counts for a test file when a counter of it is above zero; the object's .gcno says which file
and lines it is written in (a header's for an inline function), which takes check-changed from a
diff's hunks to functions. The run leaves out the slow builds
(no JASPER_SLOW_BUILD): what a compile or a prebuilt game runs is not the editor's code, and the
files that build games are selected by path (GAME_BUILD_FILES, COMPILE_PATHS).
A file's tests share an editor and run in order, so a file is one piece of work, unless it declares
TESTS_INDEPENDENT = "why" (each test sets up what it needs and runs in an editor of its own, in
any order) or TESTS_INDEPENDENT = ("why", ["test_x_*"]) for some of its tests (those use nothing
the file's other tests leave, nor do the others use theirs): their tests may be split into chunks,
each with its own worker process and editor (run_tests.py --split-seconds N). test_html_ui_examples.py (each example's golden), the
Khronos models of test_materials_pbr.py (test_khronos_<Model>) and the parts of the Title Art
library's gate (test_title_library.py, test_gate_<k>_of_8) declare it.
The runner prints == setup before its summary and writes setup into --json: each chunk's wall
time and its tests' time, and each editor's scratch (its directory and project copy), start (to
the tool list), first_call (the first tool call, which waits for the project to load), close, and
shared for the file's editor (the others are started by its tests). Measured:
- This split's first CI run, 44838269359 (the CI suite in 7 shards: 438 chunks, 2,649 tests): 8.79 h
of chunk time, 8.59 h of it inside the tests. 693 editors, 409 of them the files' and 284 started by
tests in 56 files (
test_saved_output_determinism.py36,test_post_fx_settings.py35,test_reflection.py34,test_project_audio_defaults.py29); medians: start 0.37 s, first call 1.93 s, close 0.58 s. Outside the tests a median 1.3 s a chunk (the worker's start, 0.5 s of it importing the harness, and the file's editor close). Setup at most 0.77 h (8.7%): the files' editors 0.36 h, the tests' own 0.31 h. - The load, in the Linux image on llvmpipe at 2 to 4 CPUs: 1.5 s, the same for
createand atools/fixturescopy; 0.6 s of it is the engine API the editor syncs into.jasperengine/engine-api(3,554 files). - Fixture copies take milliseconds (23 s for the whole run): of the CI files, 343 start on
create, 21 onpose-animation, 15 onhtml-ui, none onbuild/fixture-unity; the largesttools/fixturesproject isreflection-parity(14 MB, 2 files), the next 1.5 MB. A file's first test takes as long whatever its fixture (CI median:create6.0 s,pose-animation4.5 s,html-ui6.9 s).
So each file keeps a worker process and an editor of its own: a reset between files in one editor
(create_project with unsaved: "discard") takes 1.6 s against 2.3 s for a new editor's start,
load and close, under 1% of the suite, and would hand the editor's process state (settings, layout,
Lua, tool groups, console) to the next file. A pre-synced engine API cannot help create
(--create takes an empty directory only). For shard planning: a chunk costs about 1.3 s outside
its tests plus 2 to 3 s for its editor inside its first test, not the 20 s of shard.py's
CHUNK_OVERHEAD.
-
ccache is shared by every worktree of a machine (
<main checkout>/build/.cache/ccache), and every worktree is/srcin the image, so a tree another worktree built is a hit: an editor build of oe-port in a new worktree on A, 2,144 direct hits of 2,150 compiles, 158 s. What a merge changes is compiled once per machine. -
The prebuilt player runtimes: once per content key per machine (above).
-
Mesa's shader cache: llvmpipe and lavapipe compile every shader to machine code; the editors keep that cache (
MESA_SHADER_CACHE_DIR) in the server's shared MCP cache (or the checkout'sbuild/.cache/mesa-shader-cache) instead of a fresh one in every scratch HOME. It is Mesa's own cache, keyed by the shader and the driver build, on by default for every Mesa user. -
LP_NUM_THREADS: Mesa's llvmpipe gives every editor a rasterizer thread per CPU of the host, not of the container's quota; at-j Nthat is N times the host's CPUs inside the quota, which throttles them all at once, main threads included (the 3-13 s stalls on A). The harness gives each editor (and the players it runs) 4 threads (harness.render_threads(): fewer, down to 2, only at under half a CPU per thread;JASPER_MCP_RENDER_THREADS, orLP_NUM_THREADSin the run's environment, overrides). Measured on A, the same 36 tests at-j 4in an 8-CPU container (the host shared with other jobs; the last run's host was the busiest):LP_NUM_THREADSWall Median s per frame Host load, median / peak Result Mesa's default (16) 2,009 s 1.63 21 / 53 36 passed 4 1,772 s 1.46 12 / 23 36 passed 2 2,517 s 2.22 not sampled 35 passed, a screenshot timed out An editor averages about 2 CPUs and holds 1 to 2.4 GB (seven at once: 6.8 GB), so memory does not bound
-j: CPUs do, at about one editor per 2 CPUs of quota (-j 4on 8,-j 7on 16).
The GPU lane runs the tests whose checks hold on any renderer on an NVIDIA GPU, through headless
NVIDIA X servers in their own containers (tools/gpu/xorg-headless.sh, JE_GPU_SCREEN=1600x900,
the size of an editor's own Xvfb; the desktop session is never touched): DOCKER_GPU=1 tools/build.sh mcp-tests --plan ... sources tools/gpu/env.sh, and the runner gives a chunk of
the lane gpu the NVIDIA display (one display per chunk at a time, JASPER_MCP_GPU_DISPLAYS; the
harness's own X server is that display too, for the xdotool tests) and every other chunk llvmpipe
as anywhere. Each editor checks it renders where its chunk says (JASPER_MCP_EXPECT_DEVICE:
NVIDIA, or llvmpipe), so a lane test never runs on llvmpipe unnoticed and no golden test runs on
the GPU. tools/mcp/gpu_lane.json classes every graphics test file:
| Class | Files | What |
|---|---|---|
(a) gpu |
43 | relative or structural checks (a change between two renders, no black or NaN pixels, values, undo, saved files); each passed twice on the RTX; BF16's 34 together 7,259 s of test time on llvmpipe under load, 1,223 s on the RTX: animation_clip, animation_inspector, animation_record, animation_window, animator, async_shaders, atmosphere, atmosphere_editor, autosync, bake_vertex_animation, buoyancy, core_utilities, ecs, ecs_collision, fluid_agent, fluid_fixed, hot_reload, html_ui_docs, html_ui_tools, html_ui_video, html_ui_widgets, play, play_stop_gizmos, pose_animation, pose_runtime, post_fx_settings, scene_view_ui, shader_library_phase2_review, shadows_ui, stochastic_tiling, undo_ui, vat_baker_window, vat_inspector, water; since BF20: fluid_effect, fluid_inspector, html_ui_effects, lattice_bake, place_with_physics, pose_render, pose_window, reflection, upgrade_from_main |
(b) llvmpipe |
8 | compare with goldens drawn by llvmpipe, and the MCP suite has no per-renderer goldens (the unit tests' isReferenceRenderer and hardwareTolerance are C++ only), so they stay the reference: html_ui_examples, lattice, materials_pbr, navigation, particles_tools, post_fx_golden, scene_view, shadows |
(c) other, not on the lane |
77 | budgets or frame times of the software renderer, game builds, no renderer in use, or under a minute with nothing to gain (not validated) |
Lane files run on one display per chunk, two at a time; a file holding one test that is not GPU-OK stays on llvmpipe whole, because its tests share an editor. Files not listed render nothing that matters and stay on llvmpipe.
| Code under test | Test file | Target |
|---|---|---|
engine/core/<area>/X.cpp |
engine/tests/core/<area>/XTest.cpp |
jasperengine-core-tests |
engine/renders/... |
engine/tests/core/render/...Test.cpp |
jasperengine-core-tests |
editor/<area>/X.cpp |
editor/tests/<area>/XTest.cpp |
jasperengine-editor-tests |
| the HTML UI | engine/tests/htmlui/ |
jasperengine-htmlui-tests |
engine/core/<area>/X.cpp that a test drives through editor scenes (the editor's static App, physics worlds, model loads) |
editor/tests/engine/<area>/XTest.cpp |
jasperengine-editor-tests |
editor code that needs a GPU device (S90's evaluator, editor/procmat/) |
engine/tests/core/procmat/*GpuTest.cpp, the editor sources listed in engine/tests/core/CMakeLists.txt |
jasperengine-core-tests (only that tree has a headless device) |
| an MCP tool or agent-facing behaviour | tools/mcp/tests/test_<area>.py, with CI = True |
MCP suite |
Both unit-test targets glob *Test.cpp under their directory, so a new file needs no CMake
change: add it and rebuild. Test data goes in engine/tests/core/fixtures/ or
editor/tests/fixtures/ (the asset root of TestSystem for that target), golden images in
engine/tests/core/golden/. engine/tests is excluded from the engine SDK copy and
editor/tests is never installed.
- Files are
<Subject>Test.cpp. Suites are<Subject>, testsTEST(Subject, VerbPhrase)orTEST_F(SubjectTest, VerbPhrase)in CamelCase:TEST(Quaternion, SlerpReturnsTheEndPoints). - A suite that needs a GPU ends in
Gpu(RenderGpu) and starts each test withJASPER_REQUIRE_GPU(): without a device it fails, it never skips. GPU suites run on Linux (Xvfb) and on macOS (the default Metal device:HeadlessContextMetal.mm,ReadbackMetal.mm); Run only the CPU suites where no device exists with--gtest_filter=-*Gpu*. - A suite whose tests take more than 5 s each ends in
Slow. Any other test stays under 1 s, and both binaries' CPU suites together under 60 s on 4 cores. - A GPU test that takes more than 5 minutes under ASan goes in a suite ending in
GpuSlow(a fixture of its own,class TitleGenGpuSlow : public TitleGenGpu {};): the PR ASan lane leaves*GpuSlow*to the nightly's ASan job, and every other lane runs it as a*Gpu*suite (-*Gpu*leaves it out too). - CTest labels follow the names:
gpu,slow, elseunit. ReflectParity.*compares the reflection codec against frozen data (editor/tests/reflect/parity_golden/): a field added to a reflection table adds its key there, andJASPER_TEST_UPDATE_GOLDEN=1rewrites the files.AssetRefSchemaFrozen.*holds what the hand table of asset references gave (editor/tests/asset/asset_ref_*_frozen.txt); those files are not rewritten, a new reference field only adds rows.
engine/tests/support/ is jasperengine-test-support, linked into every test target, with a
shared main() (TestMain.cpp) that initialises the engine without a GPU:
-
TestSystem::get(): the engine'sSystemfor tests; every log line is recorded. -
LogCaptureandEXPECT_NO_ENGINE_ERRORS(): assert on what the engine logged since the test (or the capture) started:LogCapture log; ...; EXPECT_EQ(log.count(D_LOG_WARN, "missing"), 1u);. -
TempDir: a fresh directory per test (<build>/test-tmp/<Suite>.<Test>-...), removed at the end of its scope;JASPER_TEST_KEEP_TEMP=1keeps them. -
GpuEnvironment::ensure()/JASPER_REQUIRE_GPU(): the headless device (Xvfb with GLX, or lavapipe for Vulkan), frames rendered intoGpuEnvironment::target(). -
ImageCompare:EXPECT_GOLDEN("name")compares the target withgolden/name.png; on a mismatch<build>/test-output/getsname.actual.pngandname.diff.png. -
googletest 1.17 and googlemock (
libs/googletest/, tests only). -
engine/tests/core/support/AllocationCounter.h(core tests and the S06 benches): counts heap allocations atmalloc(wrapped by GNU ld, so on Linux; elsewherecountsAllocations()is false and the counts stay 0).AllocationCountScopecounts the whole process,ThreadAllocationCountonly the calling thread (for code that must not allocate while the logger's drain thread or the workers may);perfSlack()is the factor wall-clock budgets are enforced with:JASPER_TEST_PERF_SLACK, unset (0) by default and under a sanitizer, where the budgets are only printed.*Benchsuites (LoggerBench,SchedulerBench,SignalBench, S10'sShadowBench, S03'sAtomicFileBenchDocument write),SchedulerTest.Process10kUnder2ms,JobsPriority.BackgroundProgressGuarantee's latency and S12'sAtmosphereNoisebake budgets check their budgets that way and print[bench]lines (S34'sLuaBindingBenchprints the cost of a call through the Lua bindings, with no budget: builds are compared with it on the benchmark server); the editor suite'seditor::test::perfSlack()does the same forCommandHistoryBench(S24),AutosaveEncodeBench(S03),VcsBench(S29: status poll, snapshot swap, scene diff; the main-thread encode is reported),ChangedUpdateFlagsBench(S71: 50 us a call per component) andReflectCodecBench/ReflectResolveBench(S08; its MCP R19 frame cost,test_reflection.py::test_inspector_frame_cost, reads the same variable) (ratios such as a report's overhead stay checked everywhere). The MCP texture storm's frame budget (test_jobs_memory_ui.py, S06 AC23) reads the same variable; it assumes a machine whose decode workers and software renderer do not share cores (8+ hardware threads): E's 4 vCPU measure a storm p95 of 1.7x the idle frame against the 1.5x budget, so it runs there only with a slack above that. A shared build server's load alone misses them (10k timers in 20 ms instead of 2), so an ordinary unit test run never fails on wall-clock time; the benchmark run enforces them on a quiet machine, with nothing else running:JASPER_TEST_PERF_SLACK=1 \ UNIT_TEST_ARGS='--gtest_filter=*Bench*:SchedulerTest.Process10kUnder2ms:JobsPriority.BackgroundProgressGuarantee:AtmosphereNoise.*' tools/build.sh unit-tests
JASPER_TEST_UPDATE_GOLDEN=1 rewrites the goldens a run compares (the HTML UI suite also takes
JASPER_HTMLUI_UPDATE_GOLDEN=1); goldens are only written on glcore, and Vulkan has to match
them. The goldens are renders of Mesa's llvmpipe (glcore) and lavapipe (Vulkan), the test image's
devices (GpuEnvironment::isReferenceRenderer); a comparison a hardware GPU draws differently gets
its looser limits from test::hardwareTolerance(hardware) (a browser-parity fixture from
tolerance.hardware), measured on that GPU, while the reference renderers keep the strict one. Re-baseline one suite at a time, look at every changed image before committing it, and say
in the commit why it changed:
JASPER_TEST_UPDATE_GOLDEN=1 UNIT_SUITE=core UNIT_TEST_ARGS='--gtest_filter=RenderGpu.*' tools/build.sh unit-tests
GRAPHIC_BACKEND=vulkan UNIT_SUITE=core UNIT_TEST_ARGS='--gtest_filter=RenderGpu.*' tools/build.sh unit-testsAn HTML UI frame that records what the last drawn one did is not replayed (S92 R1). A test that
counts a replay's passes, draws or caches frame after frame turns that off for its scope
(FrameReuseMode replayed(false), TestRenderCommon.h). JASPER_HTMLUI_VERIFY_KEPT=1 makes the
golden harnesses draw a second frame and compare every kept frame with a fresh replay; a
difference fails the comparison and logs [HTML UI] kept frame differs:
JASPER_HTMLUI_VERIFY_KEPT=1 HTMLUI_TEST_ARGS='--gtest_filter=*Golden*:RenderP1*:RenderPrimitive.*:RenderClip.*:RenderFilter*' tools/build.sh htmlui-testsThe cooked fixtures of the texture format test (engine/tests/core/fixtures/texture_formats/, S14
AC8: every GpuTextureFormat as a cooked 32 px KTX2 with the CPU decode of each level, which
TextureFormatsGpu compares the GPU's sampling with) come from the editor's encoders and
decoders. JASPER_TEST_UPDATE_FIXTURES=1 rewrites them; otherwise TextureFormatFixtures checks
that they are complete and that the editor still decodes them the same:
JASPER_TEST_UPDATE_FIXTURES=1 UNIT_SUITE=editor UNIT_TEST_ARGS='--gtest_filter=TextureFormatFixtures.*' tools/build.sh unit-testsThe cooked families of tools/test-projects/texture-formats (the web gate and the Android
emulator run) are rewritten with tools/test-projects/texture-formats/make_assets.sh after
tools/build.sh linux.
The post FX goldens (tools/mcp/tests/test_post_fx_golden.py, S13) live in
tools/mcp/tests/golden/post_fx/ and are rewritten with JASPER_POST_FX_UPDATE_GOLDEN=1, except
defaults.png: the post-processing fixture with every field at its default, captured by that test
on the editor before S13 (oe-port 8d78ae763, after S10 and S12), which the S13 editor must match exactly. Re-capture
it only from an editor without S13's changes.
tools/ci/gtest-gate.pyreads the googletest XML of every run and fails when the file is missing (the binary crashed), when no test ran (a filter that matches nothing is not a pass), when fewer tests ran than expected, when a test failed, or when more tests were skipped than allowed (0, except the HTML UI suite's recorded 74). It lists every disabled test. The test targets go through it;tools/ci/test_gtest_gate.pytests it.- Declared tests are the tests that ran plus the disabled ones. A test that flakes twice in a week
is quarantined with a
DISABLED_prefix and a tracking issue; the gate's list keeps it visible. Opt-in tests that need what the repository does not hold (VatImportSideFx.*: the SideFX VAT 3 tutorial exports,JASPER_VAT_SIDEFX_EXAMPLES) or are measurements to run by hand (EntityDestroyScaling.Profile,JASPER_DESTROY_PROFILE) areDISABLED_too, never a skip:--gtest_also_run_disabled_testswith the filter runs them. - A behavioural claim needs a red control: revert the behaviour locally, show the test failing (paste the output into the pull request), restore it. A bug fix shows the test red before the fix and green after.
- The XML stays in
build/test-results/. - The first tests of an area are characterization tests: they pin today's behaviour. A change that alters that behaviour on purpose updates those tests in the same commit and says so.
The suites can run on shared machines, next to builds and other suites (-j 3): there a frame
of a software-rendered editor or player takes 0.1 to 0.3 s, a background job seconds, the main
thread misses a 1 s watchdog threshold on its own. A test that passes only on a quiet machine
hides real regressions behind re-runs. So (BF12):
- Wait for the state, not for time. Ask for the condition until it holds; the deadline is only
a hang guard, never the expected duration.
test_crash.py::test_health_off_mainasksget_editor_healthuntil it reports the hang, where a fixed sleep missed its start. - Game time, not wall time. In Play,
play startwithfixed_fpsandauto_pauseruns the game only insidewait/send_input, each frame exactly 1/N s, andwait {"until": ..., "frames": cap}bounds it in frames. A probe that samples a window of game time narrower than a frame step skips it at a low frame rate (Engine caps a frame at 0.25 s):test_lattice_anim.pysampled clip time 0.3 to 0.5 s, which 4 fps stepped over. A player:run_buildwithafter_ready,fixed_fpsandquit_after(orscreenshot_frame) captures the player's own frame N frames after it got ready, not a window N seconds after the launch. - A screenshot is of loaded content. The editor's
screenshot, the player's--screenshotand the readiness line wait for shaders being made and textures loading (a frame drawn while a texture loads shows a stand-in for it) and fail naming them past their timeout, so a golden comparison never meets a stand-in. - Make preconditions explicit. Background work a test relies on finishes first:
HotReloadServiceTests.ExternalRenameKeepsTheGuidThroughTheWatchercallsAssetDatabase::waitForBackgroundWork()before the rename, because R5 matches a file moved without its meta by the content hash the background hasher computes. - Pick records by what identifies them. A loaded machine produces real events of its own (a stall past the threshold is a real hang report): find the debug hang's report by its phase, not as the first or the newest.
- Keep random parts out of assertions. Match file names, not full paths under a random temp
folder (
FileWatcherTests:je-watch-<random>holds "4913", vim's probe name, one time in 600). - A budget is a benchmark. MCP tests report wall-clock budgets with
harness.over_budget, units withperfSlack()(JASPER_TEST_PERF_SLACK); both are enforced by the benchmark run (C,RB_SLOTS=2). The HTML UI gates take the least of several CPU-time measurements of the calling thread (PerfFixtures.h:gatedCpuMs); one whose budget is near the step's cost on a build server (MarkdownHtml.Perf20KB: 1.3 ms of 2 there, 0.27 ms on a quiet one) is enforced only whenJASPER_HTMLUI_PERF_SLACKis set (benchmarkPerfSlack()):JASPER_HTMLUI_PERF_SLACK=1 HTMLUI_TEST_ARGS='--gtest_filter=MarkdownHtml.Perf20KB' tools/build.sh htmlui-tests. Scaling a timeout with a load factor is the last resort, and a test never asserts less to pass. - Prove it under load. Run the test where it failed, under deliberate load, before and after:
--gtest_repeat=50for a unit test, 20 runs for an MCP test, in parallel lanes next to busy loops in the image (tools/build.sh exec linux ...; the container's--cpuskeeps the load off other jobs) or next to a full build. The run on the unchanged branch is the red control.
- Put unit tests where the table above says, named as above. Use
TempDirfor files andEXPECT_NO_ENGINE_ERRORS()where the engine logs. - Rendering changes add a
*Gputest with a golden inengine/tests/core/golden/, created on glcore and matched on Vulkan. - Agent-facing features add MCP tests, CI-capable (
CI = True, own project). - Run
tools/build.sh unit-tests(and the suites of the touched area); record the red control. - Code must build warning-free with
WERROR=1(below).
CMakePresets.json (editor tree) and engine/CMakePresets.json (standalone engine tree, never
copied into the editor install or an export) hold the standard configurations:
| Tree | Presets |
|---|---|
| editor | linux-release, linux-debug, linux-vulkan-release, linux-asan, linux-tsan, linux-unity, linux-ci, windows-msvc-release, windows-msvc-debug, windows-msvc-asan, windows-vs2022, macos-release, macos-universal-release, macos-asan |
| engine | engine-linux-release, engine-linux-debug, engine-linux-tests, engine-linux-tests-vulkan, engine-linux-asan, engine-linux-tsan, engine-windows-msvc-tests, engine-macos-tests, engine-web-debug, engine-web-release, engine-web-threads |
cmake --preset linux-ci && cmake --build --preset linux-ci && ctest --preset linux-ci
cmake -S engine --preset engine-linux-tests && cmake --build --preset engine-linux-tests # (from engine/)Presets build into build/presets/<name>; tools/build.sh uses them with its historical
directories (-B build/linux/editor, ...) and adds the ccache launcher, which presets never set.
The Windows MSVC presets need the developer environment (vcvars64); Android stays on Gradle and
iOS on the Xcode workspace. tools/ci/check-presets.sh configures every Linux preset and checks
the option errors.
| Option | Default | Effect |
|---|---|---|
JASPERENGINE_TESTS |
OFF | the tree's unit-test target (jasperengine-core-tests in engine/, jasperengine-editor-tests in the editor tree) |
JASPERENGINE_SANITIZE |
empty | address;undefined or thread on every target of the tree (below) |
JASPERENGINE_WARNINGS |
ON (editor tree), OFF (engine/) |
the warning set on our own targets |
JASPERENGINE_WERROR |
OFF | warnings of our targets are errors (needs JASPERENGINE_WARNINGS) |
JASPERENGINE_UNITY_BUILD |
OFF | unity builds of our own targets, 16 sources per unit |
JASPERENGINE_PCH |
ON (editor tree), OFF (engine/) |
precompiled headers of our own targets, GCC and Clang (below) |
JASPERENGINE_LINKER |
AUTO | lld for Debug and RelWithDebInfo builds that ship nothing; DEFAULT, LLD, MOLD, GOLD |
JASPERENGINE_DEBUG_INFO |
full (a first configure: the environment's JASPERENGINE_DEBUG_INFO) |
lines: line tables only wherever the tree has debug information (below) |
JASPERENGINE_VENDORED_UNITY |
ON, OFF for a shipped game | Jolt unity-built |
engine/CMakeLists.txt is also the top-level file of every exported game, so all of these default
to off there, and the exporter never sets them: a game configures and builds exactly as before.
A project with Project Settings > Navigation > Include In Builds off exports with
JASPERENGINE_NAVIGATION=OFF: Recast/Detour is not compiled, every navmesh bake, query and agent
fails and logs once, and Nav Grids keep working. NavStubTest checks that, and it is compiled only
in such a build, which no other suite makes (S74 R28):
tools/build.sh exec linux tools/check-navigation-off.sh # build/navigation-off, build/test-results/navigation-off.xmlIt configures the standalone engine (engine-linux-tests, -DJASPERENGINE_NAVIGATION=OFF, warnings
not errors), builds jasperengine-core-tests, runs NavStubTest.*:NavGridTest.* through the
no-silent-green gate, and fails unless at least two NavStubTest tests passed (a tree that still
compiles navigation in runs none). The first run builds the whole engine (the switch is a public
define); later runs are incremental. tools/check-changed plans it for a navigation or engine CMake
change; nothing else runs it, CI included.
A project with no .dialogue, Dialogue Runner or script naming Dialogue exports with
JASPERENGINE_DIALOGUE=OFF (dialogue-graphs.md R15): engine/core/dialogue is not compiled and the
Lua names Dialogue and DialogueRunner are stubs that log once. The module-off variant of
tools/check-physics-off.sh builds that engine (build/physics-off-dialogue-off); the stubs'
test, DialogueStubTest.LogsOnceWhenNotCompiled, binds them on a Lua state of its own, so it runs in
every core build:
tools/build.sh exec linux tools/check-physics-off.sh dialogue-offSANITIZE=address,undefined tools/build.sh unit-tests # build/linux/core-tests-address-undefined, Debug
SANITIZE=thread UNIT_PROCESSES=6 UNIT_TEST_ARGS='--gtest_filter=-*Gpu*' tools/build.sh unit-tests
SANITIZE=address,undefined tools/build.sh linux # an instrumented editor: build/linux/editor-address-undefined(-install)
SANITIZE=address,undefined tools/build.sh mcp-tests tools/mcp/tests/test_protocol.py # MCP tests on that install
SANITIZE=address,undefined HTMLUI_TEST_ARGS='--gtest_filter=-*Golden*' tools/build.sh htmlui-testsengine/cmake/JasperSanitizers.cmake adds -fsanitize=<list> -fno-omit-frame-pointer to every
target of the tree, vendored libraries included (uninstrumented code gives TSan false positives),
plus -fno-sanitize-recover=undefined -fno-sanitize=vptr with undefined (function too on
Clang), -O1 in Debug (at -O0 the editor test binary's instrumentation data alone passed the
2 GB that x86-64's small code model reaches, and it did not link), and defines
JASPERENGINE_SANITIZE_ADDRESS, _UNDEFINED and _THREAD so tests can relax time budgets.
thread with address is a configure error, as are thread and undefined on MSVC and any
sanitizer on Emscripten, Android or iOS. On MSVC, address switches to the DLL runtime, drops /RTC1,
links with /INCREMENTAL:NO, defines _DISABLE_STL_ANNOTATION, and copies
clang_rt.asan_dynamic-x86_64.dll next to every executable so they start from a plain shell.
A sanitizer linux build installs like a normal one, unstripped (the reports need the symbols),
into build/linux/editor-<sanitizers>-install: its build type is Debug by default, so the install
rules' configurations (JASPERENGINE_INSTALL_CONFIGURATIONS) add Debug and RelWithDebInfo when
JASPERENGINE_SANITIZE is on. SANITIZE=... tools/build.sh mcp-tests runs the harness on that install
(JASPER_EDITOR names it, with TSan's setarch wrapper); a sanitizer report ends the editor, and so the test.
Leak checking is off in that run: the editor's exit reports what Xvfb's unloaded GL driver kept, frames of an
unmapped module that no suppression can name. The unit tests hold the leak check.
tools/build.sh passes these runtime options on every run:
ASAN_OPTIONS=abort_on_error=1:detect_leaks=1:strict_string_checks=1,
UBSAN_OPTIONS=print_stacktrace=1:halt_on_error=1:suppressions=tools/sanitizers/ubsan.supp,
LSAN_OPTIONS=suppressions=tools/sanitizers/lsan.supp,
TSAN_OPTIONS=halt_on_error=1:second_deadlock_stack=1:suppressions=tools/sanitizers/tsan.supp.
The suppression files list third-party code only (Mesa, X11, fontconfig, vendored libraries),
each entry with its reason. Engine and editor code is never suppressed: fix it.
GCC 11's TSan (the Linux image) does not intercept pthread_cond_clockwait or
pthread_mutex_clocklock, which libstdc++ calls for every steady-clock wait
(std::condition_variable::wait_for, wait_until on steady_clock, std::timed_mutex::try_lock_for):
it misses the unlock inside the wait, reports double locks there, and, since a std::mutex never
tells TSan it is gone, breaks the next mutex at its address (reports of races under a mutex both sides
hold). Nor does it intercept __longjmp_chk, which longjmp, _longjmp and siglongjmp compile to
under _FORTIFY_SOURCE (Ubuntu's GCC defines it from -O1): it never unwinds its shadow stack on a
jump, so every Lua error and coroutine yield grew the stacks it records (CoroutineTest's 10,000
suspended coroutines held 15 GB) until the shadow stack ran past its end (a SEGV inside TSan), and a
handler left by siglongjmp (CrashGuard) stayed "inside a signal". So a GCC TSan build on Linux links
engine/cmake/TsanInterceptors.c into every executable and shared library (JasperSanitizers.cmake
compiles it at configure time and adds it to the link options): its definitions come before libc's and
call the intercepted pthread_cond_timedwait, pthread_mutex_timedlock (the deadline on the realtime
clock) and longjmp. TsanInterceptors.* fails under TSan without it. Engine and editor code waits
and jumps as it would anywhere; jobs::detail::timedWait (jobs/detail/TimedWait.h) and the
try_lock loops of Logger.cpp (lockUntil) and io/watch/backends/Backends.h (lockWithin)
predate the shim. Crash* and HangWatchdog.* run under TSan with the rest. The GPU suites run
with halt_on_error=1 too: tsan.supp has Mesa's swrast_dri.so, whose reports are about its own mutexes. A budget
in wall clock is printed under a sanitizer, never enforced there: perfSlack(), or the build's
JASPERENGINE_SANITIZE_* where a test's own limit is unconditional.
jasperengine_target_warnings() (engine/cmake/JasperWarnings.cmake) puts
-Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare
(MSVC: /W3 /wd4244 /wd4267 /wd4305) on jasperengine, the editor executables, the project
executable and the test targets; JASPERENGINE_WERROR adds -Werror -Wno-error=deprecated-declarations
(MSVC /WX). Vendored libraries keep -w//w and SYSTEM includes. tools/ci/warning-summary.py counts
a build log's warnings per target.
Werror is enforced with GCC in CI's linux and unit lanes (WERROR=1). It is never enforced on
Emscripten, the Android NDK, the Xcode workspace or exported projects: those compilers move under
us and compile user code. Code from any stream must build warning-free with GCC.
The ratchet. These groups are off today; turning one on is a change of its own, with its
cleanup: -Wsign-compare (GCC/Clang), and MSVC's C4244, C4267 and C4305 (conversions
that lose data). -Wunused-parameter and -Wmissing-field-initializers stay off by design.
JASPERENGINE_UNITY_BUILD=ON (UNITY=1 tools/build.sh linux, preset linux-unity) merges the
sources of our own targets 16 at a time (UNITY_BATCH=<n> for another size, in a tree of its own);
Objective-C++ and generated sources are always compiled alone, and a source that cannot share a unit
is listed in jasperengine_skip_unity_build(REASON ... SOURCES ...): today the sources that include
Xlib (macros such as None and Status), the two that replace the global operator new, and whole
trees (the HTML UI, the MCP tools, Title Art...) that keep one generic helper set per file. Which
sources share a unit moves whenever a source is added or removed, so nothing at file scope may reach
the next source:
- A test source (
engine/tests,editor/tests) keeps its code, itsusing namespacelines and its helpers in a namespace of its own,namespace <FileStem>_cpp { ... }(<dir>_<FileStem>_cppwhen another source has the same name), with the tests inside it: an anonymous namespace at global scope, or inside a namespace other files open too, is the same one for the whole batch. Tests that live in the namespace they test nest it:namespace jasperengine::editor::unity::UnityYamlTest_cpp. Only named namespaces (definitions of what a header declares,*TestAccessfriends) and macro calls stand outside it. - In an engine or editor source, a
using namespaceat namespace scope names onlyjasperengineorjasperengine::editorat global scope, or sits inside a namespace no other file opens; a test source has none outside its own namespace, a header none at global scope butjasperengine. A source that implements a namespace puts its code innamespace jasperengine::x { ... }; one that uses another namespace's names qualifies them (terraincore::TileCoord). - A global alias (
using Json = ...) gets a name of the file's own, and a macro is#undefined at the end of its file. - Each header's include guard is its own: a unit that includes two headers with one guard loses the second.
- A name two namespaces in sight both declare is spelled out: an engine header's and an editor
one's (
SelectionState,pixelart,cook,test), or two namespaces a source opens (pixelart::RgbaImageandpixelart::cleanup::RgbaImage). Which of them a unit has seen depends on its neighbours' includes, so a batch of other sizes finds what 16 does not.
tools/unity_wrap.py [file...] puts a test source in that layout (--check lists what it would
wrap). tools/check_unity_scope.py (the lint lane) checks the first two rules and the include guards; its
NOT_UNITY list names the trees that are never unity-built. The others need a compiler: the nightly
builds tools/build.sh linux and both unit-tests trees with UNITY=1, and a build at another
batch size (UNITY=1 UNITY_BATCH=23) moves every boundary.
docs/specs/S33-build-speed.md has the measurements behind these and the tools to repeat them:
tools/perf/build-bench.sh <label> <scenario> (in the build image: clean, warm-cache, no-op and
edit rebuilds of one tree, with the host's load recorded) and tools/perf/build_stats.py (where a
.ninja_log's time goes, header fan-out from ninja -t deps, header parse costs, -ftime-report).
-
Precompiled headers (
JASPERENGINE_PCH):engine/cmake/JasperPch.h(standard headers) for the engine, test and project targets,editor/EditorPch.h(plusjson.hppand yaml-cpp) for the editor's. Only our own C++ sources get them; a source with compile options of its own (-mavx2,-ffp-contract=off, ...) and the vendored sources compiled inside our targets do not. Nothing of ours goes in a precompiled header: it would make every unit depend on it. On in the editor tree and intools/build.sh's Linux development and test trees; off for exports, web, Android and players, which therefore check that every source includes what it uses. Not on MSVC (sources define_USE_MATH_DEFINESbefore<cmath>) or with the Xcode generator. CI turns them off everywhere (JASPERENGINE_PCH=OFFinci.yml, whichtools/build.shandtools/ci/macos.shpass to every tree; set it to reproduce a lane exactly). -
ccache needs
sloppiness = pch_defines,time_macrosto cache a unit that uses a precompiled header;tools/build.shsets it in the Linux images (no Linux unit uses__DATE__/__TIME__). A fresh tree at the same path then hits every unit while the cache holds the header's own entry: a unit hashes the.gch, and two GCC builds of one header differ in their bytes, so once that entry is evicted every unit built on it misses (a cache cut to 58 % of a core-tests build gave 15 % hits). Measured on the core-tests tree (6 CPUs, 1,900 units, host load 11-23): cold 1,403-1,575 s with precompiled headers, 1,460 s without; warm 126-141 s with, 90 s without. Hence CI'sOFF. In the Android image ccache names the compiler by--version: the NDK is unpacked in each container, so its mtime changes every run.base_diris not set: it would hand the compiler relative paths and change__FILE__. -
Debug information (
JASPERENGINE_DEBUG_INFO,engine/cmake/JasperDebugInfo.cmake):linesturns every-ga tree gets (Debug and RelWithDebInfo, a shipped game's split symbols) into GCC's-g1or Clang's-gline-tables-only(Emscripten included); a Release tree without debug information gets none, and MSVC keeps/Z7(it has no such level). Backtraces, crash reports and sanitizer reports still name each frame's function, file and line (the logger's backtraces use the dynamic symbols,dladdr); a debugger sees no types or local variables. CI builds every tree with it (JASPERENGINE_DEBUG_INFO=linesinci.yml;tools/build.shpasses-DJASPERENGINE_DEBUG_INFOto each tree it configures,fullwhen unset, and the variable into the image, where the games the editor configures take it as their default;tools/smoke-test.shpasses it too), so the lanes' ccache entries fit the budget ("CI"). Nothing else sets it: local builds,build-release.yml's editors and players, and the games users export keep full debug information. Set it to reproduce a lane exactly. -
Linker (
JASPERENGINE_LINKER=AUTO): lld (the Linux image installs it) for Debug and RelWithDebInfo builds that ship nothing, where GNU ld spent 20-53 s per link; Release builds, the editor release and every shipped game keep the toolchain's linker. -
Editor objects once:
jasperengine-editor-objectsholds the editor's sources butmain.cpp; the editor, its Windows command-line twin and the editor test targets link it. -
Vendored libraries: Jolt is unity-built where nothing ships (
JASPERENGINE_VENDORED_UNITY); the others build source by source, and ccache serves them to every tree of a configuration. -
Header fan-out (S72):
JASPERENGINE_EXPLICIT_COMPONENT_INCLUDES, defined on the engine's and the editor's targets (and the editor's tests, through the editor's definitions), turns off the includesregistry/EntityRegistry.handobject/GameObject.hkeep for code outside the engine: a source there includes each component and object it uses (component/Transform.h,object/Mesh.h), and a header that only names them takesecs/ComponentFwd.hor a forward declaration. A game's code, the exported template and the core tests build without it and see everything as before.tools/check_fanout.py(run bytools/check-changed;--tableprints the numbers) fails when a component header rebuilds more than 150 editor units, or the median one more than 80, from the tree'sninja -t deps.tools/check_headers.pycompiles each header alone, without the precompiled header;tools/check-changedruns it on the headers a change edits. "Incomplete type" in a new source ofeditor/orengine/core/means an include this file used to get by accident: add it there, not to a hub. -
C++-script games (S30's Compile builds) build in a compile tree per kit in the user cache (
<cache>/jasperengine/compile-builds/<key>/), shared by every project of that kit: the engine is compiled once and a game compiles its own units. A project's runtime settings (window, logging, crash options) are definitions of its executable only and reach the engine throughPlatformConfig, so changing them recompiles a few units.
GitHub Actions (.github/workflows/) runs on every pull request to main, in the merge queue, on
every push to main and in the advisory run it dispatches, every night and for a release. Each step is a one-line call to a script in this
repository, in the same Docker images tools/build.sh builds, so every lane reproduces locally with
the command its report prints. The design is docs/superpowers/specs/2026-11-12-ci-design.md.
Jobs of ci.yml; a lane's command is also its repro.
| Lane | Runs |
|---|---|
changes |
tools/ci/plan_lanes.py: tools/check-changed's plan for the diff, widened by CI's rules below; uploads it as the artifact plan |
lint |
the repository's and the workflows' lints |
linux |
WERROR=1 tools/build.sh linux; its editor install feeds mcp and smoke |
unit (one job per test binary: core; editor-1, editor-2) |
UNIT_SUITE=<suite> UNIT_TEST_ARGS='--gtest_filter=<f>' WERROR=1 tools/build.sh unit-tests, plus the scalar picking rerun (core); each editor part with UNIT_SHARD=<k>/2, after compiling half the objects (UNIT_BUILD_PART=<k>/2) and taking the other half from the other part (below) |
asan (one job per test binary: core, editor) |
SANITIZE=address,undefined UNIT_SUITE=<suite> UNIT_TEST_ARGS='--gtest_filter=<f>-*GpuSlow*' tools/build.sh unit-tests, the unit lane's filter (on a PR: below) without the *GpuSlow* suites (the nightly runs them under ASan); the editor job prints how much of x86-64's 2 GiB relocation reach its test binary uses (tools/ci/reloc_reach.py) |
htmlui |
JASPER_HTMLUI_PERF_SLACK=3 tools/build.sh htmlui-tests |
mcp (one job per shard) |
tools/ci/mcp_shard.sh <k> build/ci-plan: the CI suite's planned files, -j 2, without the fixture project |
smoke |
SMOKE_METHOD=compile tools/smoke-test.sh tools/fixtures/post-processing, the prebuilt tools/fixtures/unified-lighting and a project from each template |
web |
tools/build.sh web && tools/build.sh web-gate; the queue and full runs also the core-utilities and texture-formats gate projects, which a push builds without their gates |
android |
tools/build.sh android (ANDROID_ABIS=arm64-v8a on a PR; every ABI on a push, in the queue and full runs) |
windows (parallel jobs: windows-editor, windows-engine-glcore, -d3d11, -vulkan, windows-compile) |
tools/ci/windows.sh <step> on windows-latest with MSVC: the editor with its CPU unit tests (TEST_SUITES=editor, reported as windows-editor-tests, stopped after TEST_TIMEOUT) and the call CLI; the engine on each backend, OpenGL's with the core tests (TEST_SUITES=core), the D3D11 and Vulkan legs on a PR and in the queue only for their inputs (below); then a Compile build of a fixture with the editor job's install. Each job keeps its own ccache entry |
macos, ios |
tools/ci/macos.sh <step> on macos-latest: the editor (arm64), the engine, the CPU unit tests, a Compile build of a fixture; XCODE_CAS=build/.cache/xcode-cas tools/ci/macos.sh xcode ios (and macos) for the Xcode project, through Xcode's compilation cache |
linux-clang |
WERROR=1 tools/ci/linux_clang.sh: the Linux players' configuration (the full variant, every module, release) with the pinned Clang toolchain (S102 R18, R20), warnings as errors, and the player's .comment must name Clang and LLD; blocking, for an engine or Linux toolchain change (below) |
prebuilt-enginelib-linux |
S102 R16: the Linux full-variant engine library archive (PLAYER_VARIANTS=full PLAYER_ZIP=1 tools/build.sh players), its checks (tools/ci/check_enginelib.py: R14's size, no per-game unit, its toolchain record), then tools/ci/enginelib_link.py --platform linux --compare-local (AC3, AC6) with the linux lane's editor; for an archive-path change (below); advisory until it has been green on main for a week |
report |
writes the PR comment (below) |
check |
the one required status, Check (tools/ci/check_gate.py): green only when every lane that had to run passed |
Check treats a skipped lane as passed only when changes said the lane was not needed. A test lane
that ran no test, an MCP shard that ran no file, a unit job (unit-core, unit-editor-<k>) or an
ASan job (asan-core, asan-editor) without a report or that ran no test, or a merge-queue or full
run that skipped a lane turns it red. The one skip the queue may make is of an advisory lane or test
run that changes planned off for being advisory (lanes.json advisory_off).
The editor parts. The editor tests' build is most of their lane (runs 43737549764 and 43773511699:
the build 110 and 137 min, the 5,268 tests 7 min). Each part (tools/ci/plan_lanes.py UNIT_PARTS)
compiles every other object into the restored ccache, uploads the files that added
(unit-editor-<k>-ccache, a day), and waits for the other part's (tools/ci/unit_split.py wait): no
longer than its own part took, not at all when that part has not started or ended without them, or
when its own part compiled under a tenth of its objects (a warm cache: the other part's hit too). It
then builds the binary from the cache, compiling whatever it did not get, and runs its shard. A push
runs no test and builds the editor tests in one job (unit-editor), which makes the deps dump and
keeps the cache: a second part there compiled up to 2,083 objects (10 min) into a volume it never
committed while the first went on without them (push runs 46205691910, 46210728723). The hits need a configure whose objects do not depend on a precompiled header built in
the job: a GCC .gch is not the same bytes twice, so a unit built on the other part's misses. A skipped MCP test fails its shard unless tools/ci/mcp-allowed-skips.txt lists it
with the reason and the lane where it does run; a new entry is reviewed like any change.
PR and merge-queue shards run without JASPER_SLOW_BUILD: the tests that build a real game (an hour
or more each, cold) skip there and run in the nightly, and the smoke lane builds and launches games
on every change a game's build reads.
Advisory lanes during rollout. ci.yml's ADVISORY_LANES holds unit asan htmlui mcp smoke
until main is green through CI, and windows-editor-tests (the Windows editor job's test run,
reported apart from the job, until the suite passes on Windows): Check ignores their failures and
does not wait for them (its needs are report's without them, which tools/ci/test_check_gate.py
checks), and the report, which waits for every lane, shows them first, marked advisory. Lint and the platform builds always block, the
Windows jobs' builds and the core tests' run included. Since an advisory lane cannot block a merge,
the merge queue does not run it (tools/ci/plan_lanes.py --advisory "$ADVISORY_LANES"): of unit
(every job of it), asan, htmlui, mcp, smoke and windows-editor-tests (the editor leg still
builds), the ones the list names; taking a lane off the list puts it back in the queue, and the lane
(a job) must join check's needs too. Lint and the platform lanes run in the queue whatever the list says. The advisory run a push to
main dispatches runs what the queue left out instead, as the queue would have (below), so every
merged change still gets their results, in that run's report and the advisory-red issue.
changes plans the mcp lane's shards (tools/ci/plan_lanes.py, tools/mcp/shard.py plan): each
file is one chunk (one editor, its tests in order), a TESTS_INDEPENDENT file's tests are cut into
chunks of about 10 min, and the chunks go longest first to whichever of a shard's two workers ends
first. The lane ends with its slowest shard, so the times have to be right:
- Committed timings first:
tools/mcp/ci-timings.jsonholds each CI-suite file's seconds (its tests summed) and each test of aTESTS_INDEPENDENTfile, medians of PR and merge-queue shards. A file's tests without a time of their own share what its seconds leave (a test split since the refit keeps the file's total), at least the file's default when some are timed. Then the nightly's per-test seconds (themcp-timingscache) for the files it lacks, then its default a test (the suite's mean). The nightly plans by its own seconds alone: its shards build the games a PR's skip. An unreadable file is left out, and the report's fallbacks say so. - The refit:
mcp-timings-refit.yml, daily and on demand, runstools/ci/mcp_timings.py fetch(themcp.jsonof the newest 20 ci.yml runs of this repository's own branches) andrefit: one sample per run of each file, the median after dropping samples over 3 times or under a third of it, nothing from a single sample, and a new value only outside 25 % (at least 15 s) of the committed one. When an entry moved, it force-pushesci/mcp-timings-refitand opens or updates its pull request (tools/mcp/ci-timings.jsonis onCI_NOTHING_READS: its PR runs onlychangesandCheck). The GitHub Appjasper-ci-bot(secretsCI_BOT_APP_ID,CI_BOT_APP_PRIVATE_KEY) pushes, opens the PR and turns on auto-merge: the workflow token may not open pull requests here, its push starts no pull_request run (whoseCheckthe ruleset requires) and its auto-merge does not enqueue. The App's push runs CI as any PR's, and the merge queue lands the PR onceCheckis green. - The shard count: the fewest shards that no larger count (up to 8 on a PR and in the queue) beats by more than the 4 min of setup each added shard costs (checkout, image, editor install: median 236 s over 46 shards). Once the longest chunk sets the length, more shards save nothing.
- A long test is a piece no plan splits: the Title Art library's gate (52 to 103 min as one test)
runs as
test_gate_<k>_of_8. The longest chunk now istest_voxels.py(38 min).
From the PR and merge-queue runs of 2026-11-19/20 (tools/ci/mcp_timings.py fetch, then each plan
replayed on the measured medians): planned without timings (15 of 20 runs: the cache was gone) the 8
shards took 23 to 99 min; by the nightly's seconds (its game builds an hour each, a PR's skip them)
18 to 81 min in 7 shards; by the committed timings, 7 shards of 38 to 42 min.
| PR push | merge queue | push to main |
advisory run | full=true dispatch |
|
|---|---|---|---|---|---|
changes, Check |
yes | yes | yes | yes | yes |
lint |
unless every path is one nothing reads | same | no | no | yes |
linux, web, android, windows |
when anything that builds changed | yes | yes, to warm the caches (windows: the editor leg's build only) |
linux when mcp or smoke runs (their editor install); windows for windows-editor-tests (the editor leg only) |
yes |
windows (engine-d3d11), windows (engine-vulkan) |
with windows, when one of their inputs changed (below) |
the same; the nightly builds both every night | yes (no build; engine-vulkan saves the Vulkan SDK's cache) |
the same as the queue | yes |
macos |
when an Apple-only input changed (below) | yes | yes, to warm its cache | no | yes |
ios |
when an Apple-only input changed (below) | the same; the nightly builds it every night | no (no cache) | no | yes |
unit, htmlui |
the suites the plan selects | all, unfiltered; not while advisory | build only (the caches, the deps dumps) | while advisory all, unfiltered | all |
asan |
the unit lane's suites when a path the sanitizers see changed; every test when the lane's settings did; else no (below) | all, unfiltered; not while advisory | build only (each binary's cache) | while advisory all | all |
mcp |
the planned CI-suite files | the planned files, over the group's diff against main; not while advisory |
no | while advisory the planned files, over the diff since the last advisory run | the whole CI suite |
smoke |
when a game-building path changed | yes; not while advisory | when a game-building path changed (its cache) | while advisory yes | yes |
windows-editor-tests |
with the Windows editor leg | the same; not while advisory | no | while advisory yes | yes |
linux-clang, prebuilt-enginelib-linux |
for their inputs (below) | the same | for their inputs (their volumes) | no | yes |
-
Nothing reads it: a change only under
docs/specs/,docs/superpowers/,docs/engine-gaps/,docs/openengine-analysis/,docs/test-cleanup/,.claude/, a root*-LEDGER.md,README.mdortools/mcp/ci-timings.jsonruns onlychangesandCheck, on a PR and in the queue. The rest ofdocs/counts as building: the editor embeds the MCP guide, and tests read other docs. -
Ledgers ride in the PR of the work they record, so they cost no run of their own.
-
Blocking lanes only, while GitHub's runners are the bottleneck: with the repository variable
PR_ADVISORY_LANESset tooff, a pull request plans as the merge queue does: its advisory test lanes and test runs (ADVISORY_LANES: unit, ASan, HTML UI, MCP, smoke, the Windows editor tests) are planned off (advisory_off; the editor leg still builds), and itsCheckwaits for lint and the platform builds only. They run onmainafter the merge, in the advisory run a push dispatches, as for the queue. The default (on, or no variable) runs them. Set it while the organization's 60 concurrent hosted jobs are saturated, delete it when the backlog clears:gh variable set PR_ADVISORY_LANES --body off,gh variable delete PR_ADVISORY_LANES. -
Stricter than check-changed: any building change runs every platform lane, Web and Android included; a
.github/change runs everything (ASan as below); a plan error, a missing deps dump or a missing or stale coverage map widens that lane to everything, and the report says why. -
ASan on a PR (2.5 to 5 runner-hours a run) runs the unit lane's selection only when a path the sanitizers see changed (
tools/ci/plan_lanes.pySANITIZER_INPUTS): C/C++ sources and headers (.incincluded), CMake files and presets,docker/,tools/build.sh,tools/with-xvfb.sh, the gtest gate, and the vendored libraries (libs/,engine/libs/,editor/libs/). When the lane's own settings or definition changed (tools/sanitizers/,ci.yml'sasanjob or the workflow'senv, found from the diff's lines), it runs every test of both binaries (asan_filter_*), since no selection sees them. Anything else, such as CI's other jobs and scripts, docs, MCP tests, shaders, assets and a test's data, skips it on the PR. The advisory run onmainruns it after the merge, and shadow mode judges an ASan failure there against the PR's ASan selection. -
macOS and iOS on a PR build only when an Apple-only input changed (
tools/ci/plan_lanes.pyAPPLE_INPUTS): the Apple and Mac platform code (engine/platform/apple/,engine/platform/mac/), the Xcode project (engine/workspaces/xcode/) and the scripts that sync its source lists (tools/xcode_sync_*,tools/test_xcode_sync_sources.py), the Metal shader stubs it compiles (engine/shaders/msl21*), and what the lanes run (tools/ci/macos.sh,platform-common.sh,retry.sh, the report action). Aci.ymlchange alone does not count, even one to their own jobs. The reason is capacity: the organization has 5 macOS runners, and on 2026-11-23 macOS jobs waited a median of 2 h (up to 10) while the merge queue stalled behind them. The queue is the gate: it, a push tomain, full runs and the nightly buildmacosfor every change that builds, so a macOS break still stops the merge, one queue run later than a PR would have shown it. -
The path lanes (
tools/ci/plan_lanes.pyPATH_LANES, S102 R16 and §10) run on a pull request, in the merge queue and on a push tomainonly for their own inputs, and in every run that runs everything (a.github/change, no plan, full runs, the nightly).linux-clangforLINUX_CLANG_INPUTS: the engine, the toolchain description (tools/toolchains/), the Linux image,tools/build.sh, the Linux player script and its own.prebuilt-enginelib-linuxfor the archive path:ENGINELIB_PATHS(the archive's CMake modules, the packaging scripts, the editor's selection codeeditor/ExporterPrebuilt.cppand*EngineLibrar*, the R18 description and build script, its check scripts) and a changed line ofengine/CMakeLists.txtwhose whole command, or a block around it, names the R6 list, the R7 fingerprint orJASPERENGINE_PREBUILT_ENGINE(enginelib_inputs,ENGINELIB_CMAKE); not an engine change elsewhere. The queue's skip of one is a planned one (queue_off). A push builds them for their cache volumes and for R16's record: the archive lane turns blocking once it has been green onmainfor a week (take it offADVISORY_LANESand add it tocheck'sneeds). It is inADVISORY_LANESbut noQUEUE_DEFERRABLElane, so the queue still runs it.tools/ci/test_plan_lanes.pyPathLanes(AC9). -
The Windows editor leg in the merge queue builds the editor and its call CLI (what
windows (compile)and the CLI check use), not the editor-tests binary: its test run is advisory there (lanes.jsonunbuilt;tools/ci/windows.sh editorwithEDITOR_TESTS_BUILD=0). The tree is still configured with its tests, so every object is the one the ccache entry holds. The binary was 558 of the step's 3,957 build steps, about a quarter of its 110 min (run 45291112468). A pull request, a push tomain, the advisory run and full runs build it. An MSVC-only compile error in an editor test therefore shows onmainafter the merge, in the advisory run, not in the queue. -
macOS in the merge queue builds only for a macOS-only input. macOS is what caps the queue: 5 hosted runners and
je-mac, amacosjob a group. Its inputs, wider than a pull request's (the queue is the last gate), are:APPLE_INPUTS, plus Objective-C sources (*.mm,*.m), Mac and Apple named sources and resources (*/Mac[A-Z]*,*Mac.cpp,*/Apple*,editor/resources/macos/), the vendored sokol (its Metal backend),tools/ci/macos.shand the ccache actions it runs;- a C/C++ source whose text, before or after, names
__APPLE__,TARGET_OS_,SOKOL_METALor__OBJC__; - a CMake file whose changed lines or their 10 lines of context name an Apple setting (
APPLE,IOS,CMAKE_OSX,Darwin,XCODE, macOS, Metal); ci.yml'smacosjob orenv(tools/ci/plan_lanes.pyMACOS_PATHS,macos_inputs).
Without one, the lane is planned off (
queue_off), so a mac-only break (a compile error or a CPU test) shows onmainright after the merge, not in the queue. The push tomainruns the whole lane then (macos_full: its CPU tests, the call CLI and the compile smoke, which a push otherwise skips because the queue ran them), and the nightly builds it every night. Replayed over the 40 merges up to #181 (38 that build), the queue would have builtmacosfor 13 (34%) and left it out for 25; today's mix was CI-heavy. -
iOS in the merge queue follows the same rule (
lanes.jsonqueue_off, whichCheckaccepts as a planned skip).iosis a compile check of the Xcode project with the same Apple Clang the queue'smacoslane builds every change with, and macOS capacity is the bottleneck.nightly.yml'siosjob builds the project for iOS and macOS every night, whatever changed, so an iOS-only break shows there within a day; the nightly's report opens or updates its issue. Full runs build it, a push does not (it keeps no cache). There are no iOS CMake toolchain files:iosbuilds the Xcode project, not CMake. -
MCP in the merge queue is planned from the coverage map, not the whole suite: a regression the map misses is the nightly's to find. A planned file outside the CI suite (it needs the fixture project, or is
CI_EXCLUDED) is listed under "not run in CI";MCP_SUITE=alllocally covers it. -
The Windows D3D11 and Vulkan legs (56-97 min each in merge-queue runs 45115998605 to 45216542055, and
windows-compilewaits for every leg, so they set the queue's floor) build on a PR, a dispatch, in the merge queue and the advisory run only when one of their inputs changed (tools/ci/plan_lanes.pywindows_legs,lanes.jsonwindows_parts, thewindowsmatrix): the sokol renderer (engine/renders/) and its vendored library (engine/libs/sokol/), the shaders (engine/shaderlib/, their stubs inengine/shaders/), the shader compilers and translators (engine/libs/shadercompiler/: glslang, SPIRV-Cross), the shader data, variants and pools (engine/core/shader/,ShaderPool,ShaderRender), the Windows platform code (engine/platform/win/;VulkanContextfor Vulkan), the engine's presets and CMake modules,tools/ci/windows.sh,platform-common.sh, the report action, andci.yml'swindowsjob or the workflow'senv. Also a changed C/C++ file the legs compile (the engine,editor/procmat/) whose text has backend code: aSOKOL_<backend>guard, D3D11 or DXGI for D3D11, Vulkan, SPIR-V or thevkAPI for Vulkan; and a changed CMake line that names a backend or Windows, or sits in anif(),function()ormacro()that does (a source list's line is every backend's). The reason: the two legs compile the engine and its core tests asengine-glcoredoes, with the same MSVC, for one more backend, and run no test (no GPU on the runner), so all they catch is code that compiles for that backend alone. Generic engine code rarely breaks one backend alone; backend and shader paths still trigger them; andnightly.yml'swindows-enginebuilds both every night, whatever changed, so a break the rule missed shows within a day in thenightlyissue. A push, full runs and the rollback (CI_FULL_SELECTION) keep every leg.windows (engine-glcore)runs whenever the lane does. -
Push to
mainbuilds what keeps a cache and nothing else (tools/ci/plan_lanes.pybuild_onlylists what builds without its tests): it saves the caches (ccache per lane), and a PR restores whatmainsaved, never what the queue did; and it publishes the deps dumpschangesplans from (below, "Plan inputs"). The queue built and tested the same commit, so a push runs no check, nor any step the queue ran (MAIN_STAGEinci.yml). ASan builds both binaries for their entries, the Windows engine legs build without their tests andwindows (compile)and macOS make their Compile builds, for theirs, andsmokeruns when a game-building path changed, for its entry.androidbuilds every ABI andwebthe queue's two extra gate projects, as the queue does: a push that built only what a PR builds left the queue cold there (0-25 % and 33 % hits, 18-24 and 13-15 min, main's runs of 2026-11-28). -
One push run at a time. Merge-queue groups land one push each, some minutes apart (2026-11-15 to 20: 21 pushes, gaps of 62 s, 3 and 4 min among 20). Push runs share one concurrency group without cancel-in-progress: one runs, the newest waits, and GitHub drops an older waiting run before it takes a runner. A push run's
changesjob first waitsADMISSION_SECONDS(300) and steps aside, running no lane (superseded_byinlanes.json), whenmainmoved on by then with a path that builds: the newer run builds and saves. A newer push that touches only paths nothing reads does not supersede it. Each push run plans against the head of the last push run that finished (gh run list), so a dropped run's change is still built. -
The advisory run. A push that builds dispatches
ci.ymlwithadvisory: trueonmain. That run, named "Advisory tests of main at ", runs the tests of theADVISORY_LANESlanes the queue left out, as the queue would have, plus the jobs they need (above). Advisory runs share their own concurrency group: one at a time, the newest waiting. Each is planned against the head of the last advisory run that finished, so one run tests every push since that one, and its report starts "Advisory tests of the changes since ". With no earlier run, it runs every advisory lane and the whole MCP CI suite.Checkstays green on an advisory failure, so the run keeps one issue, labelledadvisory-red: opened or commented on by each run with a failing, cancelled or missing job, closed by the first green one. A run takes about 4.5 h (ASan). Over the pushes of 2026-11-15 to 20, a model with 270 min runs gives each merged change its results 5.7 h after it lands on average (at most 8.8 h), in 15 runs instead of 21, never two at once. Running them in every push run took 4.5 h but up to three runs at a time (five or six at two to four times the pushes); an hourly schedule averaged 5.9 h (7.5 to 7.9 h at two to four times the pushes). The unit, ASan and HTML UI jobs build again in the advisory run, from the entries the push runs saved (an advisory run saves none). -
ccache in CI: a build runs with no size limit (a cleanup in the middle of a build evicts the restored entries it has not reached yet, and each miss then evicts more: a PR that changed one test file hit 5 of 5,279 compiles).
ccache-savethen evicts every entry the run neither used nor wrote and prints the rest, the lane's working set, on every run; onmainit cuts a working set over the lane's cap (max-sizeinci.yml) to it, oldest-used first, and keeps one under it whole (ccache's cleanup evicts from each of its 16 subdirectories past a 16th of the cap, so under the cap it still cost the next linux build 238 of 5,284 compiles), recompresses it from the zstd level 1 a build writes to level 9 (14 % smaller: a linux sample of 296 MB took 23 s on 2 CPUs; level 12 gave 15 %, 19 22 % in 277 s), saves it and deletes the lane's older entry (prune; thecachesjob, after every lane, deletes them again). Each lane's old and new entries would otherwise both live until the push's slowest lane ended, and past the 10 GB GitHub evicts the least recently used entries of any lane: during push run 44629653601 the repository held 11.7 GB, two entries of linux, unit-core and Android, and the plan inputs, the coverage map and the Vulkan SDK were gone. A cap below the working set loses the start of the build, not all of it. The caches share the repository's 20 GB (max_cache_size_gb, raised from GitHub's default 10 on 2026-11-24); working sets from each lane'sccache-save(no precompiled headers, line tables only:JASPERENGINE_DEBUG_INFO=lines, "Build speed"), in decimal GB (ccache's caps are decimal;du -hprints binary), from PR 131's runs 44775260806 and 44806837004:Cache Working set (GB) With full debug information Cap Entry linux 0.87 1.5 0.95G yes unit-core 0.37 (0.43 on 2026-11-28, below) 1.34 0.5G yes unit-editor 0.80 (0.89) 4.0 1.0G yes asan-core 0.74 (0.86) 2.1 1.0G yes asan-editor 1.58-1.62 (the whole build: 7,721 entries of 3,863 compiles; runs 44934269450, 44959473600, 44970821863 and a local build) 4.6 2.2G yes htmlui 0.78 (2,176 compiles, Release; 0.87 of 2,305) 1.66 1.0G yes macOS 0.81 with the Compile build, which a push makes for it (PR run 45075106333) 1.30-1.37 0.9G yes Windows editor 0.92 (MSVC: /Z7as before)0.91 0.95G yes Windows OpenGL 1.50 (1.4 GiB; /Z7: its core tests' reports name frames), 1.29 recompressed; PR 176's run 452749193941.6G yes Windows D3D11, Vulkan 0.35 each (337 MiB; Release, no debug information), 0.31 recompressed; same run 0.4G each yes Windows Compile 0.45 (425 MiB), 0.38 recompressed; same run 0.5G yes iOS and macOS Xcode ( xcode-cas, Xcode's compilation cache, no debug symbols)1.14-1.23 raw, 0.35-0.38 compressed (both SDKs, five builds of two commits 36 apart, on the Mac); saved by the nightly's iosjob onmain(a push would take a macOS runner for a lane the queue mostly leaves out), and it only grows, so a nightly that restores over 2 GB starts it afresh (COMPILATION_CACHE_LIMIT_SIZE=1600Mheld it at 1.78 GB with 92 % hits on a commit seen before, against 100 % without)iOS alone 0.89 compressed 2 GB raw ( fresh-over)yes Android 0.27 (arm64-v8a); 0.88 every ABI (2026-11-28, below) 0.63 1.0G yes web 0.24; 0.62 with the queue's two gate projects 0.48 0.7G yes smoke 1.93 (the player runtime and two Compile builds, which share nothing: each its own directory) 3.5 0.5G yes, the last-used part: the second Compile build Gradle, Vulkan SDK, MCP timings, uv 0.73, 0.21, under 0.01 each yes The caps add up to 13.6 GB in ccache's sizes; a saved entry is recompressed to about 0.86 of its working set (the Windows legs: 0.85-0.89), and GitHub counts the saved archives, about 0.96 of that again (asan-editor: 1,526 MB for its 1.59 GB). At these working sets the ccache entries come to about 8.6 GB and the rest (Gradle, the Vulkan SDK,
xcode-cas, MCP timings, uv) to 1.3 GB: main's entries hold about 10 GB, and caps full everywhere about 11 GB, which leaves the 20 GB room for a push's old and new entries side by side and for the other branches' caches (the Vulkan SDK of a PR, the merge queue's Gradle) without GitHub evicting one of main's. A cap a few percent above its working set still cuts it: ccache 4.5 (the image's) empties each of its 16 subdirectories that is over a sixteenth of the cap down to 80 % of that (limit_multiple), whatever the total, and the largest subdirectory runs about a quarter above the mean. asan-editor's whole build (1.58 GB, the largest subdirectory 123 MB) lost 415 of its 7,721 entries to a 1.7G cut (1.8G: 214, 1.9G: 131, 2.0G: none;ccache --cleanupon a copy), and the push run restored from it hit 93.8 % of its compiles; restored from a 1.6G cut of its 1.61 GB, it hit 88.9 % against 96.4 % uncut. Hence its 2.2G: 16 times that subdirectory, and a tenth to grow. The other lanes' caps, about 5 % above their working sets, lose a few percent of their entries the same way; unit-core, unit-editor, asan-core and htmlui outgrew theirs (below: cut on every push, 64-83 % hits after a cut) and take 0.5G, 1.0G, 1.0G and 1.0G, 12-16 % above. Smoke, last in line (the slowest cold lanes that run on every PR came first: unit-editor, then ASan), keeps its last-used part in 0.5G: its whole 2.25 GB would take another 1.7 GB of the budget for an advisory lane, which its Namespace volume holds whole anyway. A cache with no entry builds cold, its job still reusing what an earlier step of the same job compiled. A cancelled job saves nothing (the Windows and macOS lanes): its working set lacks what it had not reached. A lane that gives its entry up has its prefix in thecachesjob's second list, so its last entry goes at once instead of holding the budget for 7 days. -
ccache on a Namespace volume: the caps above fit GitHub's budget; a lane's cache volume shares none, so it takes
volume-max-sizeinstead: its whole build's working set at zstd level 1 (a cold build's, or the largest seen) and half again, never belowmax-size(tools/ci/test_plan_lanes.pyNamespace). Working sets of main's runs of 2026-11-28 (46169358098 to 46199605386), in decimal GB, with the hits of a run on unchanged sources after the old cap's cut and after an uncut commit:Cache Compiles Working set Cap Volume cap Hits after a cut, uncut linux 5,617 0.95 (never cut) 0.95G 1.6G 99-100 % unit-core 2,704 0.43 (cut) 0.5G 0.7G 81 %, 100 % unit-editor 4,166 0.89 (cut) 1.0G 1.4G 64 %, 99 % asan-core 2,713 0.86 (cold, cut) 1.0G 1.3G asan-editor 4,166 1.83 (cold) 2.2G 2.8G htmlui 2,305 0.87 (cut) 1.0G 1.4G 83 %, 100 % smoke 6,351 2.25 (cut) 0.5G 3.5G 17-20 %, 99.8 % web 1,976; 5,914 the queue's 0.27 (cold); 0.62 (cold, queue) 0.7G 0.95G 99.9 % Android 2,102; 8,407 every ABI 0.22; 0.88 (cold, queue) 1.0G 1.35G 99.9 % macOS 7,815 0.88 (never cut) 0.9G 1.4G 99.4-99.6 % Windows editor 0.92 (cold, PR 176's run 45274919394) 0.95G 1.4G Windows OpenGL 2,703 1.50 (cold, same run) 1.6G 2.3G 100 % (PR 621) Windows D3D11, Vulkan 0.35 each (cold, same run) 0.4G 0.55G linux-clang about 2,200 (one player) not measured (Clang's objects are no GCC lane's) 0.6G 1.0G prebuilt-enginelib-linux the player and a game's shared tree not measured 0.8G 1.4G A volume holds the committed cache (at most its cap), a build's uncapped growth on top (at most one build) and the images and Gradle (at most 5.4 GB before a job, android's), so twice the largest cap (smoke's) and that come to 12.4 of its 20 GB. Only a push commits a CI lane's volume: an advisory run, planned hours before it ends, committed older trees over a newer push's (
nscloud-cache-exp-do-not-commiton every other event,tools/ci/plan_lanes.pynamespace_labels; the nightly's own volumes, below, are the nightly's to commit). A push only, not the nightly, refreshes a seed. -
Seeds: an empty volume (6 of 105 restores of main's runs on 2026-11-28, each a cold build: asan-editor 75-102 min) starts from the lane's Actions-cache entry. A push refreshes that entry from the volume when it is missing or a day old (
ccache-save: one upload a day per lane), and when the volume's cache fits the lane'smax-size, which smoke's does not; the Namespace Macs' Xcode 26.1.1 had no entry before (the hosted runners' 26.6 one never matched). What main keeps carriessaved-by.txt(run, commit, time), whichccache-restoreprints:restored <size>, saved by run .... Every lane's entry (and Gradle, the Vulkan SDK,xcode-cas) comes to about 11.5 GB of the repository's 20. -
ccache in the nightly (
nightly.yml): itsenvsets ci.yml'sJASPERENGINE_PCH=OFF,JASPERENGINE_DEBUG_INFO=linesandKEEP_GOING=1, which go into ccache's key or keep a failed build's working set whole; the release it calls (build-release.yml) inherits none and keeps full debug information. A build that is a CI lane's, with that lane's command (WERROR=1where it has it), reads that lane's volume (tools/ci/plan_lanes.pyNIGHTLY_CI_CACHE), mounted withnscloud-cache-exp-do-not-commitand restoredread-only, soccache-saveprints its statistics and changes nothing, on the volume or off it: the editor of the MCP shards and of parity (linux), the slow GPU suites under ASan (asan-core), and the Windows engine on D3D11 and Vulkan (windows-engine-d3d11, windows-engine-vulkan). A build no CI lane makes has a volume of its own, tagjasperengine-nightly-<id>(NIGHTLY_OWN_CACHE), which the nightly onmaincommits for the next night, the schedule'sccache-savetrimming and cutting it as a push's does; its cap is itsmax-size, since it has no Actions-cache entry. Off Namespace those builds run cold and save nothing: as entries (about 11 GB together, by the table below) they would crowd CI's out of the 20 GB. Their working sets are not measured yet, so each cap is the nearest CI lane's whole build and half again, within the volume as above; the first nightly'sccache-savelines give the real ones:Cache Build Nearest CI lane (working set, GB) Cap nightly-htmlui-vulkan HTML UI tests on Vulkan htmlui (0.87) 1.4G nightly-htmlui-asan HTML UI tests, ASan and UBSan (Debug) htmlui, twice as asan-core is unit-core (1.7) 2.7G nightly-tsan both unit-test trees under TSan (Debug) asan-core and asan-editor (2.69) 4G nightly-texture-formats-vulkan the core tests on Vulkan unit-core (0.43) 0.7G nightly-unity unity build of the editor and the engine linux (0.95) 1.6G nightly-unity-core-tests unity build of the core tests unit-core (0.43) 0.7G nightly-unity-editor-tests unity build of the editor tests unit-editor (0.89) 1.4G nightly-web-threads the pthreads web build web (0.27) 0.45G nightly-coverage-editor the editor with --coveragelinux's editor, 3,603 of its 5,617 compiles, and the notes files (1.0) 1.6G nightly-export-checks two Compile builds (pixel fonts, Pixel FX) smoke's two Compile builds (1.5 of its 2.25) 2.3G nightly-prebuilt-enginelib-linux AC6's shared-tree build of a C++ game (the engine, Clang) linux (0.95) 1.6G nightly-prebuilt-enginelib-web, -android the same for the web and one Android ABI web (0.27), Android (0.22) 0.45G, 0.6G nightly-prebuilt-enginelib-windows, -macos the same with MSVC and Apple Clang Windows OpenGL (1.50), macOS (0.88) 1.6G, 1.4G Parity reads the linux lane's cache for its editor; its player runtimes (ten trees of about 2,175 compiles each) stay cold: by smoke's working set they and the editor would come to about 8 GB, past the 7.3 GB cap a 20 GB volume allows. The MCP shards, on GitHub's runners, restore nothing: their player runtimes, the games of the slow builds and the web project are no CI lane's build (the linux entry they restored hit 0 of 2,099 compiles, nightly 46192772195).
-
ccache in the release build (
build-release.yml): the Android players are one job per release variant (players-android,tools/ci/plan_lanes.pyANDROID_RELEASE_VARIANTS; the full variant's also builds the stable channel's development flavour), each with a volume of its own, tagjasperengine-release-players-android-<variant>(RELEASE_OWN_CACHE), which a release ofmain(the nightly's, a stable one) commits as the nightly's own; off Namespace they build cold and save nothing. The release keeps full debug information, so its objects are no CI lane's. Its cap, 5G for every variant (itsmax-size), comes from lite2d's three ABIs: 2,859 compiles, 1.42 GB at zstd level 1 (1.16 at level 9), and 99.9 % hits (2,856) on a second build of the same tree, 305 s against 819 s cold; the full variant, about twice lite2d's compiles by its build time, half again within the cap, and twice the cap and the images within the 20 GB volume as above. -
Full run: the nightly runs the whole suite on
main; never dispatchfull=trueby hand.
changes plans a PR from two inputs made on main: the Ninja deps dumps of the three test trees
(tools/ci/dump_deps.sh, by the unit and htmlui lanes on every push) and the MCP coverage map (the
nightly's coverage shards). They live on the data branch ci-plan-inputs, not in the cache: GitHub
evicted the cache entries of both for days at a time (of the 135 PR and merge-queue runs from
2026-11-14 to 2026-11-20, 11 had a map; of the 67 PR runs after the first deps dump was saved, 11 had
none), and each missing input widened its lane to everything. tools/ci/plan_inputs.py:
publishreplaces the branch with one parentless commit holdingmanifest.json(each input'smaincommit and run),coverage-map.json.gz,deps/<tree>.deps.gzandshadow.jsonl(below), over what the branch held; a push another job won is retried on top of it. The deps dumps are compacted first (every object with its dependencies inside the repository, a vendored library's with its source: 152 MB of dumps become 34 MB, 1.6 MB compressed), and select the same suites (tools/ci/test_plan_inputs.py; 150 sampled sources of the real dumps, 0 differences).- Writers: the
plan inputsjob of a push tomain(the deps dumps) and the nightly'sCoverage mapjob onmain, the only jobs withcontents: write, runningmain's code. The branch is outside themainruleset; a PR, a fork or another branch's run never writes it. fetch(thechangesjob, read-only) writes what the branch has intobuild/ci-inputs; no branch or no input fetches nothing, and the plan widens as before. Locally:python3 tools/ci/plan_inputs.py fetch --out /tmp/inputs, thentools/check-changed --deps-from /tmp/inputs/depswithJASPER_MCP_COVERAGE_MAP=/tmp/inputs/coverage-map.json.- Freshness: the map is remade every night and a map older than 14 days or 400 commits still widens
(
MAP_MAX_AGE_DAYS,MAP_MAX_COMMITS); the deps dumps on every push tomain.
The plan records a reason for every suite and MCP file it selects (check_changed.REASON_KINDS), in
check-changed.json (unit_reasons, mcp_selected[].kind) and lanes.json (selection), and the
changes job prints it in its summary (selection.md: a row per test lane, the first 40 reasons,
what widened the plan and the plan inputs' commits and when they were published):
| Kind | A suite or file runs because |
|---|---|
owner |
its own source changed (a test unit, an MCP test file) |
dependency |
it includes what changed (Ninja's deps), or runs, calls or loads it (the coverage map, a tool's name, a path) |
policy |
a rule watches the changed path: a shader's *Gpu suites, the compile and game-build files, the save guard, the agent-docs and guide checks |
smoke |
it is one of the 10 quickest files that run code nearly every editor runs |
full |
the event runs the whole suite (merge queue and advisory run units, a full run, the nightly) |
fallback |
a widening ran the whole suite, and says which (no map, a stale map, a new source, CMake, a test's data, .github/) |
Shadow mode measures what the selection would miss before anyone trusts it further. A run that
runs more than a PR would (every unit test: the merge queue's, or the advisory run's while the unit
lane is advisory; a full=true run; the nightly: the whole MCP suite) carries in lanes.json a shadow: what a PR's selection of its diff would run
(plan_lanes.py shadow_selection; the nightly's diff is the one since the coverage map's commit,
--shadow-base, planned with the inputs a PR would have had). tools/ci/shadow.py check judges each
failed test of a scope the run ran whole (unit core, editor, HTML UI, MCP) against it, an ASan job's
against the PR's ASan selection (shadow.asan):
- caught: the PR selection runs it; miss: it leaves it out; pre-existing or flaky: left out, but the history saw it fail within 7 days; no change to blame: the diff is empty.
ci.yml'sshadowjob (merge queue, push, dispatch, the advisory run included; read-only) prints the record in its summary and uploads it as the artifactshadow; the nightly'sShadow selectionjob judges its own MCP run, gathers theshadowartifacts of CI's runs since its last record, appends them toshadow.jsonlonci-plan-inputs(the tracked report, the newest 500 records) and printsshadow.py reportof it.python3 tools/ci/plan_inputs.py fetch --out /tmp/i && python3 tools/ci/shadow.py report --history /tmp/i/shadow.jsonlreads it anywhere.- A miss is a selection gap until shown otherwise: find why the selection left the test out (a
dependency no input records), and fix the rule with a test in
tools/test_check_changed.py. - Replayed over the 50 merge-queue runs with plans from 2026-11-16 to 2026-11-20 (their
check-changed.jsonagainst their unit, HTML UI and MCP reports): 422 failures caught, 91 pre-existing or flaky, 6 misses: five HTML UI tests at their first failure in run 43871305894 (a change with no HTML UI file; they failed in every later run that ran them, somainhad broken them), andPhysicsContactsTest.ContactProcessingCostIsSmall(a cost budget, failed again two days later on an unrelated change).
The engine library override (S102 R17): once the archive path has been clean in 10 nightlies in a row, a
pull request's (and the merge queue's) MCP compile tests link the last nightly's Linux engine library archives
instead of compiling the engine, when the change touches nothing under engine/, tools/toolchains/ or the
Linux image (R7's fingerprint could not match). The count is enginelib-gate.json on ci-plan-inputs, which
the nightly's enginelib-gate job writes on main (tools/ci/plan_inputs.py enginelib-gate): one more when
every archive-path job passed and no MCP test of a file linking the archives failed, back to 0 otherwise, the
same after a night without a release. changes reads it (--engine-libs-gate) and says why in lanes.json
engine_libs_override; the mcp lane then fetches the newest published nightly's archives
(tools/ci/enginelib_fetch.py nightly, each against its SHA256SUMS) and passes JASPER_ENGINE_LIBS_DIR with
JASPER_ENGINE_LIBS_ANY_VERSION=1, the CI-only flag that lifts a dev editor's version lock (a release editor
ignores it); a fingerprint mismatch compiles. tools/ci/test_plan_inputs.py EngineLibsOverride (AC10).
Rollback: the repository variable CI_FULL_SELECTION set to true turns the selection off: a PR
or merge-queue run whose change builds runs every lane whole (unit and HTML UI unfiltered, the whole
MCP CI suite), an advisory run its lanes so, and its plan says so in fallbacks; prose nothing reads
still runs nothing.
gh variable set CI_FULL_SELECTION --body true sets it, gh variable delete CI_FULL_SELECTION lifts
it; the next run's changes reads it.
- Nightly (
nightly.yml, 03:17 UTC, or dispatched): the slow configurations (HTML UI on Vulkan and under ASan, TSan, texture formats on lavapipe, the unity builds of the editor, the engine and both unit-test trees, the pthreads web gate, prebuilt player parity, the Windows engine and its core tests built on D3D11 and Vulkan,windows-engine) and the whole MCP CI suite, which also refreshes the coverage map (below, "Plan inputs") and the nightly's own shard timings (themcp-timingscache). A failure opens or updates the issue labellednightly. Whenmainmoved, it publishes the prereleasenightly-YYYYMMDD(the newest 5 are kept); the slow lanes do not hold it back. - The engine library archives (S102 AC3-AC6, S103 AC1, AC2, AC4, AC7, AC12), after the nightly's release,
with its archives (the
enginelib-archives-*artifacts) and its editors:prebuilt-enginelib-<platform>for Linux, Windows, macOS, iOS, web and Android buildstools/fixtures/cpp-cube(a C++ script on a lit cube) against the archive (tools/ci/enginelib_link.py:engine_library: prebuilt <id>, a build log with only the game's units, the game run headless, through the browser gate, on the emulator or the simulator), then with--engine-library local(the shared tree) and compares them (AC6: the frame at S30 AC5's bar, the exported symbols, the linker, sections within 1 %);enginelib-linux-toolchain(tools/ci/enginelib_ac4.sh) links it with the pinned toolchain alone in the no-compiler image, checks the refusals and builds the toolchain twice;enginelib-floors-macoslinks the Apple archive with a newer Xcode (Namespace's image has 26.2 and 26.3 beside 26.1.1) and with the Command Line Tools alone;android-compileandandroid-templateare S103's routes,export-parityits old projects' exports;enginelib-gatecounts R17's clean nightlies. The Apple jobs run after the release's Apple jobs, so the nightly queues behind itself within the 48-vCPU macOS quota. Xcode 26.1.1 (S102 R19): every Apple job that builds a player or an archive, or links AC3's game, setsDEVELOPER_DIR=/Applications/Xcode_26.1.1.app/Contents/Developerand runstools/ci/xcode_pin.shfirst, which fails when the image no longer has it or itsxcodebuild -versionreads another (tools/ci/test_xcode_pin.py). - Nightly smoke: every fixture's smoke on OpenGL, GLES3 and Vulkan (
tools/ci/nightly-smoke.sh), each game built with a prebuilt player in the no-compiler image. It builds no editor or player: it waits for the nightly's release and installs that release's Linux editor and players (tools/ci/nightly-smoke-players.sh run); when no release was built, the newest published nightly's if it is of the same commit (published, checked against itsSHA256SUMS), else it skips and says why. Fixtures with C++ scripts orProjectBuild.cmakeneed Compile and are left out. - Stable (
release.yml, dispatched with avX.Y.Zversion, an optional commit that defaults to the newest nightly's, anddry_run): tags the commit, checks the tag (tools/ci/check-release-tag.sh) and builds it. - Both build through
build-release.yml: every player variant ofengine/player/variants.json, each with its engine library archives (ENGINELIB=1, S102 R1, R2: Android one per ABI, Windows a second compile without/Z7), checked in its job (tools/ci/enginelib_check.sh, AC2) and uploaded apart (enginelib-archives-*);player-hasheschecks that every release player has its archive (tools/ci/check_enginelib.py) and hashes both kinds; then the editors embedding their hashes, launch checks,SHA256SUMS, and a draft release that is published once every asset is attached. - Signing:
tools/ci/macos.sh packagesigns the macOS editor's.app(in the zip and the dmg) with Developer ID and the hardened runtime, notarizes and staples the.appand the dmg, and checks both withspctl, when the repository secretsMACOS_SIGN_P12_BASE64,MACOS_SIGN_P12_PASSWORD,MACOS_SIGN_TEAM_ID,APPLE_API_KEY_P8_BASE64,APPLE_API_KEY_IDandAPPLE_API_ISSUER_IDare set (onlynightly.ymlandrelease.ymlpass them on). With none set it signs ad-hoc and logsad-hoc signed: Developer ID secrets not set; with only some set it fails. The one entitlement (editor/resources/macos/JasperEngine.entitlements) lets the editor load the C++ scripts that a user's toolchain signs ad-hoc. The player archives stay ad-hoc signed, because an export re-signs the player's bundle (editor/platform/MacBundle.cpp: the user's identity, else ad-hoc) and Xcode signs an iOS game. The Windows and Linux editors are unsigned. - A nightly's dry run:
gh workflow run nightly.yml --ref <branch> -f dry_run=truebuilds only the release of the branch's head and stops at a complete draft of its own,nightly-YYYYMMDD-dry-run-<run id>(its assets keep the version's names): no suite, no pruning, no issue, and no wait for another run of the version. Delete the draft afterwards (gh release delete <tag> --yes, as the publish step's log says). A run that finds a failed run's draft of its version takes it at its own commit.
- On a PR: one comment, marked
<!-- jasper-ci-report -->and updated by every run. It names the commit, every failed lane with its failing build lines or tests, the repro command, the evidence, and what did not run and why; when green it is one line.reportinci.ymlwrites it;ci-report.ymlwrites it for a pull request from a fork, whose run cannot. - Merge queue: a group that fails removes the PR and posts the same report on it, prefixed "Removed from the merge queue". The commit it names is the queue's merge commit.
- Advisory run: its report heads the job summary; a failing, cancelled or missing job opens or
comments on the issue labelled
advisory-red, and the first green run closes it (above). main: a failed push opens or updates the issue labelledci-red, and comments on the PR that made the commit.- Each run: the same text in the job summaries; per lane the artifacts
ci-report-<lane>(JSON: failures, test counts, commands, timings, disk) andtest-results-<lane>, kept 14 days.
gh pr checks <N> --watch # wait for Check
gh pr view <N> --comments # the report
gh run download <run> -p 'ci-report-*' # its JSON, per lanetools/ci/time-budget.json holds what CI time a test may cost: per suite (core, editor, htmlui,
mcp, by lane) a cap for one test, for MCP also for one file, and the suite's total on a complete run
(no filter: the merge queue's unit and HTML UI lanes, the editor's two parts added up); the tests and
files above a cap are listed with their measured seconds and a reason. report.py collect measures
each lane's tests against it and the PR comment lists what is over, marked advisory: Check does not
count it. A listed test may grow by tolerance (2: one runner measured the same tests 1.4 to 1.7 times another), a total by total_tolerance (1.5).
What is over gets cheaper (above, "Writing load-robust tests"; one owner per contract, a smaller check
where it covers the same contract) or its budget raised in the PR, with the reason a reviewer reads:
python3 tools/ci/time_budget.py check --lane mcp-3 build/test-results/mcp.json # what the report would list
python3 tools/ci/time_budget.py allow mcp test_x.py::test_y 300 --reason "why it must cost this"
python3 tools/ci/time_budget.py ratchet --lane unit-core build/test-results/core.xml # lower what got cheaperIts tests: python3 -I tools/ci/test_time_budget.py.
- Run the printed command. It is the lane's command narrowed to the failure, for example
UNIT_SUITE=core UNIT_TEST_ARGS='--gtest_filter=MeshBvh.Refit' WERROR=1 tools/build.sh unit-testsorMCP_TEST_ARGS='-k test_undo_paint' tools/build.sh mcp-tests tools/mcp/tests/test_tileset.py. - Linux, Web and Android lanes run
ghcr.io/<owner>/jasperengine-<target>-build:<hash>, where<hash>istools/build.sh image-tag <target>, the hash a local build tags its own image with;JASPER_DOCKER_IMAGE=<that name>runs CI's copy. - An MCP shard:
tools/build.sh linux, download the run'splanartifact intobuild/ci-plan, thentools/ci/mcp_shard.sh <k> build/ci-plan. - Windows:
tools/ci/windows.sh <step>in Git Bash inside an x64 Native Tools prompt. macOS:tools/ci/macos.sh <step>with Xcode.
What a job does before its build or test step, paid by every job of a run (about 30 Linux jobs on a PR or in the queue, about 100 in the nightly).
-
Free disk (
.github/actions/free-disk): anubuntu-latestrunner starts with about 87 GB free of 145 (2026-11-20). The action removes the preinstalled Android SDK, .NET, GHC, CodeQL and Docker images (about 26 GB, 1-2.5 min) only when/has less free than the job'sneed: its largest use of/seen in its reports'diskline (the build tree, the image and the caches), plus a quarter and 10 GB. Measured use in GB (2026-11-20, PR, queue and nightly runs) and theneedset:Job Use needasan(editor; core 30)55 80 android(every ABI, queue)44 65 unit(editor; core 19)40 60 smoke33 55 web17 35 linux,htmlui14, 13 30 mcp5 20 nightly slow(TSan; the others 5-30)56 80 nightly MCP and coverage shards 23 40 nightly parity87 none: always frees release players Linux, Android, web 44, 49, 12 65, 75, 25 A job without
needalways frees. A job whoseneedis not met after the removal gets a warning in its log; raise itsneedwhen its reported use grows. -
Image (
.github/actions/image): pullsghcr.io/<owner>/jasperengine-<target>-build:<tag>anonymously (the packages are public) and logsimage: pulled <ref> in <n> s. A tag the registry does not have (a PR that changesdocker/, until its merge runsimages.yml) is built in the job from the registry's layer cache and logsis not in the registry; building it, thenimage: built <ref> in <n> s; a missing tag is asked for once, any other pull failure twice. On a Namespace runner the build runs on Namespace's remote builder (the runner's current buildx builder), which the run's jobs share; elsewhere on adocker-containerbuilder of the job's own (thedockerdriver cannot read a registry cache).images.ymlpushes zstd layers, which unpack about 4 times as fast as gzip (Docker 23 or later pulls them;JASPER_DOCKER_IMAGE=<ref>needs one locally); tags pushed before that stay gzip until the weekly rebuild. -
Editor install (artifact
editor-install, fromlinuxtomcpandsmoke; the nightly'snightly-editor-install):tools/ci/editor_install.sh packleaves out the folders the install copies unchanged from the checkout (the Title Art HDRIs, fonts and thumbnails, the sound library: half the archive, already compressed), andunpackcopies them back from the job's checkout of the same commit: 199 MB to 100 MB. A folder the build changed travels in the archive. -
Checkout: depth 1, except
changes(every commit,filter: blob:none),mcp(depth 2: the title golden ledger compares the merge commit with its base) and the nightly's and the release's build jobs (every commit and tag forgit describe,filter: blob:none: the history without the old file contents).
Three machines of the project's owner take CI jobs when GitHub's runners of their OS are all taken:
je-mac (Apple Silicon), je-linux (x86-64, Docker) and je-win (x86-64, 8 cores and 7 GB). Each is
one repository runner (one job at a time), labelled self-hosted, its OS and arch, and its je-*
label, running as the machine's normal user under its runner folder (~/je-runner, C:\je-runner) as
a service that starts with the machine (macOS: with the user's login) and reconnects after sleep.
tools/ci/self-hosted/ installs it (install-runner.sh, install-runner.ps1, windows-tools.ps1).
With Namespace on for an OS (below), its jobs are Namespace's and no overflow runner takes them.
Hosted first. changes routes a job (tools/ci/plan_lanes.py route; ci.yml reads
runs_on.<job>, the hosted label when it is missing) to an overflow runner only when all of these hold:
- the run may use one: a push, the merge queue, a dispatch, or a pull request whose head repository is this one, never a fork's;
- it is not the rerun of a run the watchdog moved off a runner that went away (the state's
hosted_only, below), nor of a forced dispatch: those stay on GitHub's runners, so they never wait for the same machine again. A rerun for an idle runner (below) routes as a first attempt does; - the runner state (
state.jsonof the data branchci-runner-state, fetched as the plan starts; not a repository variable, which a run reads as it is created, up to an hour beforechangesgets a runner) is under 5 min old (STATE_MAX_AGE), and says the hosted runners of the job's OS are saturated: a job of that OS waits while its limit is used up (macOS: 5 running; any OS: 60 hosted jobs of the organization), or has waited 5 min. The merge queue, the critical path, takes the Mac as soon as any hosted macOS job waits; - the runner is online, idle (no job running or queued for it) and fit (its disk has
min_free_gb), andSELF_HOSTED_DISABLEDdoes not name it; - the job is on the runner's list (
OVERFLOW, best first), within what the runner takes of one plan (TAKES, one by default):je-mactakesmacosandios(it buildsiosin 12 min, run 45104498209), one after the other;je-linuxlinux(the MCP and smoke lanes wait for it), else the longest build;je-winthe D3D11 or OpenGL engine leg. The Windows editor leg's MSVC build does not fit in 7 GB in its time. The box reset itself 19 min into the D3D11 leg once (run 45104498209; Kernel-Power 41, its sixth such reset in two days, five of them before it ran CI); the watchdog reroutes a job it loses that way.
The changes job's summary and lanes.json (routing) say where each job went and why.
The planner overflows too. changes cannot route itself, and on 2026-11-23 it waited up to an
hour for a hosted Linux runner (79 Linux jobs queued, the oldest for 4 h), so no plan ran at all. The
dispatcher sets the repository variable SELF_HOSTED_PLANNER to je-linux while hosted Linux is
saturated and je-linux is online, fit, idle (no job running or queued for it) and not disabled, and
deletes it otherwise: runs created while it plans go hosted, so planners never queue behind each other
or a build. A run reads
vars as it is created, which is when its changes job is queued, so the value is current where it
is used. changes runs there on a first attempt of a trusted event other than a push (a push waits
ADMISSION_SECONDS first). While it plans, je-linux takes no lane (the state marks it unfit,
"reserved for changes"): every run's changes would otherwise queue behind a build. A non-queue run's changes
queued 5 min for a busy runner anyway (PLANNER_WAIT) is rerouted as for a lost runner: cancelled and
rerun on GitHub's runners. A merge-queue run's is not (a cancel fails its group). If the runner goes away, the watchdog reroutes the run as below, and the rerun
plans on GitHub's runners.
The state and the watchdog (tools/ci/runner_dispatch.py): a cron job runs it every minute on an
always-on host whose gh is a repository admin, from a sparse clone of main refreshed hourly. It
reads the runners (GitHub's status, and an ssh probe of each machine's listener and free disk, since
GitHub reports a listener that takes jobs as offline at times) and the jobs of the queued and running
runs, and force-pushes the state to ci-runner-state as one parentless commit. Then, for runs that have a job on a je-* label only (it never
touches a run it did not route): a job queued 10 min for a runner that is offline or gone, or running
on one offline for 3 min, or failed because its runner went away ("lost communication", "shutdown
signal", read as soon as the job ends), gets its run cancelled and, once stopped, rerun whole (gh run rerun): the rerun plans on
GitHub's runners only. A pull request's run that a newer push superseded is not rerun.
A merge-queue run is cancelled only when its job cannot finish. A cancel fails its Check: the
queue removes the pull request, and every group behind it restarts (run 45310250691, #153's group:
about 2 h lost for a job that would have waited). So the dispatcher cancels a queue run only:
- when one of its jobs already failed because its runner went away (the group is red anyway);
- or when a job has been queued for a runner gone 30 min (
QUEUE_OFFLINE_LIMIT), not 10.
It does not cancel one for a runner that went offline mid-job, since GitHub fails that job itself
and the first case follows. It never cancels one for an idle runner, a busy planner or anything that
only makes it wait. After such a cancel the pull request goes back to the front of the queue
(enqueuePullRequest with jump: true, unless it is queued already): a rerun of a removed group
builds nothing.
Re-routing a waiting job. A plan routes once, so a job queued on a hosted label stays there even
when an overflow runner becomes idle. When a trusted run's job has waited 15 min
(IDLE_REROUTE_WAIT) for a hosted runner while an overflow runner that would take it (OVERFLOW) is
online, idle, fit and not disabled, the dispatcher cancels the run and reruns it, so its plan routes
it there, one run per idle runner a minute. Never a merge-queue run's (above). The runs moved off a runner that went away are listed in the state's hosted_only for a day,
and their reruns plan hosted only. Each run gets at most one reroute of each kind, and none for an idle
runner after one for a lost runner: never a loop. All of it shares the limit of 6 actions an hour, each
logged to the host's je-runner-dispatch.log. With no state for 5 min (the host, gh or the cron is down) every
job goes hosted, so an offline machine never holds a run.
Taking a machine out: gh variable set SELF_HOSTED_DISABLED --body je-win (labels, or all);
the next plan leaves it alone, and gh variable delete SELF_HOSTED_DISABLED brings it back. A job
already on it finishes; stopping the runner service instead lets the watchdog reroute what waits.
Testing one: gh workflow run ci.yml --ref <branch> -f self_hosted='macos=je-mac windows-engine-d3d11=je-win'
runs only those jobs' lanes, those jobs on those runners whatever the state says (its rerun: hosted).
Safe on a person's machine.
- Each runner's job-started hook (
tools/ci/self-hosted/job-started.sh,.ps1) fails any job that is not this repository's push, merge queue, dispatch or same-repository pull request before its first step: a pull request runs its ownci.yml, so the routing alone cannot keep a fork's code off the machine. GitHub also asks a maintainer to approve the workflows of every outside contributor's pull request (the repository's fork approval policy). - The jobs get their own
HOMEand git global config inside the runner folder, so nothing a job writes there (Xcode's DerivedData,brew's anduv's caches,git config --global) reaches the user's own.free-diskdoes nothing there;brewandchocoinstall only what is missing. - The job-completed hook empties the job's workspace (only a folder under the runner's
_work), so build trees never pile up. Linux lanes restore ccache from the Actions cache as on GitHub's runners (their image mounts the workspace's); on macOS and Windows a runner keeps its own ccache per lane in its tool cache, capped at 3 GB (ccache-restore;ccache-savesaves none of it): the hosted entry hit 0 of 3,834 compiles on the Mac (other paths, though the same Xcode 26.6) and took 7.5 min to download (run 45104498209), where the Mac built the editor cold in 11 min. On Linux it removes the Docker images CI pulled (.github/actions/imagenotes them in the runner's tool cache) that no job used for 3 days, or every one but the newest of each when under 100 GB is free, and cuts the CI image builder's cache to 10 GB; on macOS it empties the runner's home's caches past 20 GB. - The Mac stays awake (
caffeinate) while a job runs; a closed lid still sleeps it, and the watchdog reroutes. - Jobs build with
JOBS(and on LinuxCPUS) from the runner's.env, under the machine's cores, so the user's own work stays usable.
Namespace gives the project Linux, Windows and macOS runners. They are off
unless the repository variable NAMESPACE_RUNNERS says otherwise:
-
On:
gh variable set NAMESPACE_RUNNERS --body on(every OS), or the OSes it takes (--body 'linux macos'). Off:gh variable set NAMESPACE_RUNNERS --body off, or delete it. A run reads it as it is created; a run already planned keeps its runners. Unset oroff, every job'sruns-onis the GitHub-hosted label it always was (tools/ci/test_plan_lanes.pyNamespace). -
Where jobs run: on a first attempt (and any rerun the watchdog did not make),
changesgives each job of those OSes a Namespace machine, labelled in the workflow, so no dashboard profile is needed:nscloud-ubuntu-24.04-amd64-<vCPU>x<GB>,nscloud-windows-2022-amd64-...,nscloud-macos-tahoe-arm64-.... The shapes are intools/ci/plan_lanes.pyNAMESPACE_SHAPES: no Linux or Windows job gets more than 16 GB, the memory of GitHub's hosted runner where every lane passed, and no macOS job more than 14, since memory is what the plan's concurrency limit (Linux 160 vCPU and 320 GB, Windows 80 and 160, macOS 48 and 112) runs out of first. So 8x16 for every build and test lane (linux,unit,asan,htmlui,smoke,web,android, every Windows leg), 4x8 for each MCP shard,lintandchanges, and 8x14 formacosandios. The disk comes with the shape (32 GB plus 8 GB per vCPU or per 2 GB of memory, whichever is more: 96 GB at 8x16), andfree-diskdoes nothing there, so each Linux shape holds its job's measured use (Job setup). A build withoutJOBSruns as many compiles as the memory holds, 4 GB a unity or sanitizer unit and 2 another (tools/ci/build_jobs.py, read bytools/build.shandtools/ci/platform-common.sh): Ninja's default, cores + 2, ran an 8x16 unity build out of memory. Namespace queues a job past the concurrency limit, so a larger shape costs parallelism, not failures. A fork's pull request stays on GitHub's runners.Check,reportand the housekeeping jobs always do, so a Namespace outage cannot hold the required status. An overflow runner takes no job that is on Namespace, and the dispatcher counts none of them as GitHub's. -
The nightly and the release build: their long jobs are routed the same way, by
tools/ci/plan_lanes.py runners(WORKFLOW_JOBS, through.github/actions/runnersinnightly.yml'srunnersjob andbuild-release.yml'scheck-inputs), on a schedule too. Their keys are their own (one per slow suite and Windows leg of the nightly, and per Android release variant), so no overflow runner takes one. The release build's have no cache volume (they restore the Actions cache and commit nothing) but the Android players' ("ccache in the release build"). The nightly's builds read a CI lane's volume without committing it, or commit one of their own ("ccache in CI", "ccache in the nightly"). Their Linux and Windows jobs get 8x16 and their Apple ones 8x14, under the same caps. The nightly's MCP and coverage shards (about 40 jobs) and the housekeeping jobs stay on GitHub's runners. -
Caches: each Linux lane,
macosand each Windows leg butwindows-compilehas its own cache volume (tagjasperengine-<lane>, 20 GB; Windows mounts it atK:\cache). Namespace forks it for each job and commits it only from a push's jobs (nscloud-cache-allow-commit-from-main, andnscloud-cache-exp-do-not-commiton every other event): pull requests, the queue and the advisory run read it, as with the Actions cache. ccache lives there (ccache-restore: Linux bindsbuild/.cache/ccacheonto it withnamespacelabs/nscloud-cache-action, macOS and Windows pointCCACHE_DIRinto it), andccache-savetrims it and cuts it to the lane's volume cap (volume-max-size, "ccache in CI"). A volume with no cache of its lane yet is seeded from the lane's Actions-cache entry, which a push refreshes ("Seeds" above), so a new volume does not start cold. The Linux volumes also hold the Docker images (nscloud-container-image-cache), andandroid's holds the Gradle caches. A nightly job that reads a CI lane's volume commits nothing either (nscloud-cache-exp-do-not-commit).windows-compile,ios(the nightly's Xcode cache entry) andlintkeep the Actions cache. Namespace's docs show cache volumes on Ubuntu only; PR 621 probed Windows: the volume mounts atK:\cache(NSC_CACHE_PATH), and a rerun ofwindows-engine-glcorestarted from what the first run committed. -
Setup on Namespace (measured by NS probe runs 46476128091, 46478579543 and 46480815159 on a probe branch, 2026-11-30):
- Image builds: the image action builds an unpublished tag on Namespace's remote builder, not on a
builder of its own, which would bypass it (Namespace's docs: no
docker/setup-buildx-actionon their runners). With every layer changed, the linux image took 211 s there and 18 s in the next job of the run, against 270 s in each job on adocker-containerbuilder.images.ymlstays on GitHub's runners, so it keepsdocker/setup-buildx-actionand the registry's layer cache, which the remote builder reads too. - Homebrew: the macOS jobs install their tools in one
brew install, withHOMEBREW_NO_INSTALL_CLEANUP: 10 s against 19 s.namespacelabs/nscloud-cache-action'sbrewmode is not used: it hides the image's Homebrew cache, so brew fetched a newer formula index and then failed to pourca-certificates(undefined method '[]' for nil). - Not used: the git mirror (
nscloud-git-mirror-<N>gbwithnamespacelabs/nscloud-checkout-action). The mirror needs a cache volume (changesandlinthave none), a checkout with it mustdissociateor git in the build images cannot read the objects, and none of 8 jobs on 3 OSes found a mirror an earlier job had committed. A cold mirror cost 22-28 s on Linux (actions/checkout: 14 s), 46-50 s on Windows (17) and 19 s on macOS (12); a warm one saved 5 s on a depth-1 checkout and 15 s onchanges' full history. - Not needed: action downloads take 0.1-0.2 s each on Namespace, with or without a cache volume
(about 1 s on GitHub's runners), and the jobs'
uvinstalls take 1-2 s. No job runs apt on the runner.
- Image builds: the image action builds an unpublished tag on Namespace's remote builder, not on a
builder of its own, which would bypass it (Namespace's docs: no
-
When Namespace is down:
tools/ci/runner_dispatch.pycalls an OS down when one of its Namespace jobs has waited 10 min (NAMESPACE_DOWN_WAIT) while none of that OS runs there: an outage, the app uninstalled, or a plan not enabled. A full concurrency limit is not down, since jobs are running. The verdict lasts until a job runs there, or 30 min (NAMESPACE_HOLD) after it was last seen, after which plans try Namespace again. While it lasts:- plans put that OS's jobs on GitHub's runners (
lanes.jsonrouting:namespace <os>: GitHub's runners); SELF_HOSTED_PLANNERisubuntu-latest, so new runs plan there;- the watchdog cancels a run waiting on Namespace and reruns it on GitHub's runners (the state's
hosted_only). A merge-queue run is cancelled only after 30 min (QUEUE_OFFLINE_LIMIT), and its pull request goes back to the front of the queue.
Without the dispatcher (its host down), nothing falls back by itself. Switch the variable off, then cancel the waiting runs and start new ones (a push, a dispatch, a re-enqueue), which plan on GitHub's runners.
- plans put that OS's jobs on GitHub's runners (
-
Testing it:
gh workflow run ci.yml --ref <branch> -f self_hosted='linux=namespace windows-engine-d3d11=namespace macos=namespace'runs only those jobs' lanes, with those jobs on Namespace whatever the variable says (with it on, the planner and the lanes' other jobs too). Each job's "Set up job" step names its runner, andccache-restorelogsthe Namespace cache volume at <path>.
Warm-cache times are not measured yet: the first runs after CI lands on main fill this table, and
set each job's timeout-minutes to about 1.5 times its p95.
| Lane | p50 | p95 | Runs |
|---|
Cold builds on a GitHub-hosted ubuntu-latest runner (4 vCPU), ccache off, 2026-11-13 (one run each):
| Build | Minutes |
|---|---|
UNIT_SUITE=core RUN=0 tools/build.sh unit-tests |
43 |
UNIT_SUITE=editor RUN=0 tools/build.sh unit-tests |
111 |
SKIP_ENGINE=1 tools/build.sh linux |
73 |
the same three with UNITY=1 |
not measured on a runner; on a 16-core host, "Unity build (R25)" below |
From the first PR runs (cold): the core tests ran in 65 min on llvmpipe, the editor tests' share is
in the editor leg; under ASan the *GpuSlow suites took 135 of 167 test minutes (hence their
nightly job); an MCP shard of about 330 tests took 24 to 86 min without the game builds, and four
game-building tests took 18 to 91 min each, cold.
unit (editor) in one job, ccache restored but missing (2026-11-15/16): run 43737549764 123 min (setup
4, build 110, all 5,268 tests 7), run 43773511699 141 min (setup 4, build 137, 39 tests 5 s). The tests
spread evenly (the longest 31 s), so only splitting the build halves the lane: two parts, about
65 min each cold (setup, half the build, the merge and links, half the tests), and about the one job's
time warm.
The ASan lane (-*GpuSlow*): CI's core runs stopped at 2,760 tests (VoxelPhysics.BudgetPerTick), so
the rest is estimated from the non-ASan times (GPU tests 1.9 times slower under ASan, CPU tests 7.0,
from the tests both measured): the core tests about 132 min, of which five GPU tests 37 min, now
*GpuSlow (a full local ASan run, a loaded host: 74 of 222 min); VoxelSoakSlow.IncrementalEqualsRebuild
(about 10 min, CPU) stays. The editor tests under ASan: 62 min for the 4,308 a local run reached.
The editor's ASan build with line tables only (JASPERENGINE_DEBUG_INFO=lines), cold: 120 and 133 min
for its 3,863 compiles (runs 44934269450, 44959473600), the editor's own sources at 17-19 a minute;
warm, 15 min (run 44970821863). With full debug information a cold run reached 1,555 of them in its
300 min (run 44923917704), the editor's at about 2 a minute. Memory is not what limits the line-tables
build: its heaviest units peak at 3.2-3.7 GB (WorldTools.cpp, InspectorWindow.cpp, Project.cpp;
4.3-5.6 GB with full debug information, the objects 2.3-2.6 times larger) and its compiles average
about 0.7 GB, so Ninja's default 6 jobs fit the runner's 16 GB; the lane sets no JOBS.
In one job (merge-queue runs 44416194181, 44487933891, 44582664923, 44582666848) the cold core build took
79-116 min, the core tests 90 and the editor's build 168-175, so the 270-min step ended before the
editor tests: hence a job per binary, cold about 3-3.5 h for core and 3.7-4.6 h for the editor (its
tests estimated).
Third-party notices are credits, not a gate: tools/ci/check-notices.py stages whatever licence
files and NOTICE.md rows exist into the editor install and exported games; CI does not fail on a
library without them.
The Chrome for Testing headless shell in docker/web.Dockerfile, and uv and Kitware's CMake in
docker/linux.Dockerfile, are pinned by version and sha256 and bumped by hand, as are the MCP
harness's packages (tools/mcp/requirements.txt). Every workflow action is pinned by its full commit
SHA, with its version in a comment.
A one-off network failure while fetching something does not fail a job: the images' apt
(docker/apt-retries.conf), wget and curl retry with their own flags, sdkmanager in a loop;
Gradle retries through systemProp.org.gradle.internal.* in
engine/workspaces/androidstudio/gradle.properties (Gradle 9.6 ignores the keys without
systemProp.), and the NDK is installed before Gradle with a retry; a workflow's download commands
(brew, choco, curl, gh release download) run through tools/ci/retry.sh, and the Vulkan SDK
action gets a second step when the first fails. Windows ccache comes from its release zip
(tools/ci/ccache_windows.sh: pinned version and sha256, cached, ccache --version checked), not
Chocolatey, which exited 0 with nothing installed during an outage. Nothing else is retried: a flaky test gets DISABLED_
and an issue.
What the suites do not cover today, and what closing each gap would take. Each needs money, a
device or a decision; recorded by BF23 (docs/specs/BF23-authoring-audit-fixes.md, section 4).
| Gap | Evidence | What it would take |
|---|---|---|
| No native compile check for generated HLSL and MSL | The windows and macos CI lanes build and run CPU tests only, and tools/check-changed has no fxc, dxc or metal step |
A step in those lanes that compiles them |
| Particle goldens run on glcore and Vulkan only | docs/specs/S20-particles.md, "Goldens" under Deviations |
Devices for Metal, D3D11 and GLES3 |
| Mobile particle performance rows are unmeasured | docs/perf/particles.md, "Not measured here" |
A person with reference phones |
| S20's "Web: est. X ms" hint was never built | docs/specs/S20-particles.md (Risks), no match in editor/window/InspectorParticles.cpp |
Delivered by S91's cost table |
| The agent guide has 451 bytes free above its headroom, and S35, S90 and S91 all want some | tool_budget.py --check, measured 2026-11-04: 6,241 of 8,192 bytes, 1,951 left, 1,500 required |
The second to land moves its own detail out, per docs/mcp/conventions.md. Measure with tool_budget.py --groups all |
Measured on build server B (Docker, GCC 11.4) while S02 landed. Later specs append their own records to their spec files, not here.
From the run's googletest output; a suite is a googletest test suite.
| Area | Suites | Tests | Minimum |
|---|---|---|---|
| ECS + registry | ComponentArray, EntityManager, ComponentManager, Signature, EntityRegistryTest, TagManagerTest, LayerCollisionMatrix, Physics |
95 | 60 |
| Math | Vector2/3/4, Quaternion, Matrix3, Matrix4, AABB, OBB, Ray, Plane, Sphere, Rect |
179 | 80 |
| Stream | StreamEnum (every enum pair), StreamComponent (every component type), StreamValue, StreamScene, Fixtures/StreamFixtureScene (17 scenes) |
140 | 100 |
| CommandHistory | CommandHistoryTest |
42 | 25 |
| AssetDatabase | AssetDatabaseTest, AssetDatabaseGuid |
36 | 25 |
| Renderer CPU | PipelineState, ShaderManifest, ShaderReference, ShaderDataSerializer, ShaderKey, ShaderVariantCollection |
51 | 30 |
RenderGpu |
render_unlit_plane, render_lit_cube goldens |
2, glcore and Vulkan (lavapipe) | 2 |
Totals: jasperengine-core-tests 356 (utilities included), jasperengine-editor-tests 218.
Each behaviour was reverted in a scratch worktree, tools/build.sh unit-tests run, and restored:
| Area | Reverted | Failing test (first assertion) |
|---|---|---|
| Math | Matrix4::transpose copies instead of swapping |
Matrix4.TransposeSwapsRowsAndColumns: t.get(col, row) 1, m.get(row, col) 0 |
| ECS | EntityRegistry::destroyEntity skips componentManager.entityDestroyed |
EntityRegistryTest.DestroyEntityDropsEveryComponent: hasEntity(entity) true |
| Renderer | ShaderManifest keeps colour defaults in sRGB |
ShaderManifest.ColourDefaultsAreStoredLinear: 0.5 vs pow(0.5, 2.2) |
| Stream | lightTypeToString(SPOT) writes "point" |
StreamEnum.LightTypeRoundTrips: 1 vs 2 for 'point' |
| CommandHistory | canRedo() is index <= list.size() |
CommandHistoryTest.StartsWithNothingToUndoOrRedo and 6 more |
| AssetDatabase | refresh() never finds the moved file's old entry |
AssetDatabaseTest.RefreshSeesMovedFiles: 2 changes, expected 1 |
The run: core 356 ran, 3 failed; editor 218 ran, 9 failed; gtest-gate exit 1 for both.
Sanitizer red controls (a scratch test, not committed): a read of a deleted std::vector's
buffer under SANITIZE=address,undefined stops the run with ERROR: AddressSanitizer: heap-use-after-free ... SanitizerRedControlTest.cpp:10, and two threads incrementing one int
under SANITIZE=thread with WARNING: ThreadSanitizer: data race ... SanitizerRedControlTest.cpp:17;
in both runs the binary aborts and gtest-gate fails on the missing XML.
| Run | Result |
|---|---|
SANITIZE=address,undefined tools/build.sh unit-tests |
core 356 ran (GPU suites included), editor 218 ran, 0 failed, no leak report |
SANITIZE=thread UNIT_SUITE=core UNIT_TEST_ARGS='--gtest_filter=-*Gpu*' tools/build.sh unit-tests |
354 ran, 0 failed, no race report |
WERROR=1 tools/build.sh unit-tests |
both trees build with -Werror; 356 + 218 ran, 0 failed |
What the first ASan runs found, and the fixes: ThorVG replaced the global operator new/delete
but not the sized delete, so ASan's sized delete freed ThorVG's malloc blocks
(alloc-dealloc-mismatch in the first static initializer); the vendored ThorVG no longer replaces
them at all (engine/libs/thorvg/CMakeLists.txt lists the local patch), and the core tests'
allocation counter replaces the plain forms in the test binary only. The editor leaked the default sky's six decoded
faces (about 7 MB) every time a scene with useDefaultTexture was decoded after the first
(ProjectUtils::setDefaultSkyTexture now reuses the pooled faces). A CameraComponent value owns
a Framebuffer that only RenderSystem frees, when its entity is destroyed; the tests free the
ones they make. The headless GL context stays open until exit under ASan, or Mesa's driver
allocations show up as <unknown module> leaks. Later (BF5), about 1 MB of V-HACD hulls leaked
whenever Physics Placement's convex decomposition was cancelled while V-HACD handed its merged
hulls over: its finalize loop stopped and cleared the map that owned the rest. The vendored
header now frees them (engine/libs/vhacd/README.jasper.md);
ConvexDecomposition.CancelWhileFinalizingFreesTheHulls cancels at that point and measures the
heap. With it the editor tree under ASan + UBSan ran 871 tests with no leak report. A loaded
Project frees its scenes and their renders in its destructor only while the engine runs (the
editor's is destroyed after Engine::systemShutdown): a test file's static Project registers with
editor::test::releaseAtExit (editor/tests/support/EditorTestSupport.h), or every scene and its
render leaks at exit, and editor::test::closeProject also drops a loaded project's scene histories.
UNITY=1 tools/build.sh linux and UNITY=1 tools/build.sh unit-tests (both suites) build. On a
16-core host shared with other builds, JOBS=8 CPUS=8 WERROR=1, ccache off, precompiled headers
on, 2026-11-17, one run each (seconds):
| Tree | Cold | Cold, unity | Scene.cpp edited | unity | Project.cpp edited | unity |
|---|---|---|---|---|---|---|
SKIP_ENGINE=1 tools/build.sh linux (Release) |
1,517 | 960 (-37 %) | 16 | 18 | 31 | 68 |
UNIT_SUITE=core RUN=0 tools/build.sh unit-tests |
954 | 738 (-23 %) | 69 | 82 | ||
UNIT_SUITE=editor RUN=0 tools/build.sh unit-tests |
2,910 | 1,910 (-34 %) | 52 | 50 | 78 | 138 |
An edit rebuilds the 16 sources of its unit, and with ccache a unit misses whenever any of them
changes, or when a source added to or removed from the target moves the batch boundaries after it.
No PR lane builds unity: tools/check_unity_scope.py and the nightly's unity jobs keep the trees unity-safe.
dbus-run-session -- tools/mcp/run-tests.sh tools/mcp/tests/test_protocol.pyin the Linux image: 12 passed.MCP_SUITE=ci tools/build.sh mcp-tests -j 2(AC13): 24 files, 121 passed, 0 failed, 1 skipped, 346 s.tools/smoke-test.sh tools/fixtures/post-processing(AC14): PASS in 227 s, with the AC6 check of the exported tree (no presets file, no warning or sanitizer options in its cache).WERROR=1 tools/build.sh linux: 0 warnings on our targets.
tools/build.sh webthentools/build.sh web-gate: PASS (0 errors, ready line, centre pixel (255, 254, 254),crossOriginIsolatedtrue). With a plantedLog::errorinengine/project/main.cppthe gate fails (red control, before the merge).WEB_THREADS=1 tools/build.sh web,GATE=sample-project-threads tools/build.sh web-gate: fails, on a real engine problem: 19 console errors "Tried to spawn a new thread, but the thread pool is exhausted".engine/CMakeLists.txtlinks threaded builds withPTHREAD_POOL_SIZE=4, whileEngine::systemInitstartshardware_concurrency() - 1pool threads (plus Jolt's). The page still reaches the ready line and renders. The nightlyweb-threadsjob stays red until the pool size follows the engine's thread count. Served without COOP/COEP (GATE_ARGS=--no-isolation) the gate fails as it should (no isolation, no ready line).tools/build.sh android: builds.tools/ci/check-presets.sh linuxandweb(in their images),check-notices.py,test_gtest_gate.py(14),test_check_notices.py(10),check-release-tag.shcases (v1.2.3at the commit passes;v1.2.3-bad, another commit,v1.2fail), actionlint 1.7.12 on both workflows: pass.tools/build.sh htmlui-tests(AC11, onlibs/googletestandengine/tests/support): 3,237 ran, 74 skipped (3,311 declared), 0 failed, no golden changed.tools/build.sh htmlui-editor-tests: 72 ran, 1 skipped (the live Google Fonts test), 73 declared.
S03's tests (engine/tests/core/io, editor/tests/data_safety) run in the same binaries:
jasperengine-core-tests 381, jasperengine-editor-tests 247.
WERROR=1 tools/build.sh unit-tests: 381 + 247 ran, 0 failed.SANITIZE=address,undefined tools/build.sh unit-tests: 381 + 247 ran, 0 failed, no leak report.WERROR=1 tools/build.sh linux,tools/build.sh web+web-gate(PASS),tools/build.sh android: pass.test_protocol.pyandtest_data_safety.py: 15 passed.MCP_SUITE=ci tools/build.sh mcp-tests -j 2: 124 passed, 0 failed, 1 skipped.tools/smoke-test.sh tools/fixtures/post-processing: PASS.- The unit job's lints:
check_raw_writes.py --self-testand the tree pass,check_stream_keys.py(58 tables) passes; notices, presets and actionlint pass.
Round 2, on oe-port 50c7afd3d (S11, S17 merged; server B with JASPER_HTMLUI_PERF_SLACK=3, timings
on the benchmark host E):
tools/build.sh htmlui-tests(glcore, without the perf suites andEffectLifecycleTest.Hundred*): 3,379 ran, 0 failed, 74 skipped.BrowserParity(the 277 Chromium references, unchanged) and the batching equivalence pass.HTMLUI_BACKEND=vulkan, the whole suite twice: 3,379 ran, 0 failed each. The earlier order-dependentRenderPrimitive.MatchesTheMeshPathfailures were 8-sample layer targets on lavapipe (it has 1 and 4): invalid Vulkan usage that drew into foreign memory; HTML UI targets now take the device's highest count up to the asked one, and the comparison skips 8 there.JASPER_HTMLUI_S16_OFF=1against the pre-S16 goldens (AC1): see the spec's Deviations (p1/texture_effectstraced and fixed).HTMLUI_TEST_ARGS=--gtest_filter=HtmlUIRenderPerf.*on the benchmark host: 9 passed (docs/html-ui/render-benchmark.md; B2 44 % of the baseline engine time, B6 43 %).- Gate on 592d8ed28 (B):
WERROR=1 tools/build.sh linux,tools/build.sh htmlui-editor-tests,tools/build.sh unit-tests(core and editor),tools/htmlui/run-rmlui-tests.sh --docker,tools/build.sh web+web-gate,tools/build.sh android,tools/smoke-test.sh tools/fixtures/post-processing(glcore and Vulkan): pass.docs/mcp/TOOLS.mdregenerated withgen_tool_docs.py(195 tools). - MCP (
test_html_ui_*.py,test_ui_render_stats.py,test_protocol.py,test_profiler.py,test_tool_budget.py): S16's failures fixed (inspect_uiover its 1792-char budget; the render stats test counting the cards the list's scrollport culls; S17's example play goldensinventory/server_browserpredating S16, updated with ledger rows). The others failing on this oe-port (test_html_ui_componentS04 asset type,test_html_ui_phase2/_integrationS17 patch reload,test_html_ui_effects"Loading" dialog under load,test_html_ui_export,test_html_ui_agent_sim) are fixed on BF2's branch, whose run on oe-port passes them.
Final tree (oe-port 64d735104, S20 and S28, merged; f6c0639f0 and the docs after it):
tools/build.sh htmlui-tests(glcore): 3,480 ran, 0 failed, 75 skipped.JASPER_HTMLUI_S16_OFF=1against the pre-S16 goldens (AC1): 3,480 ran, 0 failed.HTMLUI_BACKEND=vulkan, twice: 3,480 ran, 0 failed each (server B).HtmlUIRenderPerf.*on the benchmark host E: 9 passed (B2 41 % of the baseline engine time).- Gate on C:
WERROR=1 tools/build.sh linux;gen_tool_docs.py(225 tools, no change); MCP (test_html_ui_*.py,test_ui_render_stats.py,test_protocol.py,test_profiler.py,test_tool_budget.py,test_tool_conventions.py,test_search_organisation.py): 345 passed, 3 failed, the three failing without S16 too:test_html_ui_checks::test_cli_default_includes_ui(S14'stexture_importsin the check summary; the test is updated on the origin/main sync branch) andtest_html_ui_video_export's two export tests (the exportedposter.png, S14). - On 14dcdfed6 (the S20 merge, C):
tools/build.sh unit-testscore 1,331 and editor 881 ran, 0 failed;htmlui-editor-tests76 ran, 0 failed;run-rmlui-tests.sh --docker37,670 assertions pass; web + web-gate and android pass. - Smoke on a build directory made before S20: the export copied the old
core/action/ParticleSystem.*thatbuild/linux/editor-install/bin/enginestill held (S20 moved them tocore/object), and the exported build failed; removing those installed engine copies before the build fixes it:tools/smoke-test.sh tools/fixtures/post-processing(glcore and Vulkan), web + web-gate pass on the final tree.
Landing gate (oe-port 6f47d2c48, S22 and S14b, merged; d32267af6 and the docs after it):
WERROR=1 tools/build.sh linux; gen_tool_docs.py (229 tools, no change); htmlui glcore and Vulkan
3,480 ran, 0 failed each (B); unit tests core 1,419 and editor 883 ran, 0 failed (B); MCP
(the files above): 345 passed, 3 failed, the same three that fail without S16;
test_html_ui_phase2::test_mistakes_are_reported (four copies at once, five rounds) 0 of 20
failed with the screenshot's HTML document wait, 3 of 20 without it; smoke (glcore and Vulkan,
the installed engine copies removed first), web + web-gate pass (C).
Landing gate on oe-port 424925911 (S26, BF5, S08 merged, 7dc3a625e and after): the Xcode project
parses with no dangling reference or duplicate id and every xcode_sync_*.py --check passes (its
msdfgen core group had lost its closing lines in the S17 merge; xcode_sync_s16.py --check now
parses the file); WERROR=1 tools/build.sh linux; htmlui glcore and Vulkan 3,480 ran, 0 failed
each, unit tests core 1,452 and editor 1,029 ran, 0 failed (B); MCP (the files above with
test_docs.py and test_reflection.py): the three failures without S16, and two of S16 fixed
since: the default listing 22 characters over its 100,000 with S26's and S08's tools (inspect_ui
44 shorter) and S08's reflection goldens without S16's project settings, generated
setHtmlUiRenderOptions and htmluiprim shader key (updated, nothing else in them changed);
their rerun (test_reflection, test_tool_budget, test_html_ui_tools, test_tool_conventions,
test_docs, test_protocol): 73 passed, 0 failed; gen_tool_docs.py 236 tools; smoke (glcore
and Vulkan, on the host), web + web-gate pass (C).
The full suite (MCP_SUITE=all JASPER_SLOW_BUILD=1 JASPER_SLOW_TESTS=1 tools/build.sh mcp-tests -j 2) on server D (16 cores, the container capped at 8 CPUs, the host shared with other runs).
| Run | Runner wall | Test time | Result |
|---|---|---|---|
| before (S30 0ece8c33f) | 9,427 s (2.62 h) | 5.16 h | 1045 passed, 9 failed: S29's 7 test_pose_runtime, test_build.py::test_desktop_build_and_run (S30: the compiled game's job had no executable), test_data_safety.py::test_crash_recovery (once) |
| after, first (aa400ead2; both runtimes built cold, 3,627 s, host load 35 to 43) | 10,001 s (2.78 h) | 5.46 h | 1046 passed, 8 failed (the same, without test_crash_recovery) |
| after (e910cc237; runtimes rebuilt with ccache, 557 and 913 s, at nice 15; longest files first) | 8,161 s (2.27 h) | 4.47 h | 1047 passed, 7 failed (S29's test_pose_runtime only) |
| after the oe-port merge (dc6eb4f2d: S29's fix, S32, SYNC#3; tested at b95489ae6 with TOOLS.md regenerated) | 7,705 s (2.14 h) | 4.22 h | 1107 passed, 3 failed: test_reflection.py::test_golden_resave and test_codegen_golden (S32's goldens want the 2D scene's points transparent; feat/s30-shipping alone fails them the same way on B, without SYNC#3 or BF9), test_vat_inspector.py::test_move_and_delete_keep_the_pair (builds not done in 120 s on the loaded host; it passes on B) |
The files that build games went from 8,891 s of test time to 4,667 s (4,394 s after the merge). Per file, before and after:
| File | Before | After |
|---|---|---|
test_build.py |
4,971 s | 2,788 s |
test_html_ui_video_export.py |
1,272 s | 33 s |
test_call_cli.py |
950 s | 17 s |
test_html_ui_export.py |
813 s | 23 s |
test_html_ui_effects_export.py |
877 s | 1,799 s |
Before, test_build.py stopped right after its compile, on the missing executable. After, it
also runs the compiled player and compiles the broken source. test_html_ui_effects_export.py
is still a compile; it took longer under that run's load. The files that build nothing ran 1.18
times slower in the last run than before (the host's load). At the earlier run's load the
suite's test time comes to about 3.8 h, about 1.9 h of wall time at -j 2.
What is left is not builds. Two compiles remain (about 1.3 h of test time, see the table above
for why), and the software-rendered golden and shader tests make up the rest
(test_materials_pbr, test_html_ui_examples, test_shader_library, test_post_fx_*,
test_reflection, test_shadows).
The compiled tests then lost their fixed 3 and 2 build jobs. They build with the container's CPU
allowance (harness.build_jobs(): JOBS, else the --cpus quota from cgroup cpu.max, 8 on D),
because Docker's cap is what shares the host. Re-run alone on D, at -j 2 and load 9 to 23
(165c2b31e): test_build.py 2,675 s to 1,515 s (its compile 1,216 s),
test_html_ui_effects_export.py 1,638 s to 1,139 s, test_busy.py unchanged; 17 passed.
The compile path's missing executable is fixed: the Compile fallback holds its finish until the
content manifest and the executable are set. S30 made the same fix (9d854d51e, holdFinish),
which this branch now uses.
The baseline is int-mcp-a6701ba45 on A: 5.2 h of tests at -j 2 in an 8-CPU container (10.3
test-hours, A at load 30 to 52), after 2.2 h of builds.
Where the 2.2 h went: S34's merge changed flags and widely included headers on a server that had not
compiled them, so the editor (2,238 steps), the sample project (1,646, a 19-minute LTO link, 976 s
on A at load 15 to 24) and the mesh-raycast web build (1,482) all missed. ccache across worktrees
already works: every worktree is /src in the image, so base_dir is not needed. An editor build of
oe-port in a new worktree: 2,144 direct hits of 2,150 compiles, 158 s.
What the slow tests spent ("now": the coverage run below, or the warm run of the files that build games):
| Test | Before | Now | What it was |
|---|---|---|---|
test_html_ui_effects_export::test_desktop_player_draws_the_effects |
3,977 s | 302 s | a compile without ccache and an LTO link; ccache 1,237 hits, 8 misses, no LTO |
test_build::test_desktop_build_and_run |
2,476 s | 929 s | a compile without ccache; now 601 hits, 8 misses; keeps LTO (the suite's LTO check) |
test_hub::test_create_from_templates |
1,542 s | 177 s | a compile at 3 jobs; now 593 hits, 6 misses, no LTO |
test_materials_pbr::test_khronos_models |
2,310 s | 13 tests, 19 to 491 s | polling every mesh, each call a frame; now a test per model, in chunks of their own |
test_shader_library::test_cli_library_matrix_all_backends |
1,639 s | 249 s | one process compiling one variant at a time; now a process per backend |
test_fluid_inspector::test_preview_bar_on_a_play_created_fluid |
1,815 s | 642 s | 3 to 5 s frames: a software-rendered fluid in the Inspector |
The seven files that build games, warm, -j 4 in an 8-CPU container on A: 1,038 s, 42 passed, both
runtimes reused from the shared cache. The same files with a new runtime key: 5,284 s, of which 3,744
and 4,223 s of runtime builds at nice 15 (172 and 254 misses). The prebuild does not wait for its
turn: when only files that need a runtime are left, a worker builds the second one at once.
A runtime build with an empty ccache, no LTO, both at once at nice 15 in an 8-CPU container: 2,414 s (Development) and 2,388 s (release), against 6,624 s and 4,816 s (with LTO) in the baseline.
The coverage run (the suite without the slow builds, an instrumented editor, -j 4 in an 8-CPU
container, H at load 30 to 37): 4,822 s, 5.2 test-hours, longest test 642 s, 1,181 passed, 1 failed (below),
7 skipped by design (the slow builds; the web latency gate).
Editors on the RTX 3080 Ti: the 34 lane files, 7,259 s of test time on llvmpipe under load, take
1,223 s, two at a time. test_fluid_inspector.py's 2,296 s took 53 s there, and one absolute dye
threshold keeps it on llvmpipe.
tools/check-changed on past streams, each its own tree and diff, with this tool (--root), in 8-CPU
containers. The trees predate the caps and the caches, so their MCP times are not this branch's.
| Stream | Changed | Selected | Result |
|---|---|---|---|
| fix/mac-test-engine-dir | 1 header | 10 of 188 MCP files, 16 tests; 19 editor suites | passed: units 25 s, MCP 164 s (of which the web build 148 s) |
| BF12 fix/screenshot-texture-wait | 15 files | 160 files, 1,055 tests; 113 core and 211 editor suites | units passed; MCP 8,986 s, 1,048 passed, 7 failed: frame or preview timeouts and a 4.5 s hang report at high load, no Mesa thread cap in that tree. Its red test (test_screenshot_waits.py) and GltfTexturePixels were selected and passed |
| BF13 fix/bf13-editor-dataloss | 63 files | 187 files, 1,174 tests; 72 core and 211 editor suites | MCP 8,055 s, 1,173 passed, 1 failed (a 3.7 s hang report at load 40 to 54). The tests that failed in its logs (test_camera_texture_cost.py) were selected and passed. NavAgentTest failed: below |
| S34 feat/s34-player-size (dry run) | 75 files | everything: the root CMakeLists.txt |
not run |
So a narrow change selects few tests and a stream that touches create_entity, screenshot or the
frame selects most of the suite (of 1,189 tests, the CI suite alone is 1,131, so its fallback is
nearly the full suite too).
Found on the way:
test_reflection.py::test_codegen_goldenis flaky on oe-port, on llvmpipe and on the RTX:RigidbodyComponent::solidBoxDensityhas no initialiser, so the generated C++ prints garbage (-95312802931886636396528534812354412544.000000f). BF14 gives it one.- The same test failed once on the RTX on
clouds.weatherMap.setPath(...): whether a generated scene sets a texture's path depends on when its load finished. Fixed inFactory::formatTexture(BF20). - Nine files failed on the RTX (BF20 has them all on the lane now):
- Pipelines are made off the render thread on a GPU and at once on llvmpipe, so whatever draws
once and keeps the result must wait for them. A stateful UI effect ran its passes without the
ones whose pipeline was not ready (
test_html_ui_effects.py's fog,test_fluid_effect.py's burst): the passes now start over until each has its pipeline. A pose sheet read back a target the model had not been drawn into (test_pose_render.py): it now waits forgetWaitingDrawCountto stand still.MeshSystem::loadGLTFleft a reload'svertexCounts toRenderSystem::loadMesh, seconds later on a GPU, and a save meanwhile wrote those of the reversed slots (test_pose_window.py). - Tests:
test_fluid_inspector.py's dye amount follows how many frames a drag takes, andtest_place_with_physics.pyraced a job against a CPU and frames faster than llvmpipe's. - Not reproduced on af184d8f1:
test_upgrade_from_main.py's rewrittenLevel1.sceneandtest_lattice_bake.py's 1.9%; BF16's runs predate BF15's late image binds.
- Pipelines are made off the render thread on a GPU and at once on llvmpipe, so whatever draws
once and keeps the result must wait for them. A stateful UI effect ran its passes without the
ones whose pipeline was not ready (
tools/build.sh linux's LTO link prints 11-Wodrwarnings aboutspv::enums, the two vendored copies ofspirv.hpp(glslang, spirv-cross), since S34. No warning from our own targets.NavAgentTest.CharacterControllerDriverdepended on the order of the tests:NavSceneTest::step()ran outside the fixed phase, where a CharacterController moves byEngine::getDeltatime(), the last frame of whatever earlier test ran one. A selection (withAnimatorGpu.ThreeControllerPosesAndARetargetedWalk) failed it every time, alone it passed. The fixture now steps in the fixed phase. A filtered run can show such a test up; a full run's order hides it.