Skip to content

Commit

Permalink
Replace actions/cache with actions/cache/(restore|save)
Browse files Browse the repository at this point in the history
  • Loading branch information
daxpedda committed Mar 28, 2023
1 parent 600077a commit fc95d37
Show file tree
Hide file tree
Showing 4 changed files with 75 additions and 16 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Cache cargo-audit
uses: actions/cache@v3
- name: Restore cached cargo-audit
uses: actions/cache/restore@v3
with:
path: |
~/.cargo/.crates.toml
Expand All @@ -28,5 +28,13 @@ jobs:
key: cargo-audit
- name: Install cargo-audit
run: cargo install cargo-audit
- name: Save cargo-audit to cache
uses: actions/cache/save@v3
with:
path: |
~/.cargo/.crates.toml
~/.cargo/.crates2.json
~/.cargo/bin/cargo-audit
key: cargo-audit
- name: Run Audit
run: cargo audit -D warnings
12 changes: 10 additions & 2 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Cache Taplo
uses: actions/cache@v3
- name: Restore cached Taplo
uses: actions/cache/restore@v3
with:
path: |
~/.cargo/.crates.toml
Expand All @@ -43,5 +43,13 @@ jobs:
key: taplo
- name: Install Taplo
run: cargo install taplo-cli
- name: Save Taplo to cache
uses: actions/cache/save@v3
with:
path: |
~/.cargo/.crates.toml
~/.cargo/.crates2.json
~/.cargo/bin/taplo
key: taplo
- name: Run Taplo
run: taplo fmt --check
24 changes: 20 additions & 4 deletions .github/workflows/spellcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ jobs:
uses: actions/checkout@v3
- name: Install dependencies
run: sudo apt install llvm-dev libclang-dev clang
- name: Cache cargo-spellcheck
uses: actions/cache@v3
- name: Restore cached cargo-spellcheck
uses: actions/cache/restore@v3
with:
path: |
~/.cargo/.crates.toml
Expand All @@ -30,6 +30,14 @@ jobs:
key: cargo-spellcheck
- name: Install cargo-spellcheck
run: cargo install cargo-spellcheck
- name: Save cargo-spellcheck to cache
uses: actions/cache/save@v3
with:
path: |
~/.cargo/.crates.toml
~/.cargo/.crates2.json
~/.cargo/bin/cargo-spellcheck
key: cargo-spellcheck
- name: Run Spellcheck
run: |
cargo spellcheck check -m 1
Expand All @@ -41,8 +49,8 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Cache typos-cli
uses: actions/cache@v3
- name: Restore cached typos-cli
uses: actions/cache/restore@v3
with:
path: |
~/.cargo/.crates.toml
Expand All @@ -51,6 +59,14 @@ jobs:
key: typos-cli
- name: Install typos-cli
run: cargo install typos-cli
- name: Save typos-cli to cache
uses: actions/cache/save@v3
with:
path: |
~/.cargo/.crates.toml
~/.cargo/.crates2.json
~/.cargo/bin/typos
key: typos-cli
- name: Checkout
uses: actions/checkout@v3
- name: Run Typos
Expand Down
43 changes: 35 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Cache wasm-bindgen
uses: actions/cache@v3
- name: Restore cached wasm-bindgen
uses: actions/cache/restore@v3
with:
path: |
~/.cargo/.crates.toml
Expand All @@ -42,6 +42,15 @@ jobs:
key: wasm-bindgen
- name: Install wasm-bindgen
run: cargo install wasm-bindgen-cli
- name: Save wasm-bindgen to cache
uses: actions/cache/save@v3
with:
path: |
~/.cargo/.crates.toml
~/.cargo/.crates2.json
~/.cargo/bin/wasm-bindgen
~/.cargo/bin/wasm-bindgen-test-runner
key: wasm-bindgen
- name: Install additional Rust targets
run: |
rustup default ${{ matrix.rust.version }}
Expand Down Expand Up @@ -76,19 +85,28 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Cache wasm-bindgen
uses: actions/cache@v3
- name: Restore cached wasm-bindgen
uses: actions/cache/restore@v3
with:
path: |
~/.cargo/.crates.toml
~/.cargo/.crates2.json
~/.cargo/bin/wasm-bindgen
~/.cargo/bin/wasm-bindgen-test-runner
key: macos-wasm-bindgen
- name: Install additional Rust targets
run: rustup target add wasm32-unknown-unknown
- name: Install wasm-bindgen
run: cargo install wasm-bindgen-cli
- name: Save wasm-bindgen to cache
uses: actions/cache/save@v3
with:
path: |
~/.cargo/.crates.toml
~/.cargo/.crates2.json
~/.cargo/bin/wasm-bindgen
~/.cargo/bin/wasm-bindgen-test-runner
key: macos-wasm-bindgen
- name: Install additional Rust targets
run: rustup target add wasm32-unknown-unknown
- name: Test on Safari
env:
SAFARIDRIVER: safaridriver
Expand Down Expand Up @@ -118,8 +136,8 @@ jobs:
rustup default nightly
rustup target add wasm32-unknown-unknown
rustup component add rust-src
- name: Cache wasm-bindgen
uses: actions/cache@v3
- name: Restore cached wasm-bindgen
uses: actions/cache/restore@v3
with:
path: |
~/.cargo/.crates.toml
Expand All @@ -131,6 +149,15 @@ jobs:
run:
cargo install wasm-bindgen-cli --git
https://github.com/daxpedda/wasm-bindgen --branch despair
- name: Save wasm-bindgen to cache
uses: actions/cache/save@v3
with:
path: |
~/.cargo/.crates.toml
~/.cargo/.crates2.json
~/.cargo/bin/wasm-bindgen
~/.cargo/bin/wasm-bindgen-test-runner
key: atomic-${{ matrix.os }}-wasm-bindgen
- name: Test on Chrome
if: matrix.os == 'ubuntu-latest'
env:
Expand Down

0 comments on commit fc95d37

Please sign in to comment.