Ensure wasm32-unknown-unknown support #109
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
name: CI | |
jobs: | |
lint-rust: | |
name: Lint Rust | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: Swatinem/rust-cache@v2 | |
- run: rustup component add clippy rustfmt | |
- name: Rustfmt | |
run: cargo fmt --all -- --check | |
- name: Clippy | |
env: | |
RUSTFLAGS: -D warnings | |
run: cargo clippy --workspace | |
- name: Clippy (all features) | |
env: | |
RUSTFLAGS: -D warnings | |
run: cargo clippy --workspace --all-features | |
- name: Check documentation | |
env: | |
RUSTDOCFLAGS: -D warnings | |
run: cargo doc --workspace --all-features --no-deps --document-private-items | |
test: | |
name: Test Suite | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: Swatinem/rust-cache@v2 | |
- run: cargo test | |
check-wasm: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: Swatinem/rust-cache@v2 | |
- run: rustup target add wasm32-unknown-unknown | |
- run: cargo check --target wasm32-unknown-unknown | |