Skip to content

Commit

Permalink
Add caching for cargo registry, index, and build in CD workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
oleander committed May 28, 2024
1 parent eb601fd commit 86a7a8a
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,30 @@ jobs:
toolchain: ${{ matrix.rust_toolchain }}
override: true

- name: Cache cargo registry
uses: actions/cache@v3
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-registry-
- name: Cache cargo index
uses: actions/cache@v3
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-index-
- name: Cache cargo build
uses: actions/cache@v3
with:
path: target
key: ${{ runner.os }}-cargo-build-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-build-
- name: Install cargo-bump
run: cargo install cargo-bump

Expand Down

0 comments on commit 86a7a8a

Please sign in to comment.