Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable caching of Rust artifacts on MacOS #131

Merged
merged 2 commits into from
Feb 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
24 changes: 10 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ jobs:
override: true

- name: Cache target directory
if: matrix.os != 'macos-latest' # Need to disable cache until https://github.com/actions/cache/issues/403 is fixed.
uses: actions/cache@v2
with:
path: target
Expand Down Expand Up @@ -222,7 +221,6 @@ jobs:
override: true

- name: Cache target directory
if: matrix.os != 'macos-latest' # Need to disable cache until https://github.com/actions/cache/issues/403 is fixed.
uses: actions/cache@v2
with:
path: target
Expand All @@ -247,31 +245,29 @@ jobs:
uses: actions/checkout@v2

- name: Install Rust toolchain
id: toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
override: true
target: wasm32-unknown-unknown

- name: Cache target directory
- name: Cache target, cargo and wasm-pack directories
uses: actions/cache@v2
with:
path: target
key: wasm-wallet-target-directory-${{ hashFiles('Cargo.lock') }}-v1

- name: Cache wasm-bindgen-test-runner
uses: actions/cache@v2
with:
path: ~/.cargo/bin/wasm-bindgen-test-runner
key: ubuntu-rust-${{ env.RUST_TOOLCHAIN }}-wasm-bindgen-test-runner
path: |
target
~/.cargo/bin
~/.cache/.wasm-pack
key: ubuntu-rust-${{ steps.toolchain.outputs.rustc_hash }}-wasm-wallet-cargo-and-target-directory-${{ hashFiles('Cargo.lock') }}-v1

- name: Install wasm-bindgen-test-runner
run: which wasm-bindgen-test-runner || cargo install wasm-bindgen-cli
- name: Install wasm-pack
run: which wasm-pack || curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh

- name: Waves wallet tests
run: |
cd waves/wallet
cargo test --target wasm32-unknown-unknown
wasm-pack test --firefox --headless

- name: Upload artifact on test failure
if: ${{ failure() }}
Expand Down
2 changes: 0 additions & 2 deletions waves/wallet/.cargo/config.toml

This file was deleted.