Skip to content

ci: run the goldens inside the one workspace test build - #151

Merged
samitbasu merged 2 commits into
mainfrom
ci-speed
Nov 12, 2026
Merged

samitbasu merged 2 commits into
mainfrom
ci-speed

Conversation

@samitbasu

@samitbasu samitbasu commented Nov 12, 2026 •

Copy link
Copy Markdown
Owner

Part of #32.

Where the time went (main run 43254976759, 8m42s)

step time why
clippy 12 s workspace crates only; deps cached
test 3m41s compile 1m53s, then 789 tests 85 s
doctest, rustdoc, wasm ~9 s
snapshots 3m51s 65 crates compiled from libc up (3m49s), then ~22 s of tests

-p eggshell-ui --features snapshots resolves shared dependencies' features differently from --workspace, so nothing built by the test step is reused. A fresh local target dir reproduces it: after the workspace build, the golden build compiles the same 65 crates. Cold-cache runs (13–15 min) pay it twice.

Change

  • cargo xtask ci runs cargo test --workspace --all-targets --features eggshell-ui/snapshots once, on lavapipe, with the same stray .new.png/.diff.png guard (snapshots::guarded, shared with cargo xtask snapshots). The separate snapshots step is gone.
  • The workflow gives rust-cache a key: the restored cache was a full match, so it was never saved again and would not hold the new build.

Every check kept

Golden tests, stray-image failure, clippy, tests, doctests, rustdoc, wasm: all still run. Locally cargo xtask ci passes, it runs 898 tests (789 + the goldens).

Behavior changes

  • Golden tests share a process with the rest of the it binary instead of running alone.
  • cargo xtask ci has no step named "snapshots"; cargo xtask snapshots is unchanged.
  • Clippy now takes the golden feature too, so the snapshots-gated test code is linted (clean); its cache key moved with it.

Timings (ci job)

run time
main, warm cache (43254976759) 8m42s
this PR, first run, cold (new cache key, 43295500110 attempt 1) 11m55s
this PR, warm re-run (attempt 2) 5m29s
this PR with clippy on the golden feature, cold (43298931707 attempt 1) 11m38s
same, warm re-run (attempt 2) 5m26s

Warm steps: clippy 10 s, test (build 2m40s, then the tests and goldens) about 4m, doctest 3 s, rustdoc 2 s, wasm 4 s; the snapshots step and its 65-crate rebuild are gone. The cold run is the one-time cost of the new cache key; after merge, main's first run pays it once.

🤖 Generated with Claude Code

https://claude.ai/code/session_01AJYxo4YJZUXcPJ1bHdAHKy

samitbasu and others added 2 commits November 12, 2026 11:57
The golden step ran `cargo test -p eggshell-ui --features snapshots`, which
resolves shared dependencies' features differently from the `--workspace`
build before it. Cargo rebuilt 65 crates (libc up through wgpu, winit, egui)
every run, about 3m50s of compiling for about 22s of tests, on a warm cache
and a cold one alike (reproduced locally in a fresh target dir).

`ci` now runs `cargo test --workspace --all-targets --features
eggshell-ui/snapshots` once, on lavapipe, with the same stray-image guard
around it (`snapshots::guarded`, shared with `cargo xtask snapshots`), and the
separate snapshots step is gone. Every check still runs: the golden tests,
the stray `.new.png`/`.diff.png` failure, clippy, tests, doctests, rustdoc,
wasm.

The restored cache was a full key match, so rust-cache never saved the new
build; the workflow gives it a key to start a fresh one.

Behavior changes: the golden tests run in the same process as the rest of the
`it` binary, not alone; `cargo xtask ci` no longer has a "snapshots" step name.
`cargo xtask snapshots` is unchanged.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AJYxo4YJZUXcPJ1bHdAHKy
Clippy ran without `eggshell-ui/snapshots`, so the golden tests' code
(tests/it/snapshots.rs) was never linted, and its dependency check artifacts
did not match the test build's feature resolution. It now takes the same
features as the test step. The cache key moves with it, since the saved cache
holds no check artifacts for the wgpu tree.

Behavior change: clippy now also lints the snapshots-gated test code
(`cargo xtask ci` is clean with it).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AJYxo4YJZUXcPJ1bHdAHKy
@samitbasu
samitbasu merged commit 929cd3f into main Nov 12, 2026
6 checks passed
@samitbasu
samitbasu deleted the ci-speed branch November 12, 2026 22:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant