Fix no-std check

Use no-std target to ensure we don't link to std.
This commit is contained in:
Taiki Endo 2023-02-19 12:04:49 +09:00
parent fb7fe0be4c
commit a636da29bb
1 changed files with 3 additions and 1 deletions

View File

@ -38,6 +38,7 @@ jobs:
- name: Install Rust
# --no-self-update is necessary because the windows environment cannot self-update rustup.exe.
run: rustup update ${{ matrix.rust }} --no-self-update && rustup default ${{ matrix.rust }}
- run: rustup target add thumbv7m-none-eabi
- name: Install wasm-pack
uses: taiki-e/install-action@wasm-pack
if: startsWith(matrix.os, 'ubuntu')
@ -49,7 +50,8 @@ jobs:
run: cargo check -Z features=dev_dep
- run: cargo test
- name: Build with no default features
run: cargo build --no-default-features
# Use no-std target to ensure we don't link to std.
run: cargo build --no-default-features --target thumbv7m-none-eabi
- name: Test wasm
run: wasm-pack test --headless --chrome
if: startsWith(matrix.os, 'ubuntu')