Skip to content

Commit 93bfcc3

Browse files
authored
CI: add GitHub actions caching for Rust (#754)
1 parent b6b647a commit 93bfcc3

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

.github/workflows/pullrequest.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,17 @@ jobs:
1717
components: clippy, rustfmt
1818
targets: wasm32-unknown-unknown
1919

20+
- name: Cache Rust dependencies
21+
uses: actions/cache@v4
22+
with:
23+
path: |
24+
~/.cargo/registry
25+
~/.cargo/git
26+
target
27+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
28+
restore-keys: |
29+
${{ runner.os }}-cargo-
30+
2031
- name: Check Formatting
2132
run: cargo fmt --all -- --check
2233

@@ -37,6 +48,17 @@ jobs:
3748
with:
3849
targets: wasm32-unknown-unknown
3950

51+
- name: Cache Rust dependencies
52+
uses: actions/cache@v4
53+
with:
54+
path: |
55+
~/.cargo/registry
56+
~/.cargo/git
57+
target
58+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
59+
restore-keys: |
60+
${{ runner.os }}-cargo-
61+
4062
- name: Check for errors
4163
run: cargo check
4264

0 commit comments

Comments
 (0)