Skip to content

Commit

Permalink
cargo: Limit example dev-dependencies to arm target
Browse files Browse the repository at this point in the history
Only add dev-dependendencies that are needed for the example on arm
targets as they're not needed anywhere else. This allows running the
MSRV doc and lib tests on x86 again
  • Loading branch information
sjoerdsimons committed Jul 4, 2024
1 parent 53039a8 commit a75fae8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ jobs:
- run: cargo test --doc --target x86_64-unknown-linux-gnu

test-msrv:
name: build with MSRV
name: test with MSRV
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.75
- run: cargo build --lib --target x86_64-unknown-linux-gnu
- run: cargo doc --target x86_64-unknown-linux-gnu
- run: cargo test --lib --target x86_64-unknown-linux-gnu
- run: cargo test --doc --target x86_64-unknown-linux-gnu

build:
strategy:
Expand Down
4 changes: 3 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ display-interface-spi = "0.5.0"
embedded-graphics-core = { version = "0.4.0", optional = true }

[dev-dependencies]
embedded-graphics = "0.8.0"

[target.'cfg(target_arch="arm")'.dev-dependencies]
cortex-m = { version = "0.7.2", features = ["critical-section-single-core"] }
cortex-m-rt = "0.7.3"
cortex-m-rtic = "1.1.4"
Expand All @@ -32,7 +35,6 @@ defmt-rtt = "0.4.0"
panic-probe = { version = "0.3.1", features = ["print-defmt"] }
# Used to load BMP images in various examples
tinybmp = "0.5.0"
embedded-graphics = "0.8.0"
# Used by the noise_i2c examples
rand = { version = "0.8.4", default-features = false, features = [ "small_rng" ] }
embassy-stm32 = { version = "0.1.0", git = "https://github.com/embassy-rs/embassy", features = [ "stm32f103c8", "memory-x", "defmt", "exti", "time-driver-tim3" , "unstable-pac"] }
Expand Down

0 comments on commit a75fae8

Please sign in to comment.