Skip to content

Commit 4d6bee9

Browse files
committed
Improve CI and cfg
1 parent 08aab3e commit 4d6bee9

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ jobs:
2727
cargo install cargo-binutils
2828
rustup component add llvm-tools-preview
2929
- name: Check
30-
run: cargo check --target thumbv7em-none-eabi
30+
run: cargo check --features cortex-m --target thumbv7em-none-eabi
3131
- name: Clippy
32-
run: cargo clippy --target thumbv7em-none-eabi
32+
run: cargo clippy --features cortex-m --target thumbv7em-none-eabi
3333
- name: Format
3434
run: cargo fmt

src/lib.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@
1212
#![no_main]
1313
#![macro_use]
1414

15-
#[cfg(not(any(feature = "cortex-m", feature = "risc-v", feature = "panic-handler")))]
15+
#[cfg(all(
16+
not(any(feature = "cortex-m", feature = "risc-v")),
17+
all(not(test), feature = "panic-handler")
18+
))]
1619
compile_error!("Enable either the cortex-m or risc-v feature");
1720

1821
#[cfg(all(not(test), feature = "panic-handler"))]

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy