Skip to content

Commit

Permalink
chore: add Rust caches to CI
Browse files Browse the repository at this point in the history
Each job has a separate cache because GitHub CI runs sometimes get
stuck when parallel jobs try to download the same cache.
  • Loading branch information
emccorson committed Jul 25, 2023
1 parent bb2b5f8 commit 44e1294
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/deploy-wallet-at-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,16 @@ jobs:
./packages/utils/node_modules
key: ${{ runner.os }}-yarn-cache-${{ hashFiles('**/yarn.lock') }}

- name: Restore Rust unit-tests-js cache
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
./packages/shared/lib/target
./packages/crypto/lib/target
key: ${{ runner.os }}-rust-cache-unit-tests-js-${{ hashFiles('**/Cargo.lock') }}

- name: Install protoc
run: sudo apt-get install -y protobuf-compiler

Expand Down Expand Up @@ -132,6 +142,16 @@ jobs:
./packages/utils/node_modules
key: ${{ runner.os }}-yarn-cache-${{ hashFiles('**/yarn.lock') }}

- name: Restore Rust unit-tests-wasm cache
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
./packages/shared/lib/target
./packages/crypto/lib/target
key: ${{ runner.os }}-rust-cache-unit-tests-wasm-${{ hashFiles('**/Cargo.lock') }}

- name: Install protoc
run: sudo apt-get install -y protobuf-compiler

Expand Down Expand Up @@ -187,6 +207,16 @@ jobs:
./packages/utils/node_modules
key: ${{ runner.os }}-yarn-cache-${{ hashFiles('**/yarn.lock') }}

- name: Restore Rust build cache
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
./packages/shared/lib/target
./packages/crypto/lib/target
key: ${{ runner.os }}-rust-cache-build-${{ hashFiles('**/Cargo.lock') }}

- name: Install protoc
run: sudo apt-get install -y protobuf-compiler

Expand Down

0 comments on commit 44e1294

Please sign in to comment.