Skip to content

ci: enable cargo caching for clippy workflow#7

Open
huth-stacks wants to merge 1 commit into
developfrom
ci/P7-clippy-caching
Open

ci: enable cargo caching for clippy workflow#7
huth-stacks wants to merge 1 commit into
developfrom
ci/P7-clippy-caching

Conversation

@huth-stacks

Copy link
Copy Markdown
Owner

What

Enable the built-in cargo/target caching in the clippy workflow.

Why

The clippy workflow (clippy.yml) explicitly sets cache: false in the actions-rust-lang/setup-rust-toolchain step. This forces a full recompilation of the entire workspace on every PR, even when only a few files changed. Enabling caching allows incremental compilation for clippy analysis.

The Change

In .github/workflows/clippy.yml:

-          cache: false
+          cache: true

1 line changed in 1 file.

How to Verify

  • First run: similar timing to baseline (cold cache)
  • Second run on same branch: should show significant speedup (~50-75% faster)

Metrics to Track

Metric Baseline Expected (warm cache)
clippy duration 4-8m ~1-2m

Security Checklist

  • No new permissions granted
  • No secrets exposure
  • Cache is scoped by repo + branch (GitHub Actions default behavior)

Part of CI Optimization Series

PR 7 of 7. Expected impact: ~3-6 min off clippy (on warm cache).

The clippy workflow explicitly disabled caching, causing full
recompilation on every PR. Enable the built-in cargo/target
caching from actions-rust-lang/setup-rust-toolchain.
@huth-stacks huth-stacks added the no changelog Skip changelog fragment check label Mar 24, 2026
@huth-stacks huth-stacks reopened this Mar 24, 2026
@huth-stacks huth-stacks reopened this Mar 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no changelog Skip changelog fragment check

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant