Skip to content

Commit f2e3954

Browse files
committed
Reuse debug dependencies for the CI Unity size gate
1 parent 0dc1f6f commit f2e3954

2 files changed

Lines changed: 13 additions & 17 deletions

File tree

‎examples/unity_baseline.rs‎

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -388,8 +388,12 @@ fn compare(previous: &Report, current: &Report) -> Vec<String> {
388388
);
389389
}
390390
if previous.compiler_build != current.compiler_build {
391-
changes.push(
392-
"compiler build differs; review and remeasure under identical build settings".into(),
391+
// The native utility's optimization level affects measurement time,
392+
// not the requested Wasm profile. Keep it as provenance; all emitted
393+
// module, section, function, and resource budgets still apply below.
394+
println!(
395+
"Native compiler build changed: {} -> {}",
396+
previous.compiler_build, current.compiler_build,
393397
);
394398
}
395399
for (name, now) in &current.fixtures {
@@ -666,20 +670,15 @@ mod tests {
666670
}
667671

668672
#[test]
669-
fn tool_versions_are_provenance_but_compiler_build_changes_require_review() {
673+
fn native_build_and_tool_versions_are_provenance_but_wasm_growth_requires_review() {
670674
let before = report();
671675
let mut after: Report =
672676
serde_json::from_value(serde_json::to_value(&before).unwrap()).unwrap();
673677
after.rustc = "new stable Rust".into();
674678
after.node = "new Node 24 patch".into();
675679
assert!(compare(&before, &after).is_empty());
676680
after.compiler_build = "different build settings".into();
677-
assert!(
678-
compare(&before, &after)
679-
.iter()
680-
.any(|change| change.contains("compiler build differs"))
681-
);
682-
after.compiler_build = before.compiler_build.clone();
681+
assert!(compare(&before, &after).is_empty());
683682
after.fixtures.get_mut("native").unwrap().module_bytes += 1;
684683
assert!(
685684
compare(&before, &after)

‎src/bin/xtask.rs‎

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1816,17 +1816,14 @@ fn compiler_runtime_conformance(root: &Path) -> Result<(), String> {
18161816
path_text(&release)?,
18171817
],
18181818
)?;
1819+
// Reuse the native debug dependencies built by the tests above, including
1820+
// example/dev dependencies. Fat-LTO rebuilding those just for this utility
1821+
// can exhaust the Intel macOS CI time limit. The gate itself always emits
1822+
// Release Wasm, independently of its native Rust build profile.
18191823
run(
18201824
root,
18211825
"cargo",
1822-
&[
1823-
"run",
1824-
"--quiet",
1825-
"--profile",
1826-
"max-opt",
1827-
"--example",
1828-
"unity_baseline",
1829-
],
1826+
&["run", "--quiet", "--example", "unity_baseline"],
18301827
)?;
18311828
Ok(())
18321829
}

0 commit comments

Comments
 (0)