mirror of
https://github.com/storytold/lightcraft.git
synced 2026-10-24 18:18:12 -06:00
The fixed four jobs were safe on 8 GB but too many for 4 GB, and slower than needed on large machines. `cargo xtask ci` now uses one build job per 2 GB of installed RAM, capped at the CPU count, and 4 if the RAM can't be read (/proc/meminfo, Win32_ComputerSystem, hw.memsize). With line-table debuginfo, 4 jobs measured about 3 GB of RAM in use and 2 jobs about 1.5 GB. Test threads follow but stop at 4: more barely shortens CI, and at 16 threads on a loaded machine the wall-clock frame-budget test offline_originals_never_block_a_frame failed (one 303 ms frame). Explicit CARGO_BUILD_JOBS / RUST_TEST_THREADS still win. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>