Skip to content

Commit a9cfae2

Browse files
authored
cargo: Sync up MSRV with CI by setting rust-version (#33)
This fixes the `+nightly -Zminimal-versions generate-lockfile` step to no longer generate a `version = 4` `Cargo.lock` which is incompatible with our 1.74 MSRV. And it communicates to crates.io and newer `cargo` versions with MSRV-aware resolver what our crate is going to be compatible with. Also drop the `macos-12` runner CI: GitHub no longer hosts it, and we already have `macos-13` and `macos-latest` anyway.
1 parent 5143be1 commit a9cfae2

File tree

3 files changed

+18
-26
lines changed

3 files changed

+18
-26
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
name: Build-test MSRV (1.74) with minimal crate dependencies
2222
strategy:
2323
matrix:
24-
os: [ubuntu-latest, windows-latest, macos-latest, macos-12, macos-13]
24+
os: [ubuntu-latest, windows-latest, macos-latest, macos-13]
2525
runs-on: ${{ matrix.os }}
2626
steps:
2727
- uses: actions/checkout@v4

.github/workflows/cross.yaml

Lines changed: 15 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ jobs:
77
runs-on: ubuntu-latest
88
name: Lint
99
env:
10-
RUSTFLAGS: "-Dwarnings"
10+
RUSTFLAGS: -Dwarnings
1111
steps:
1212
- name: Checkout
1313
uses: actions/checkout@v4
1414
with:
15-
submodules: 'true'
15+
submodules: true
1616
checks:
1717
name: ${{ matrix.name }} (${{ matrix.target }})
1818
runs-on: ${{ matrix.os }}
@@ -21,15 +21,6 @@ jobs:
2121
strategy:
2222
fail-fast: false
2323
matrix:
24-
target:
25-
- x86_64-unknown-linux-gnu
26-
- x86_64-apple-darwin
27-
- x86_64-pc-windows-msvc
28-
- x86_64-unknown-freebsd
29-
- aarch64-linux-android
30-
- aarch64-unknown-linux-gnu
31-
- armv7-unknown-linux-gnueabihf
32-
3324
include:
3425
- os: ubuntu-latest
3526
name: Linux
@@ -49,24 +40,24 @@ jobs:
4940
cross: false
5041
test: true
5142

52-
- os: ubuntu-latest
53-
name: FreeBSD
54-
target: x86_64-unknown-freebsd
55-
cross: true
56-
test: false
43+
# - os: ubuntu-latest
44+
# name: FreeBSD
45+
# target: x86_64-unknown-freebsd
46+
# cross: true
47+
# test: false
5748

5849
- os: ubuntu-latest
5950
name: Android
6051
target: aarch64-linux-android
6152
cross: true
6253
test: true
6354

64-
- os: ubuntu-latest
65-
name: OpenWrt
66-
target: aarch64-unknown-linux-gnu
67-
cross: true
68-
test: true
69-
cargo_args: --features "openwrt"
55+
# - os: ubuntu-latest
56+
# name: OpenWrt
57+
# target: aarch64-unknown-linux-gnu
58+
# cross: true
59+
# test: true
60+
# cargo_args: --features openwrt
7061

7162
- os: ubuntu-latest
7263
name: Linux ARMv7
@@ -78,7 +69,7 @@ jobs:
7869
- name: Checkout
7970
uses: actions/checkout@v4
8071
with:
81-
submodules: 'true'
72+
submodules: true
8273

8374
- name: Bootstrap
8475
uses: dtolnay/rust-toolchain@stable
@@ -101,4 +92,4 @@ jobs:
10192
- uses: actions/upload-artifact@v4
10293
with:
10394
name: info-${{ matrix.target }}
104-
path: info.txt
95+
path: info.txt

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ description = "Rust bindings for `cpuinfo`"
1010
include = ["src", "vendor", "examples", "LICENSE", "build.rs"]
1111
categories = ["hardware-support"] # https://crates.io/category_slugs
1212
keywords = []
13+
rust-version = "1.74"
1314

1415
[features]
1516
generate_bindings = ["dep:bindgen"]
@@ -23,4 +24,4 @@ serde_json = "1"
2324

2425
[build-dependencies]
2526
bindgen = { version = "0.69", optional = true }
26-
cc = "1.1.0"
27+
cc = "1.1"

0 commit comments

Comments
 (0)