From 21dc2dd4901f4146d7f3a60ede5031f06e4848e9 Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Tue, 29 Apr 2025 09:31:03 +0200 Subject: [PATCH] Fix `cargo check` for `bytes` feature. --- .github/workflows/build.yml | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 26ce8ce2..cacfb443 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -163,14 +163,21 @@ jobs: - name: cargo check run: | - cargo check --target=${{ matrix.target }} - cargo check --target=${{ matrix.target }} --features="alloc" - cargo check --target=${{ matrix.target }} --features="bytes" - cargo check --target=${{ matrix.target }} --features="defmt" - cargo check --target=${{ matrix.target }} --features="mpmc_large" - cargo check --target=${{ matrix.target }} --features="portable-atomic-critical-section" - cargo check --target=${{ matrix.target }} --features="serde" - cargo check --target=${{ matrix.target }} --features="ufmt" + cargo check --target="${target}" + cargo check --target="${target}" --features="alloc" + + # Needs native atomics, since `bytes` doesn't support `portable-atomic`. + if [ "${target}" != "riscv32imc-unknown-none-elf" ] && [ "${target}" != "thumbv6m-none-eabi" ]; then + cargo check --target="${target}" --features="bytes" + fi + + cargo check --target="${target}" --features="defmt" + cargo check --target="${target}" --features="mpmc_large" + cargo check --target="${target}" --features="portable-atomic-critical-section" + cargo check --target="${target}" --features="serde" + cargo check --target="${target}" --features="ufmt" + env: + target: ${{ matrix.target }} doc: name: doc