ci: Split checks into parallel jobs and stop recompiling GPUI per step - #3068
Merged
Merged
Conversation
The macOS Test job ran every check in series and compiled GPUI five times over: each step used a different feature set, the Cargo cache was restored only after the first two test runs, and typos/machete were built from source with `cargo install`. - Move typos, machete, the skill-guide diff and the recipe-fragment check to a `checks` job on ubuntu that compiles no Rust; both tools now come as prebuilt binaries. - Run clippy and the recipe verification as their own parallel jobs. - Keep every test job on one feature set. The workspace run already enables `gpui-kit/test-support`, so the separate headless step was a duplicate; doc tests and the Metal rendering test now reuse the same build instead of rebuilding GPUI. - Rely on the rust-cache that `setup-rust-toolchain` installs and drop the hand-rolled `actions/cache` steps that cached the whole `target/`. - Drop the redundant `cargo check --all-targets` from `script/check-ai-recipes`; the `cargo test` that follows builds the same targets. - Fix the `gpui-fps` and `gpui-kit-assets` doc examples so the whole workspace passes `cargo test --doc` (`--doc` ignores `doctest = false`). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RZuwHtZTbfSFBmCBP6wVwf
… Linux The first run of the parallel layout was still cold everywhere: the repository holds 11.7 GB of Actions caches against a 10 GB limit, so rust-cache entries were evicted before the next run could restore them. Each entry was 1-2 GB, most of it debug info nothing in CI reads. - Build without debug info (`CARGO_PROFILE_DEV_DEBUG=0`), which shrinks every cache and shortens linking. - Save caches only from `main`; pull requests restore the closest `main` entry through rust-cache's prefix fallback instead of adding their own. - The two Linux release builds of `gpui-shell` share one cache key. - Replace the system linker with mold on Linux runners. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019RrFLRLnLWUuUNPyDXSJZU
With a warm dependency cache, most of the Test job's build time went to compiling and linking a test binary for each `examples/` crate, none of which is worth one. The `lint` job now runs clippy over the whole workspace, which type-checks every example, and the Test job excludes the `examples/` members computed from `cargo metadata`. `cargo tree` confirms this leaves every remaining crate's feature set unchanged. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019RrFLRLnLWUuUNPyDXSJZU
huacnlee
enabled auto-merge (squash)
September 14, 2026 14:17
The Windows test job failed with `invalid character '\n' in package name`: jq on Windows writes CRLF, so `tr '\n' ' '` left a `\r` glued to every example crate name. `jq -j` emits the list as one line with no newline at all, so there is nothing for Windows to translate. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015h6NVoQ9eht4g3HDVBb8Yj
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.
Summary
The macOS Test job took ~30 minutes because it ran every check in series and compiled GPUI five times over: each step used a different feature set, the Cargo cache was restored only after the first two test runs, and typos/machete were built from source with
cargo install.Parallel layout, one feature set per job
checks(ubuntu, no Rust compile): typos viacrate-ci/typosand machete viataiki-e/install-action, both prebuilt binaries; skill-guide diff;check-ai docs.lint(macOS) andrecipes(ubuntu) run as their own parallel jobs. The recipes crate is a deliberately isolated workspace and always needs its own build, so it no longer sits on the macOS critical path.testmatrix keeps one feature set per platform.cargo tree -e featuresconfirms the workspace run already enablesgpui-kit/test-support, so the separate "Headless UI integration tests" step was a duplicate on all three platforms. Doc tests and the Metal rendering test now use the same--workspace --features gpui-component-story/test-supportinvocation (--doc/--test rendering) and reuse the build.gpui-shell-coredoc tests use--releaseto share the release build.script/check-ai-recipes: dropcargo check --all-targets; thecargo testthat follows builds the same targets.cargo check --binstays because it proves the recipes compile before dev-dependencies unifytest-supportin.Caches that actually survive
The first run of the new layout was still cold in every job: the repository holds 11.7 GB of Actions caches against the 10 GB limit, so entries were evicted before the next run could restore them. Each entry was 1–2 GB, most of it debug info.
CARGO_PROFILE_DEV_DEBUG=0for all CI builds — smaller caches, faster linking; nothing in CI reads debug info.main(cache-save-if); PRs restore the closestmainentry through rust-cache's prefix fallback instead of adding their own.actions/cachesteps that cached the wholetarget/on top of the rust-cache thatsetup-rust-toolchainalready installs.gpui-shellshare one cache key.rui314/setup-mold, no-op elsewhere).Because the cache key includes the
CARGO_PROFILE_*environment, this PR's own runs stay cold; the firstmainrun after merge populates the caches and later PRs restore them.Doc-test fixes
Running doc tests workspace-wide surfaced two broken doc examples, fixed here:
gpui-fpswas missingprelude::*, andgpui-kit-assetsreferencedgpui_platformwithout depending on it (cargo test --docignores[lib] doctest = false, so it is removed andgpui_platformadded as a dev-dependency).Verified locally: workspace
cargo test --docpasses for every crate,--workspace --test renderingselects and passes the 2 Metal cases,typos,cargo machete,cargo fmt --check, clippy on the touched crates,check-ai docs, and the recipes lock file stays consistent under--locked.🤖 Generated with Claude Code
https://claude.ai/code/session_019RrFLRLnLWUuUNPyDXSJZU