diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index da61d89a4..eda0c9c48 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -90,9 +90,17 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - uses: hecrj/setup-rust-action@v2 + - name: Resolve MSRV aware dependencies + run: cargo update + env: + CARGO_RESOLVER_INCOMPATIBLE_RUST_VERSIONS: fallback + - name: Get MSRV from manifest file + id: msrv + run: echo "version=$(yq '.workspace.package.rust-version' Cargo.toml)" >> $GITHUB_OUTPUT - uses: hecrj/setup-rust-action@v2 with: - rust-version: "1.75" # msrv + rust-version: ${{ steps.msrv.outputs.version }} - uses: taiki-e/install-action@cargo-no-dev-deps - uses: Swatinem/rust-cache@v2 - run: cargo no-dev-deps --no-private check --all-features diff --git a/Cargo.toml b/Cargo.toml index 95a3860e5..153316e60 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -31,6 +31,9 @@ members = [ ] resolver = "2" +[workspace.package] +rust-version = "1.75" + [workspace.lints.rust] missing_debug_implementations = "warn" missing_docs = "warn" diff --git a/tonic-build/Cargo.toml b/tonic-build/Cargo.toml index 98d913e29..456eda887 100644 --- a/tonic-build/Cargo.toml +++ b/tonic-build/Cargo.toml @@ -13,6 +13,7 @@ name = "tonic-build" readme = "README.md" repository = "https://github.com/hyperium/tonic" version = "0.13.0" +rust-version = { workspace = true } [dependencies] prettyplease = { version = "0.2" } diff --git a/tonic-health/Cargo.toml b/tonic-health/Cargo.toml index ab4ed6219..95a6ad147 100644 --- a/tonic-health/Cargo.toml +++ b/tonic-health/Cargo.toml @@ -13,6 +13,7 @@ name = "tonic-health" readme = "README.md" repository = "https://github.com/hyperium/tonic" version = "0.13.0" +rust-version = { workspace = true } [dependencies] prost = "0.13" diff --git a/tonic-reflection/Cargo.toml b/tonic-reflection/Cargo.toml index f9c2bcac5..09a30ea80 100644 --- a/tonic-reflection/Cargo.toml +++ b/tonic-reflection/Cargo.toml @@ -16,6 +16,7 @@ name = "tonic-reflection" readme = "README.md" repository = "https://github.com/hyperium/tonic" version = "0.13.0" +rust-version = { workspace = true } [package.metadata.docs.rs] all-features = true diff --git a/tonic-types/Cargo.toml b/tonic-types/Cargo.toml index 99139a28d..2ee953238 100644 --- a/tonic-types/Cargo.toml +++ b/tonic-types/Cargo.toml @@ -16,6 +16,7 @@ name = "tonic-types" readme = "README.md" repository = "https://github.com/hyperium/tonic" version = "0.13.0" +rust-version = { workspace = true } [dependencies] prost = "0.13" diff --git a/tonic-web/Cargo.toml b/tonic-web/Cargo.toml index f15779f01..e6ca057f8 100644 --- a/tonic-web/Cargo.toml +++ b/tonic-web/Cargo.toml @@ -13,6 +13,7 @@ name = "tonic-web" readme = "README.md" repository = "https://github.com/hyperium/tonic" version = "0.13.0" +rust-version = { workspace = true } [dependencies] base64 = "0.22" diff --git a/tonic/Cargo.toml b/tonic/Cargo.toml index 7a8c50fd9..33fe76af1 100644 --- a/tonic/Cargo.toml +++ b/tonic/Cargo.toml @@ -21,6 +21,7 @@ license = "MIT" readme = "../README.md" repository = "https://github.com/hyperium/tonic" version = "0.13.0" +rust-version = {workspace = true} [features] codegen = ["dep:async-trait"]