Skip to content

Conversation

@tottoto
Copy link
Contributor

@tottoto tottoto commented Feb 7, 2026

Motivation

Resolving dependencies for the MSRV build in CI takes time.

Solution

Uses Swatinem/rust-cache@v2 to cache dependencies.

Copy link
Member

@jplatte jplatte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I forgot last time, can you also add

with:
  save-if: ${{ github.ref == 'refs/heads/main' }}

? That way cache effectiveness is a tad worse for PRs that change / update dependencies, but cache hit ratio is much better (caches from PRs can't get re-used in other PRs).

@tottoto
Copy link
Contributor Author

tottoto commented Feb 9, 2026

Updated to add it.

@jplatte jplatte merged commit f5ef8e8 into tower-rs:main Feb 9, 2026
11 checks passed
@tottoto tottoto deleted the ci-cache branch February 9, 2026 07:05
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.

2 participants