Skip to content

Commit

Permalink
Test no_std builds on target lacking no_std
Browse files Browse the repository at this point in the history
  • Loading branch information
pinkforest committed Sep 22, 2023
1 parent b1baba0 commit 5c96c2a
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,23 @@ jobs:
- uses: dtolnay/rust-toolchain@stable
- run: cargo test

build:
name: Build (no_std)
# Build no_std on target lacking std
build-nostd:
name: Build serial on no_std target (thumbv7em-none-eabi)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- run: cargo build --no-default-features
- run: cargo build --no-default-features --features alloc
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
targets: thumbv7em-none-eabi
- uses: taiki-e/install-action@cargo-hack
# No default features build
- name: no_std / no feat
run: cargo build --target thumbv7em-none-eabi --release --no-default-features
# cargo hack ensures all no_std features all built-checked
- name: no_std / cargo hack features
run: cargo hack build --target thumbv7em-none-eabi --release --each-feature --exclude-features default,std,getrandom

clippy:
name: Check that clippy is happy
Expand Down

0 comments on commit 5c96c2a

Please sign in to comment.