feat: add wasm support and add example on browser #58
Workflow file for this run
This file contains hidden or 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
| name: Rust | |
| on: | |
| push: | |
| branches: [ "master" ] | |
| pull_request: | |
| branches: [ "master" ] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Format | |
| run: cargo fmt --check | |
| - name: Clippy std | |
| run: cargo clippy --features std --tests -- -D warnings | |
| - name: Clippy embassy | |
| run: cargo clippy --features embassy -- -D warnings | |
| - name: Clippy embedded_hal | |
| run: | | |
| cargo clippy --features embedded_hal -- -D warnings | |
| cargo clippy --features embedded_hal_old -- -D warnings | |
| - name: Clippy wasm | |
| run: cargo clippy --features wasm -- -D warnings | |
| - name: Clippy default | |
| run: cargo clippy --no-default-features -- -D warnings | |
| - name: Install dependencies | |
| run: | | |
| rustup target add thumbv7m-none-eabi | |
| rustup target add wasm32-unknown-unknown | |
| - name: Clippy example stm32 | |
| working-directory: examples/stm32 | |
| run: cargo clippy -- -D warnings | |
| - name: Clippy example stm32-embassy | |
| working-directory: examples/stm32-embassy | |
| run: cargo clippy -- -D warnings | |
| - name: Build example wasm | |
| working-directory: examples/wasm | |
| run: cargo build --target wasm32-unknown-unknown --release | |
| - name: Tests | |
| run: cargo test tests --features std |