Skip to content

Commit

Permalink
Merge pull request #94 from pinkforest/no_std-tests
Browse files Browse the repository at this point in the history
Test `no_std` builds on a target lacking `std`
  • Loading branch information
burdges authored Sep 23, 2023
2 parents b1baba0 + 8037825 commit 38035b5
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,22 @@ jobs:
- uses: dtolnay/rust-toolchain@stable
- run: cargo test

build:
name: Build (no_std)
build-nostd:
name: Build 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 38035b5

Please sign in to comment.