Skip to content

Commit e6bfc1c

Browse files
committed
Set the MSRV to 1.65 and test this in CI
Currently this crate has no clear MSRV. Pick a common ecosystem point of 1.65 (let-else!) and start testing that in CI. We could easily bump this further if needed, but there isn't much active development and it is unlikely to be a point of contributor friction. We can't easily be much below this because of `cc`.
1 parent 19cd68a commit e6bfc1c

File tree

2 files changed

+23
-2
lines changed

2 files changed

+23
-2
lines changed

.github/workflows/main.yml

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
rustup component add clippy
1919
- uses: Swatinem/rust-cache@v2
2020
- run: cargo clippy --all-features --all-targets -- -D warnings
21-
21+
2222
test:
2323
name: Test
2424
runs-on: ${{ matrix.os }}
@@ -133,10 +133,29 @@ jobs:
133133
- uses: actions/checkout@v4
134134
- run: |
135135
rustup update nightly --no-self-update
136-
rustup default nightly
136+
rustup default nightly
137137
- uses: Swatinem/rust-cache@v2
138138
- run: cargo doc
139139

140+
msrv:
141+
name: MSRV check
142+
runs-on: ubuntu-24.04
143+
timeout-minutes: 10
144+
env:
145+
RUSTFLAGS: # No need to check warnings on old MSRV, unset `-Dwarnings`
146+
steps:
147+
- uses: actions/checkout@master
148+
- name: Install Rust
149+
run: |
150+
msrv="$(
151+
cargo metadata --format-version=1 |
152+
jq -r '.packages[] | select(.name == "cmake") | .rust_version'
153+
)"
154+
echo "MSRV: $msrv"
155+
rustup update "$msrv" --no-self-update && rustup default "$msrv"
156+
- uses: Swatinem/rust-cache@v2
157+
- run: cargo check
158+
140159
success:
141160
needs:
142161
- clippy
@@ -145,6 +164,7 @@ jobs:
145164
- ios_cross_compile_test
146165
- rustfmt
147166
- doc
167+
- msrv
148168
runs-on: ubuntu-latest
149169
# GitHub branch protection is exceedingly silly and treats "jobs skipped because a dependency
150170
# failed" as success. So we have to do some contortions to ensure the job fails if any of its

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ A build dependency for running `cmake` to build a native library
1313
"""
1414
categories = ["development-tools::build-utils"]
1515
edition = "2021"
16+
rust-version = "1.65"
1617

1718
[dependencies]
1819
cc = "1.1.0"

0 commit comments

Comments
 (0)