diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 05a30b63..4b828d85 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -58,11 +58,18 @@ jobs: # macos-14 for M1 runners os: [ubuntu-22.04, windows-2022, macos-14] features: [all, default] + rust-version: + - stable + # 1.85 is the MSRV + - "1.85" include: - features: all feature_flags: --all-features steps: - uses: actions/checkout@0c366fd6a839edf440554fa01a7085ccba70ac98 + - uses: dtolnay/rust-toolchain@v1 + with: + toolchain: ${{ matrix.rust-version }} - name: Report cargo version run: cargo --version - name: Report rustc version @@ -75,4 +82,7 @@ jobs: - name: Build run: cargo build ${{ matrix.feature_flags }} --locked --all-targets --verbose - name: Run tests - run: cargo test ${{ matrix.feature_flags }} --locked --all-targets --verbose + run: cargo test ${{ matrix.feature_flags }} --locked --all-targets --verbose -- --exact --skip fail + - name: Run trybuild tests + run: cargo test ${{ matrix.feature_flags }} --locked --all-targets --verbose -- --exact fail + diff --git a/Cargo.toml b/Cargo.toml index 60eb568b..8643fa5e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,6 +9,10 @@ default-members = ["dropshot", "dropshot_endpoint" ] resolver = "2" +[workspace.package] +edition = "2024" +rust-version = "1.85" + [workspace.lints.clippy] # Clippy's style nits are useful, but not worth keeping in CI. style = { level = "allow", priority = -1 } diff --git a/dropshot/Cargo.toml b/dropshot/Cargo.toml index 97ff1d85..15576849 100644 --- a/dropshot/Cargo.toml +++ b/dropshot/Cargo.toml @@ -3,7 +3,8 @@ name = "dropshot" description = "expose REST APIs from a Rust program" version = "0.17.0" authors = ["David Pacheco "] -edition = "2021" +edition.workspace = true +rust-version.workspace = true license = "Apache-2.0" repository = "https://github.com/oxidecomputer/dropshot/" readme = "README-crates.io.md" diff --git a/dropshot_endpoint/Cargo.toml b/dropshot_endpoint/Cargo.toml index b73c5ab4..a475153b 100644 --- a/dropshot_endpoint/Cargo.toml +++ b/dropshot_endpoint/Cargo.toml @@ -3,7 +3,8 @@ name = "dropshot_endpoint" description = "macro used by dropshot consumers for registering handlers" version = "0.17.0" authors = ["Adam H. Leventhal "] -edition = "2021" +edition.workspace = true +rust-version.workspace = true license = "Apache-2.0" repository = "https://github.com/oxidecomputer/dropshot/" diff --git a/rustfmt.toml b/rustfmt.toml index 8a0aff38..59816574 100644 --- a/rustfmt.toml +++ b/rustfmt.toml @@ -4,4 +4,3 @@ max_width = 80 use_small_heuristics = "max" edition = "2024" -style_edition = "2024"