Skip to content

Commit 635cf86

Browse files
authored
Merge pull request #545 from Dirbaio/msrv-ci
ci: simplify, test MSRV.
2 parents ac10b6a + 4857fef commit 635cf86

File tree

9 files changed

+52
-68
lines changed

9 files changed

+52
-68
lines changed

.github/workflows/test.yml

Lines changed: 40 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -13,38 +13,48 @@ env:
1313
jobs:
1414
test:
1515
runs-on: ubuntu-latest
16-
strategy:
17-
matrix:
18-
rust:
19-
- stable
20-
- 1.60.0 # MSRV
21-
- nightly
22-
target:
23-
- x86_64-unknown-linux-gnu
24-
- thumbv7m-none-eabi
25-
features:
26-
- ''
27-
include:
28-
- rust: stable
29-
target: x86_64-unknown-linux-gnu
30-
features: std
31-
- rust: stable
32-
target: x86_64-unknown-linux-gnu
33-
features: alloc
34-
- rust: nightly
35-
target: x86_64-unknown-linux-gnu
36-
features: std,tokio-1,futures-03,defmt-03
3716
steps:
3817
- uses: actions/checkout@v3
39-
- uses: dtolnay/rust-toolchain@master
40-
with:
41-
toolchain: ${{ matrix.rust }}
42-
target: ${{ matrix.target }}
18+
- uses: dtolnay/rust-toolchain@beta
19+
- run: cargo test --workspace
20+
21+
test-all-features:
22+
runs-on: ubuntu-latest
23+
steps:
24+
- uses: actions/checkout@v3
25+
- uses: dtolnay/rust-toolchain@beta
26+
- run: cargo test --workspace --all-features
4327

44-
- run: mv Cargo.stable.toml Cargo.toml
45-
if: matrix.rust != 'nightly'
28+
build-nostd:
29+
runs-on: ubuntu-latest
30+
steps:
31+
- uses: actions/checkout@v3
32+
- uses: dtolnay/rust-toolchain@beta
33+
with:
34+
target: thumbv7m-none-eabi
35+
- run: >
36+
cargo build
37+
--workspace
38+
--target thumbv7m-none-eabi
39+
--features async,defmt-03
4640
47-
- run: cargo check --target=${{ matrix.target }} --features=${{ matrix.features }}
41+
msrv-1-60:
42+
runs-on: ubuntu-latest
43+
steps:
44+
- uses: actions/checkout@v3
45+
- uses: dtolnay/rust-toolchain@1.60
46+
- run: >
47+
cargo test
48+
-p embedded-hal:1.0.0-rc.2
49+
-p embedded-hal-bus
50+
-p embedded-hal-nb
51+
-p embedded-io
52+
-p embedded-io-adapters
53+
-p embedded-can
4854
49-
- run: cargo test --target=${{ matrix.target }} --features=${{ matrix.features }}
50-
if: contains(matrix.target, 'linux')
55+
msrv-1-75:
56+
runs-on: ubuntu-latest
57+
steps:
58+
- uses: actions/checkout@v3
59+
- uses: dtolnay/rust-toolchain@beta
60+
- run: cargo test --workspace --all-features

Cargo.stable.toml

Lines changed: 0 additions & 20 deletions
This file was deleted.

embedded-hal-async/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ name = "embedded-hal-async"
1212
readme = "README.md"
1313
repository = "https://github.com/rust-embedded/embedded-hal"
1414
version = "1.0.0-rc.2"
15-
rust-version = "1.65.0"
15+
rust-version = "1.75"
1616

1717
[features]
1818
defmt-03 = ["dep:defmt-03", "embedded-hal/defmt-03"]

embedded-hal-async/README.md

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,10 @@ or a console to operate either on hardware serial ports or on virtual ones like
2323

2424
## Minimum Supported Rust Version (MSRV)
2525

26-
This crate requires Rust nightly newer than `nightly-2022-11-22`, due to requiring support for
27-
`async fn` in traits (AFIT), which is not stable yet.
26+
This crate is guaranteed to compile on stable Rust 1.75 and up. It *might*
27+
compile with older versions but that may change in any new patch release.
2828

29-
Keep in mind Rust nightlies can make backwards-incompatible changes to unstable features
30-
at any time. If this happens, we might do changes that increase the minimum required nightly
31-
version in any patch release.
32-
33-
When AFIT becomes stable, MSRV will be bumped to the Rust version that stabilizes it, after which
34-
point the [standard MSRV bump policy](../docs/msrv.md) will apply.
29+
See [here](../docs/msrv.md) for details on how the MSRV may be upgraded.
3530

3631
## License
3732

embedded-hal-bus/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ compile with older versions but that may change in any new patch release.
4141

4242
See [here](../docs/msrv.md) for details on how the MSRV may be upgraded.
4343

44+
Enabling the `async` Cargo features requires Rust 1.75 or higher.
45+
4446
## License
4547

4648
Licensed under either of

embedded-hal/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ categories = ["asynchronous", "embedded", "hardware-support", "no-std"]
88
description = " A Hardware Abstraction Layer (HAL) for embedded systems "
99
documentation = "https://docs.rs/embedded-hal"
1010
edition = "2021"
11-
rust-version = "1.56"
11+
rust-version = "1.60"
1212
keywords = ["hal", "IO"]
1313
license = "MIT OR Apache-2.0"
1414
name = "embedded-hal"

embedded-io-adapters/README.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,7 @@ compile with older versions but that may change in any new patch release.
3434

3535
See [here](../docs/msrv.md) for details on how the MSRV may be upgraded.
3636

37-
Enabling any of the `tokio-*` or `futures-*` Cargo features requires Rust nightly newer than
38-
`nightly-2022-11-22`, due to requiring support for `async fn` in traits (AFIT),
39-
which is not stable yet. Keep in mind Rust nightlies can make backwards-incompatible
40-
changes to unstable features at any time.
37+
Enabling any of the `tokio-*` or `futures-*` Cargo features requires Rust 1.75 or higher.
4138

4239
## License
4340

embedded-io-async/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
name = "embedded-io-async"
33
version = "0.6.1"
44
edition = "2021"
5+
rust-version = "1.75"
56
description = "Async embedded IO traits"
67
repository = "https://github.com/rust-embedded/embedded-hal"
78
readme = "README.md"

embedded-io-async/README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,10 @@ This project is developed and maintained by the [HAL team](https://github.com/ru
1818

1919
## Minimum Supported Rust Version (MSRV)
2020

21-
This crate requires Rust nightly newer than `nightly-2022-11-22`, due to requiring support for
22-
`async fn` in traits (AFIT), which is not stable yet.
21+
This crate is guaranteed to compile on stable Rust 1.75 and up. It *might*
22+
compile with older versions but that may change in any new patch release.
2323

24-
Keep in mind Rust nightlies can make backwards-incompatible changes to unstable features
25-
at any time.
24+
See [here](../docs/msrv.md) for details on how the MSRV may be upgraded.
2625

2726
## License
2827

0 commit comments

Comments
 (0)