diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 28e9a01d88..4d8ece1fc4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -164,13 +164,16 @@ jobs: # The tests build with the optional craft-fonts input (crates/text/build.rs), so the # Japanese font tests that skip without it run. Same commit as release.yml. craft-fonts-ref: cc9269cd8d8258785dac603fba3122e5d2556795 - # Cargo.toml's dev profile already keeps line tables only. - dev-debug: "" + # CI test binaries carry no debuginfo and no symbols (CARGO_PROFILE_TEST_STRIP below): a + # test build drops from ~19 to ~6.5 GB. A panic still names its file and line; only + # backtrace frames lose names and lines. Local builds keep Cargo.toml's line tables. + dev-debug: "0" cache-version: v2 env: | PHOTOCRAFT_FULL_SWEEP=${{ inputs.full_sweep && '1' || '0' }} PHOTOCRAFT_NO_PRINT=1 LPDEST=photocraft-no-such-printer + CARGO_PROFILE_TEST_STRIP=symbols timeout-minutes: 100 # On main, a `cache warm` leg builds xtask and the tests, as each shard does, and saves the # dependency cache as soon as the build succeeds; the shards then only restore, so a failing @@ -245,6 +248,8 @@ jobs: # The gate sets these; rust-cache hashes CARGO_* and RUST* variables into its key. CARGO_INCREMENTAL: 0 CARGO_NET_RETRY: 10 + CARGO_PROFILE_DEV_DEBUG: "0" + CARGO_PROFILE_TEST_STRIP: symbols steps: - name: Harden runner uses: step-security/harden-runner@1d88384fd173af6ecb012dfd0264a306b711241a # v2.22.4 diff --git a/Cargo.toml b/Cargo.toml index eac941937a..f2e7f0b2c4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -174,27 +174,27 @@ opt-level = 0 # every crate that uses `craft`, photocraft-text included, waits for the whole framework. At 2 the # chain from craft-host to the facade took 38 of the 77 build minutes of the Windows unit leg, and # rustc shares no generic instantiations across crates at 2 (it does at 0 and 1). -# With the whole framework at 0, ten more photocraft-ui-egui tests overflowed their 2 MiB stack on -# Windows, so the runtime every frame passes through (contract, shell, canvas, panels, widgets, -# host) builds at 1, as do the crates with per-frame or per-pixel code (theme, behavior, imaging, -# text, font loading). The panels, tools and services around them build at 0, as in craft-libs. -# `cargo run` and `cargo build` use the dev profile and are unaffected. +# The framework's frames are small enough for this: a nesting level of the pass costs 21-26 KB of +# stack at opt-level 0, and the app's own state is boxed, so the deepest tests stay well inside +# their 2 MiB stack on Windows. Only the crates with per-frame or per-pixel code (theme, +# behavior, imaging, text, font loading) build at 1. `cargo run` and `cargo build` use the dev +# profile and are unaffected. [profile.test.package.craft] -opt-level = 1 +opt-level = 0 [profile.test.package.craft-ui] -opt-level = 1 +opt-level = 0 [profile.test.package.craft-ui-contract] -opt-level = 1 +opt-level = 0 [profile.test.package.craft-ui-shell] -opt-level = 1 +opt-level = 0 [profile.test.package.craft-ui-canvas] -opt-level = 1 +opt-level = 0 [profile.test.package.craft-ui-panels] -opt-level = 1 +opt-level = 0 [profile.test.package.craft-ui-widgets] -opt-level = 1 +opt-level = 0 [profile.test.package.craft-host] -opt-level = 1 +opt-level = 0 [profile.test.package.craft-theme] opt-level = 1 [profile.test.package.craft-behavior]