forked from bitcoindevkit/bdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace current caching solution with Rust Cache
- Loading branch information
1 parent
0aaf420
commit ab9242d
Showing
3 changed files
with
8 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,15 +23,8 @@ jobs: | |
override: true | ||
profile: minimal | ||
components: llvm-tools-preview | ||
- name: Cache cargo | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.cargo/bin/ | ||
~/.cargo/registry/index/ | ||
~/.cargo/registry/cache/ | ||
~/.cargo/git/db/ | ||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | ||
- name: Rust Cache | ||
uses: Swatinem/[email protected] | ||
- name: Install grcov | ||
run: if [[ ! -e ~/.cargo/bin/grcov ]]; then cargo install grcov; fi | ||
- name: Build simulator image | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,21 +22,15 @@ 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: | ||
toolchain: ${{ matrix.rust.version }} | ||
override: true | ||
components: clippy | ||
profile: minimal | ||
- name: Rust Cache | ||
uses: Swatinem/[email protected] | ||
- 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/[email protected] | ||
- name: Check bdk | ||
working-directory: ./crates/bdk | ||
run: cargo check --target wasm32-unknown-unknown --features dev-getrandom-wasm | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,20 +9,14 @@ jobs: | |
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v2 | ||
- name: Setup cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.cargo/registry | ||
~/.cargo/git | ||
target | ||
key: nightly-docs-${{ hashFiles('**/Cargo.toml','**/Cargo.lock') }} | ||
- name: Set default toolchain | ||
run: rustup default nightly-2022-12-14 | ||
- name: Set profile | ||
run: rustup set profile minimal | ||
- name: Update toolchain | ||
run: rustup update | ||
- name: Rust Cache | ||
uses: Swatinem/[email protected] | ||
- name: Build docs | ||
run: cargo doc --no-deps | ||
env: | ||
|