From 95df70aa8e2b823b909eb3224bc6495451997018 Mon Sep 17 00:00:00 2001 From: Jay Oster Date: Tue, 12 Nov 2024 16:06:06 -0800 Subject: [PATCH] Add WASM target for Check, Lint, and Test jobs Remove the Linux-specific dependencies for the WASM job. --- .github/workflows/ci.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2fecbce..a838fdf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 @@ -47,6 +50,7 @@ jobs: with: toolchain: stable components: clippy, rustfmt + target: wasm32-unknown-unknown - name: Rust cache uses: Swatinem/rust-cache@v2 with: @@ -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 --tests -- -D warnings - name: Cargo machete run: cargo machete @@ -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 @@ -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: