Skip to content

Commit 7e6c391

Browse files
OttoAllmendingeraider
andcommitted
ci: Add caching for Rust and npm dependencies
Ticket: BTC-0 Co-authored-by: aider <[email protected]>
1 parent 1795959 commit 7e6c391

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

.github/workflows/ci.yml

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,25 @@ jobs:
1919
with:
2020
ref: ${{ github.event.pull_request.head.sha }}
2121

22+
- name: Cache Rust
23+
uses: actions/cache@v3
24+
with:
25+
path: |
26+
~/.cargo/bin/
27+
~/.cargo/registry/index/
28+
~/.cargo/registry/cache/
29+
~/.cargo/git/db/
30+
target/
31+
key: ${{ runner.os }}-rust-${{ hashFiles('**/Cargo.lock') }}
32+
restore-keys: |
33+
${{ runner.os }}-rust-
34+
2235
- name: Install Rust
2336
uses: dtolnay/rust-toolchain@v1
2437
with:
2538
toolchain: nightly
2639

27-
- name: Install wasm-pack
40+
- name: Install wasm tools
2841
run: |
2942
rustup component add rustfmt
3043
cargo install wasm-pack --version 0.13.1
@@ -63,6 +76,14 @@ jobs:
6376
run: |
6477
git fetch origin $GITHUB_BASE_REF
6578
79+
- name: Cache npm packages
80+
uses: actions/cache@v3
81+
with:
82+
path: ~/.npm
83+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
84+
restore-keys: |
85+
${{ runner.os }}-node-
86+
6687
- name: Install Packages
6788
run: npm ci --workspaces --include-workspace-root
6889

0 commit comments

Comments
 (0)