Skip to content

Commit e6d05dc

Browse files
authored
Add msrv and min-versions check (#20)
1 parent 5efaeae commit e6d05dc

File tree

2 files changed

+16
-12
lines changed

2 files changed

+16
-12
lines changed

.github/workflows/ci.yml

+12-12
Original file line numberDiff line numberDiff line change
@@ -118,26 +118,26 @@ jobs:
118118
run: cargo doc --no-deps --all-features
119119

120120
msrv:
121-
name: Minimum Supported Rust Version
121+
name: Minimum Supported Rust Version, based on min dependency versions
122122
runs-on: ubuntu-latest
123123
steps:
124-
- name: Checkout sources
125-
uses: actions/checkout@v4
124+
- uses: actions/checkout@v4
125+
126+
- name: Install nightly toolchain
127+
uses: dtolnay/rust-toolchain@nightly
126128

127-
- name: Install cargo-binstall
129+
- name: Install dependencies
128130
uses: taiki-e/install-action@v2
129131
with:
130-
tool: cargo-binstall
132+
tool: cargo-hack, cargo-minimal-versions, cargo-binstall
131133

132134
- name: Install cargo-msrv
133-
run: cargo binstall --version 0.16.0-beta.20 --no-confirm cargo-msrv
134-
135-
#- uses: Swatinem/rust-cache@v1
135+
run: cargo binstall --version 0.16.0-beta.22 --no-confirm cargo-msrv
136136

137-
- name: Check MSRV
138-
#run: cargo msrv --log-target=stdout --log-level debug --output-format json --all-features --target=thumbv7em-none-eabihf
139-
#run: cargo msrv --log-target=stdout --log-level debug --output-format json --all-features --target=thumbv7em-none-eabihf verify
140-
run: cargo msrv --output-format json --all-features --target=thumbv7em-none-eabihf verify
137+
- name: Check with minimal versions
138+
# To find out the current MSRV, remove the `rust-version` entry from `Cargo.toml` and run:
139+
# run: cargo minimal-versions msrv --output-format json --all-features --target=thumbv7em-none-eabihf --log-target=stdout --log-level debug
140+
run: cargo minimal-versions msrv --output-format json --all-features --target thumbv7em-none-eabihf verify
141141

142142
semver:
143143
name: Semantic Versioning

Cargo.toml

+4
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ futures = { version = "0.3.30", default-features = false, features = [
4040
"async-await",
4141
] }
4242

43+
# Fix for min-versions.
44+
# TODO: remove once unnecessary.
45+
bare-metal = ">= 0.2.4"
46+
ral-registers = ">= 0.1.3"
4347

4448
[dev-dependencies]
4549
cortex-m = "0.7.7"

0 commit comments

Comments
 (0)