From 80378253aadb0ef53c513de9fca3e0a0837758a3 Mon Sep 17 00:00:00 2001 From: pinkforest <36498018+pinkforest@users.noreply.github.com> Date: Fri, 22 Sep 2023 15:40:50 +1000 Subject: [PATCH] Test no_std builds on target lacking no_std --- .github/workflows/rust.yml | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index e76bc4b..77d9972 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -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