ci: add clippy + shared rust-cache key#61
Merged
Merged
Conversation
Swap the standalone `cargo build --locked` for `cargo clippy --locked --all-targets -- -D warnings`. clippy is check-speed (no codegen) and gates the compile just like build did, while `cargo test` below already does the real codegen — so this adds lint coverage without adding a compile pass, and is if anything slightly faster. Only the workspace crate runs through clippy-driver; deps still compile via sccache. -D warnings matches the repo's warnings-as-errors policy. Add the clippy component to the toolchain, and silence the one existing lint (too_many_arguments on a test histogram helper) with an allow. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The default rust-cache key is scoped per job + branch, so a PR's first run restores nothing and compiles cold. A fixed shared-key (watcher-server) makes every run converge on one cache entry, so PRs restore main's warm target/. Co-Authored-By: Claude Opus 4.8 (1M context) <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.
Two small CI changes from the "speed up the clippy step" thread.
1. Add clippy (fast — replaces the standalone build)
Swaps
cargo build --lockedforcargo clippy --locked --all-targets -- -D warningsin theserverjob. clippy is check-speed (no codegen) and gates the compile just likebuilddid, whilecargo testalready does the real codegen — so this adds lint coverage without adding a compile pass (if anything slightly faster). Only the workspace crate runs through clippy-driver; deps still compile via sccache.-D warningsmatches the repo's warnings-as-errors policy.The codebase was already clean except one lint (
too_many_argumentson a test histogram helper), silenced with an#[allow].2. Stable shared-key on rust-cache
The default rust-cache key is scoped per job + branch, so a PR's first run compiles cold. A fixed
shared-key: watcher-servermakes every run converge on one cache entry, so PRs restore main's warmtarget/.Validated locally
cargo clippy --locked --all-targets -- -D warnings→ clean (EXIT 0);cargo fmt --checkclean; YAML valid.🤖 Generated with Claude Code