name: WASM on: push: branches: [main] pull_request: branches: [main] types: - opened - reopened - synchronize - ready_for_review env: CARGO_TERM_COLOR: always jobs: check-wasm: name: Build test / ${{ matrix.name }} runs-on: ubuntu-latest if: github.event_name == 'push' || !github.event.pull_request.draft strategy: fail-fast: true matrix: name: - matrix-qrcode - matrix-sdk-base - matrix-sdk-common - matrix-sdk-crypto include: - name: matrix-sdk (no-default, wasm-flags) cmd: matrix-sdk-no-default - name: matrix-sdk / indexeddb_stores cmd: matrix-sdk-indexeddb-stores steps: - name: Checkout the repo uses: actions/checkout@v2 - name: Install Rust uses: actions-rs/toolchain@v1 with: toolchain: stable target: wasm32-unknown-unknown components: clippy profile: minimal override: true - name: Load cache uses: Swatinem/rust-cache@v1 # needed for libolm-sys compilation - name: Install emscripten uses: mymindstorm/setup-emsdk@v11 with: version: latest - name: check uses: actions-rs/cargo@v1 with: command: run args: -p xtask -- ci wasm ${{ matrix.cmd || matrix.name }}