From fedd7a8ffa44082c20a63e101484e0991ee7cce0 Mon Sep 17 00:00:00 2001 From: Han Date: Thu, 9 Nov 2023 07:38:18 +0800 Subject: [PATCH] ci: add build task to check it builds for wasm (#54) --- .github/workflows/ci.yaml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index df08661f..37191287 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -52,3 +52,29 @@ jobs: - name: Run clippy run: cargo clippy --all --all-features --all-targets -- -D warnings + + build: + name: Build target ${{ matrix.target }} + runs-on: ubuntu-latest + strategy: + matrix: + target: + - wasm32-wasi + steps: + - uses: actions/checkout@v2 + + - name: Install toolchain + uses: actions-rs/toolchain@v1 + with: + profile: minimal + override: false + + - name: Add target + run: rustup target add ${{ matrix.target }} + + - uses: Swatinem/rust-cache@v1 + with: + cache-on-failure: true + + - name: Run build + run: cargo build --target ${{ matrix.target }}