diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index f5c69049..0b91db9e 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -21,14 +21,25 @@ jobs: - name: Check style run: cargo fmt -- --check - build-and-test: + test: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ ubuntu-latest, windows-latest, macos-latest ] + os: [ubuntu-latest, macos-latest, windows-latest] + rust: [stable] + include: + - os: ubuntu-latest + rust: nightly steps: - - uses: actions/checkout@v2 - - name: Build - run: cargo build --locked --tests --verbose - - name: Run tests - run: cargo test --locked --verbose + - uses: actions/checkout@v6 + - uses: dtolnay/rust-toolchain@master + with: + toolchain: ${{ matrix.rust }} + - run: cargo test --all-features --locked --verbose + + msrv: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + - uses: taiki-e/install-action@cargo-hack + - run: cargo hack --no-dev-deps --rust-version check --package typify diff --git a/Cargo.toml b/Cargo.toml index 37c2c943..5c80980e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,6 +11,9 @@ members = [ resolver = "2" +[workspace.package] +rust-version = "1.88.0" + [workspace.dependencies] typify = { version = "0.5.0", path = "typify" } typify-impl = { version = "0.5.0", path = "typify-impl" } diff --git a/cargo-typify/Cargo.toml b/cargo-typify/Cargo.toml index d09cdd54..3b58e787 100644 --- a/cargo-typify/Cargo.toml +++ b/cargo-typify/Cargo.toml @@ -8,6 +8,7 @@ repository = "https://github.com/oxidecomputer/typify" readme = "README.md" keywords = ["json", "schema", "cargo"] categories = ["api-bindings", "compilers"] +rust-version.workspace = true default-run = "cargo-typify" diff --git a/rust-toolchain.toml b/rust-toolchain.toml deleted file mode 100644 index 65c0d610..00000000 --- a/rust-toolchain.toml +++ /dev/null @@ -1,3 +0,0 @@ -[toolchain] -channel = "1.89.0" -profile = "default" diff --git a/typify-impl/Cargo.toml b/typify-impl/Cargo.toml index 11cdb3f1..ed807993 100644 --- a/typify-impl/Cargo.toml +++ b/typify-impl/Cargo.toml @@ -6,6 +6,7 @@ license = "Apache-2.0" description = "typify backend implementation" repository = "https://github.com/oxidecomputer/typify" readme = "../README.md" +rust-version.workspace = true [dependencies] heck = { workspace = true } diff --git a/typify-macro/Cargo.toml b/typify-macro/Cargo.toml index acf12bf6..64199f1c 100644 --- a/typify-macro/Cargo.toml +++ b/typify-macro/Cargo.toml @@ -6,6 +6,7 @@ license = "Apache-2.0" description = "typify macro implementation" repository = "https://github.com/oxidecomputer/typify" readme = "../README.md" +rust-version.workspace = true [lib] proc-macro = true diff --git a/typify-test/Cargo.toml b/typify-test/Cargo.toml index 8e134288..46f4754c 100644 --- a/typify-test/Cargo.toml +++ b/typify-test/Cargo.toml @@ -2,10 +2,11 @@ name = "typify-test" version = "0.0.0" edition = "2021" +rust-version.workspace = true [dependencies] regress = { workspace = true } -serde = { workspace = true } +serde = { workspace = true, features = ["derive"] } serde_json = { workspace = true } [build-dependencies] @@ -14,5 +15,5 @@ typify = { path = "../typify" } ipnetwork = { workspace = true } prettyplease = { workspace = true } schemars = { workspace = true } -serde = { workspace = true } +serde = { workspace = true, features = ["derive"] } syn = { workspace = true } diff --git a/typify/Cargo.toml b/typify/Cargo.toml index 534f1fa8..f582a2c9 100644 --- a/typify/Cargo.toml +++ b/typify/Cargo.toml @@ -8,6 +8,7 @@ repository = "https://github.com/oxidecomputer/typify" readme = "../README.md" keywords = ["json", "schema", "proc_macro"] categories = ["api-bindings", "compilers"] +rust-version.workspace = true [features] default = ["macro"]