Fix workspace issues when building for stable.

This commit is contained in:
Dario Nieuwenhuis 2023-07-15 13:05:54 +02:00
parent 7d975f025d
commit 981caa649b
3 changed files with 23 additions and 4 deletions

View File

@ -38,7 +38,7 @@ jobs:
toolchain: ${{ matrix.rust }}
target: ${{ matrix.target }}
- run: sed -i '/nightly-only/d' Cargo.toml
- run: mv Cargo.stable.toml Cargo.toml
if: matrix.rust != 'nightly'
- run: cargo check --target=${{ matrix.target }} --features=${{ matrix.features }}

20
Cargo.stable.toml Normal file
View File

@ -0,0 +1,20 @@
# CI moves this file to `Cargo.toml` when building for stable.
[workspace]
resolver = "2"
members = [
"embedded-hal",
"embedded-hal-nb",
"embedded-hal-bus",
"embedded-can",
"embedded-io",
"embedded-io-adapters",
]
# Cargo implicitly adds path dependencies to the workspace.
# Even if they're optional and not enabled. This prevents that.
exclude = [
"embedded-hal-async",
"embedded-io-async",
]

View File

@ -1,14 +1,13 @@
[workspace]
resolver = "2"
# CI removes lines containing 'nightly-only' when not building with nightly.
members = [
"embedded-hal",
"embedded-hal-async", # nightly-only
"embedded-hal-async",
"embedded-hal-nb",
"embedded-hal-bus",
"embedded-can",
"embedded-io",
"embedded-io-async", # nightly-only
"embedded-io-async",
"embedded-io-adapters",
]