Skip to content

Commit

Permalink
Add WASM target for Check, Lint, and Test jobs
Browse files Browse the repository at this point in the history
Remove the Linux-specific dependencies for the WASM job.
  • Loading branch information
parasyte committed Nov 13, 2024
1 parent eeeac71 commit ea4655c
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,15 @@ jobs:
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
target: wasm32-unknown-unknown
- name: Rust cache
uses: Swatinem/rust-cache@v2
with:
shared-key: common
- name: Cargo check
run: cargo check --workspace
- name: Cargo check WASM
run: cargo check --target wasm32-unknown-unknown --package minimal-web

lints:
name: Lints
Expand All @@ -47,6 +50,7 @@ jobs:
with:
toolchain: stable
components: clippy, rustfmt
target: wasm32-unknown-unknown
- name: Rust cache
uses: Swatinem/rust-cache@v2
with:
Expand All @@ -61,6 +65,8 @@ jobs:
run: cargo doc --workspace --no-deps
- name: Cargo clippy
run: cargo clippy --workspace --tests -- -D warnings
- name: Cargo clippy WASM
run: cargo clippy --target wasm32-unknown-unknown --package minimal-web --tests -- -D warnings
- name: Cargo machete
run: cargo machete

Expand All @@ -85,12 +91,15 @@ jobs:
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
target: wasm32-unknown-unknown
- name: Rust cache
uses: Swatinem/rust-cache@v2
with:
shared-key: common
- name: Cargo test
run: cargo test --workspace
- name: Cargo test WASM
run: cargo test --target wasm32-unknown-unknown --package minimal-web

wasm:
name: WASM
Expand All @@ -105,8 +114,6 @@ jobs:
uses: actions/checkout@v3
- name: Update apt repos
run: sudo apt -y update
- name: Install dependencies
run: sudo apt -y install libgtk-3-dev libudev-dev
- name: Install toolchain
uses: dtolnay/rust-toolchain@master
with:
Expand Down

0 comments on commit ea4655c

Please sign in to comment.