Skip to content

Commit 9a2aea8

Browse files
committed
add MSRV check to CI
1 parent d40dbf3 commit 9a2aea8

File tree

8 files changed

+28
-12
lines changed

8 files changed

+28
-12
lines changed

.github/workflows/rust.yml

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,25 @@ jobs:
2121
- name: Check style
2222
run: cargo fmt -- --check
2323

24-
build-and-test:
24+
test:
2525
runs-on: ${{ matrix.os }}
2626
strategy:
2727
matrix:
28-
os: [ ubuntu-latest, windows-latest, macos-latest ]
28+
os: [ubuntu-latest, macos-latest, windows-latest]
29+
rust: [stable]
30+
include:
31+
- os: ubuntu-latest
32+
rust: nightly
2933
steps:
30-
- uses: actions/checkout@v2
31-
- name: Build
32-
run: cargo build --locked --tests --verbose
33-
- name: Run tests
34-
run: cargo test --locked --verbose
34+
- uses: actions/checkout@v6
35+
- uses: dtolnay/rust-toolchain@master
36+
with:
37+
toolchain: ${{ matrix.rust }}
38+
- run: cargo test --all-features --locked --verbose
39+
40+
msrv:
41+
runs-on: ubuntu-latest
42+
steps:
43+
- uses: actions/checkout@v6
44+
- uses: taiki-e/install-action@cargo-hack
45+
- run: cargo hack --no-dev-deps --rust-version check --all

Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ members = [
1111

1212
resolver = "2"
1313

14+
[workspace.package]
15+
rust-version = "1.88.0"
16+
1417
[workspace.dependencies]
1518
typify = { version = "0.5.0", path = "typify" }
1619
typify-impl = { version = "0.5.0", path = "typify-impl" }

cargo-typify/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ repository = "https://github.com/oxidecomputer/typify"
88
readme = "README.md"
99
keywords = ["json", "schema", "cargo"]
1010
categories = ["api-bindings", "compilers"]
11+
rust-version.workspace = true
1112

1213
default-run = "cargo-typify"
1314

rust-toolchain.toml

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

typify-impl/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ license = "Apache-2.0"
66
description = "typify backend implementation"
77
repository = "https://github.com/oxidecomputer/typify"
88
readme = "../README.md"
9+
rust-version.workspace = true
910

1011
[dependencies]
1112
heck = { workspace = true }

typify-macro/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ license = "Apache-2.0"
66
description = "typify macro implementation"
77
repository = "https://github.com/oxidecomputer/typify"
88
readme = "../README.md"
9+
rust-version.workspace = true
910

1011
[lib]
1112
proc-macro = true

typify-test/Cargo.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
name = "typify-test"
33
version = "0.0.0"
44
edition = "2021"
5+
rust-version.workspace = true
56

67
[dependencies]
78
regress = { workspace = true }
8-
serde = { workspace = true }
9+
serde = { workspace = true, features = ["derive"] }
910
serde_json = { workspace = true }
1011

1112
[build-dependencies]
@@ -14,5 +15,5 @@ typify = { path = "../typify" }
1415
ipnetwork = { workspace = true }
1516
prettyplease = { workspace = true }
1617
schemars = { workspace = true }
17-
serde = { workspace = true }
18+
serde = { workspace = true, features = ["derive"] }
1819
syn = { workspace = true }

typify/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ repository = "https://github.com/oxidecomputer/typify"
88
readme = "../README.md"
99
keywords = ["json", "schema", "proc_macro"]
1010
categories = ["api-bindings", "compilers"]
11+
rust-version.workspace = true
1112

1213
[features]
1314
default = ["macro"]

0 commit comments

Comments
 (0)