Skip to content

Commit e3cabe0

Browse files
committed
feat: optimize CI workflow by adding wasm32 target and caching Rust dependencies
1 parent 9fa890e commit e3cabe0

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

.github/workflows/ci.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ jobs:
2424
uses: dtolnay/rust-toolchain@nightly
2525
with:
2626
components: rustfmt, clippy
27+
targets: wasm32-unknown-unknown
28+
29+
- name: Cache Rust dependencies
30+
uses: Swatinem/rust-cache@v2
2731

2832
- name: Cargo fmt --check
2933
run: cargo fmt --all -- --check
@@ -40,12 +44,11 @@ jobs:
4044

4145
- name: Install Rust (nightly)
4246
uses: dtolnay/rust-toolchain@nightly
47+
with:
48+
targets: wasm32-unknown-unknown
4349

4450
- name: Cache Rust dependencies
4551
uses: Swatinem/rust-cache@v2
46-
with:
47-
workspaces: "."
48-
key: "${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}"
4952

5053
- name: Install wasm-pack
5154
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh

0 commit comments

Comments
 (0)