Replace current caching solution with Rust Cache

This commit is contained in:
Vladimir Fomene
2023-03-08 13:49:54 +03:00
committed by Daniela Brozzoni
parent 0aaf420f6d
commit ab9242d10d
3 changed files with 8 additions and 33 deletions

View File

@@ -22,14 +22,6 @@ jobs:
uses: actions/checkout@v2
- name: Generate cache key
run: echo "${{ matrix.rust.version }} ${{ matrix.features }}" | tee .cache_key
- name: cache
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('.cache_key') }}-${{ hashFiles('**/Cargo.toml','**/Cargo.lock') }}
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
@@ -37,6 +29,8 @@ jobs:
override: true
components: clippy
profile: minimal
- name: Rust Cache
uses: Swatinem/rust-cache@v2.2.1
- name: Build
run: cargo build ${{ matrix.features }}
- name: Clippy
@@ -54,14 +48,6 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Cache
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ github.job }}-${{ hashFiles('**/Cargo.toml','**/Cargo.lock') }}
# Install a recent version of clang that supports wasm32
- run: wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - || exit 1
- run: sudo apt-add-repository "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-10 main" || exit 1
@@ -74,6 +60,8 @@ jobs:
override: true
profile: minimal
target: "wasm32-unknown-unknown"
- name: Rust Cache
uses: Swatinem/rust-cache@v2.2.1
- name: Check bdk
working-directory: ./crates/bdk
run: cargo check --target wasm32-unknown-unknown --features dev-getrandom-wasm