Skip to content

ci: add clippy + shared rust-cache key#61

Merged
thejefflarson merged 2 commits into
mainfrom
ci-clippy
Jun 24, 2026
Merged

ci: add clippy + shared rust-cache key#61
thejefflarson merged 2 commits into
mainfrom
ci-clippy

Conversation

@thejefflarson

Copy link
Copy Markdown
Owner

Two small CI changes from the "speed up the clippy step" thread.

1. Add clippy (fast — replaces the standalone build)

Swaps cargo build --locked for cargo clippy --locked --all-targets -- -D warnings in the server job. clippy is check-speed (no codegen) and gates the compile just like build did, while cargo test already 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 warnings matches the repo's warnings-as-errors policy.

The codebase was already clean except one lint (too_many_arguments on 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-server makes every run converge on one cache entry, so PRs restore main's warm target/.

Validated locally

cargo clippy --locked --all-targets -- -D warnings → clean (EXIT 0); cargo fmt --check clean; YAML valid.

🤖 Generated with Claude Code

thejefflarson and others added 2 commits June 23, 2026 21:03
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>
@thejefflarson thejefflarson merged commit f4794ca into main Jun 24, 2026
2 of 3 checks passed
@thejefflarson thejefflarson deleted the ci-clippy branch June 24, 2026 04:06
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