Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: simplify, test MSRV. #545

Merged
merged 1 commit into from
Dec 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 40 additions & 30 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,38 +13,48 @@ env:
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- stable
- 1.60.0 # MSRV
- nightly
target:
- x86_64-unknown-linux-gnu
- thumbv7m-none-eabi
features:
- ''
include:
- rust: stable
target: x86_64-unknown-linux-gnu
features: std
- rust: stable
target: x86_64-unknown-linux-gnu
features: alloc
- rust: nightly
target: x86_64-unknown-linux-gnu
features: std,tokio-1,futures-03,defmt-03
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
target: ${{ matrix.target }}
- uses: dtolnay/rust-toolchain@beta
- run: cargo test --workspace

test-all-features:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@beta
- run: cargo test --workspace --all-features

- run: mv Cargo.stable.toml Cargo.toml
if: matrix.rust != 'nightly'
build-nostd:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@beta
with:
target: thumbv7m-none-eabi
- run: >
cargo build
--workspace
--target thumbv7m-none-eabi
--features async,defmt-03

- run: cargo check --target=${{ matrix.target }} --features=${{ matrix.features }}
msrv-1-60:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/[email protected]
- run: >
cargo test
-p embedded-hal:1.0.0-rc.2
-p embedded-hal-bus
-p embedded-hal-nb
-p embedded-io
-p embedded-io-adapters
-p embedded-can

- run: cargo test --target=${{ matrix.target }} --features=${{ matrix.features }}
if: contains(matrix.target, 'linux')
msrv-1-75:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@beta
- run: cargo test --workspace --all-features
20 changes: 0 additions & 20 deletions Cargo.stable.toml

This file was deleted.

2 changes: 1 addition & 1 deletion embedded-hal-async/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ name = "embedded-hal-async"
readme = "README.md"
repository = "https://github.com/rust-embedded/embedded-hal"
version = "1.0.0-rc.2"
rust-version = "1.65.0"
rust-version = "1.75"

[features]
defmt-03 = ["dep:defmt-03", "embedded-hal/defmt-03"]
Expand Down
11 changes: 3 additions & 8 deletions embedded-hal-async/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,10 @@ or a console to operate either on hardware serial ports or on virtual ones like

## Minimum Supported Rust Version (MSRV)

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

Keep in mind Rust nightlies can make backwards-incompatible changes to unstable features
at any time. If this happens, we might do changes that increase the minimum required nightly
version in any patch release.

When AFIT becomes stable, MSRV will be bumped to the Rust version that stabilizes it, after which
point the [standard MSRV bump policy](../docs/msrv.md) will apply.
See [here](../docs/msrv.md) for details on how the MSRV may be upgraded.

## License

Expand Down
2 changes: 2 additions & 0 deletions embedded-hal-bus/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ compile with older versions but that may change in any new patch release.

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

Enabling the `async` Cargo features requires Rust 1.75 or higher.

## License

Licensed under either of
Expand Down
2 changes: 1 addition & 1 deletion embedded-hal/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ categories = ["asynchronous", "embedded", "hardware-support", "no-std"]
description = " A Hardware Abstraction Layer (HAL) for embedded systems "
documentation = "https://docs.rs/embedded-hal"
edition = "2021"
rust-version = "1.56"
rust-version = "1.60"
keywords = ["hal", "IO"]
license = "MIT OR Apache-2.0"
name = "embedded-hal"
Expand Down
5 changes: 1 addition & 4 deletions embedded-io-adapters/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,7 @@ compile with older versions but that may change in any new patch release.

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

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

## License

Expand Down
1 change: 1 addition & 0 deletions embedded-io-async/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name = "embedded-io-async"
version = "0.6.1"
edition = "2021"
rust-version = "1.75"
description = "Async embedded IO traits"
repository = "https://github.com/rust-embedded/embedded-hal"
readme = "README.md"
Expand Down
7 changes: 3 additions & 4 deletions embedded-io-async/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,10 @@ This project is developed and maintained by the [HAL team](https://github.com/ru

## Minimum Supported Rust Version (MSRV)

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

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

## License

Expand Down