Repository navigation
ci: cut the macOS UI suite from 14.5 to 3.4 minutes, skip Rust jobs for prose-only PRs - #189
Merged
Merged
Conversation
settle() slept 20 ms twenty-five times to give background work half a second. On the hosted macOS runners a 20 ms sleep lasts about 100 ms, so each call took 2.5 s and the UI suite spent 98% of its time asleep (a sampled run of the slowest test showed 11,190 of 11,342 samples in that sleep). It now gives background work 500 ms measured with a clock and still steps the same 26 frames, so nothing a test waits for gets less time on any platform. macOS UI suite: 870.7 s -> 205.2 s, 208 passed. The UI tests also share one offscreen wgpu device per test binary, as icons_visual.rs already does; each window keeps its own renderer. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- A changes job lists the PR's files; when every path is prose (top-level Markdown, SKILLS/, work/, docs/ apart from the demo notebooks, commands.md and coverage.json, which tests read), the build/test, clippy and coverage jobs are skipped. fmt and the static checks still run. Pushes to main always run everything. - The CI status job now fails when the filter fails, and treats a cancelled required job as a failure, so a skip cannot pass by accident. - macOS (3 cores) and Windows (4 cores) compile with all their cores; Linux stays at two jobs because of its disk and memory history. - docs/testing.md describes the CI behaviour. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The macOS
build/testjob took ~20 min of every CI run, and 14.5 min of that was one test binary,crates/ui-egui/tests/ui.rs(870 s on macOS vs 143 s on Linux and 178 s on Windows).A CPU sample of the slowest UI test on a
macos-15runner showed the test thread spending 11,190 of 11,342 samples (98.7%) asleep insettle()(ui.rs:121).settle()slept 20 ms twenty-five times to give background work half a second. On the hosted macOS VMs a 20 ms sleep lasts about 100 ms, so each of the ~640settle()calls took 2.5 s instead of 0.5 s. It wasn't the GPU: with a shared wgpu device the slowest test went from 74 s to 73 s, which ruled that out.What
settle()waits by the clock (crates/ui-egui/tests/ui.rs). Background work still gets 500 ms of wall-clock time and the window still steps the same 26 frames; only sleeping past the 500 ms is gone. Nothing a test waits for gets less time on any platform, so test coverage is unchanged.tests/support/gpu.rs), the same patternicons_visual.rsalready uses. Each window keeps its own renderer and textures. Small win (Windows local: 53.5 s → 49.2 s), mainly saves device setup on Linux's software renderer.ci.yml). Achangesjob lists the PR's files; if every path is top-level Markdown,SKILLS/,work/, ordocs/other than what tests read (docs/demo/,docs/commands.md,docs/coverage.json), then build/test, clippy and coverage are skipped. fmt and the static checks (links, text, PII) still run, and pushes tomainalways run everything.CIstatus job is stricter. It fails if the change filter fails or if a required job is cancelled, so a skip can never pass by accident.CARGO_BUILD_JOBS=2stays on Linux, where runner pressure was the original reason for it.docs/testing.mdgains a short "Continuous integration" section.Measurements
macos-15, 3 threads)build/testjob (estimate)The macOS numbers come from probe runs on a fork with the same runner image. This PR's own CI run gives the real end-to-end figure.
Considered and not done
the_autosave_does_not_hold_up_the_window); oversubscribing could make them flaky.Checks run
cargo test -p notecraft-ui-egui --test uion Windows: 208 passed, 1 ignored. Onmacos-15: 208 passed, 1 ignored.cargo fmt --all -- --check,cargo clippy -p notecraft-ui-egui --tests -- -D warnings: clean.cargo xtask text(930 files, 0 problems),cargo xtask docs(627 links, 0 broken),cargo xtask layers: pass.commands.md,coverage.json, crate fixture READMEs,Cargo.lock, workflows → full run).🤖 Generated with Claude Code