Skip to content

Commit 90642b0

Browse files
authored
Cache crate dependencies on branches (#100)
* Cache crate dependencies on branches * Switch to actions/cache@v3
1 parent cef08e0 commit 90642b0

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

.github/workflows/main.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,18 @@ jobs:
194194
with:
195195
name: engine-release
196196

197+
- name: Cache build
198+
uses: actions/cache@v3
199+
with:
200+
path: |
201+
~/.cargo/bin/
202+
~/.cargo/registry/index/
203+
~/.cargo/registry/cache/
204+
~/.cargo/git/db/
205+
target/
206+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
207+
if: github.ref != 'refs/heads/main' && !startsWith(github.ref, 'refs/tags/v')
208+
197209
# Build `js-compute-runtime`
198210
- run: PREBUILT_ENGINE=engine-release/js-compute-runtime.wasm $CENTOS cargo build --release
199211

0 commit comments

Comments
 (0)