Skip to content

Conversation

@joshrotenberg
Copy link
Collaborator

Summary

Adds caching for cargo-release to speed up the release workflow significantly.

Problem

Every release workflow run takes 3+ minutes just to install cargo-release from source.

Solution

  • Cache the cargo registry and tools directory
  • Check if cargo-release is already installed before attempting installation
  • Use cache key based on Cargo.lock hash for proper invalidation

Benefits

  • ⚡ Release workflow starts ~3 minutes faster
  • 💾 Saves bandwidth and CPU cycles
  • 🚀 Faster iteration when troubleshooting releases

Cache Details

Caches:

  • ~/.cargo/bin/ - Installed tools including cargo-release
  • ~/.cargo/registry/ - Downloaded crates
  • ~/.cargo/git/db/ - Git dependencies

Cache key: ${{ runner.os }}-cargo-tools-${{ hashFiles('**/Cargo.lock') }}

This will make the release workflow much faster!

- Cache cargo registry and tools directory
- Check if cargo-release is already installed before installing
- Significantly speeds up release workflow (no more 3+ minute installs)
- Uses cache key based on Cargo.lock hash
@joshrotenberg joshrotenberg merged commit c1cd45b into main Sep 9, 2025
9 checks passed
@joshrotenberg joshrotenberg deleted the feat/cache-cargo-release branch September 9, 2025 17:07
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