-
Notifications
You must be signed in to change notification settings - Fork 314
Open
Labels
EngSysThis issue is impacting the engineering system.This issue is impacting the engineering system.
Milestone
Description
Rust builds seem to be taking longer lately, presumably to set up older toolchains the agents may not have since we target older versions by design. But caching certain directories can help a lot. I use the following in nearly all my Rust repos and it makes a significant improvement in build time.
- name: Cache
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-${{ runner.arch }}-cargo-${{ hashFiles('**/Cargo.lock') }}
Using the right cache key - including the toolchain (version), platform, and a hash of Cargo.lock
- we can handle all the variations we have.
Metadata
Metadata
Assignees
Labels
EngSysThis issue is impacting the engineering system.This issue is impacting the engineering system.
Type
Projects
Status
Untriaged