Skip to content

Commit dcaa679

Browse files
authored
chore: Introduce rust-version in manifest (#2160)
1 parent 1777e27 commit dcaa679

File tree

8 files changed

+18
-1
lines changed

8 files changed

+18
-1
lines changed

.github/workflows/CI.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,17 @@ jobs:
9090
runs-on: ubuntu-latest
9191
steps:
9292
- uses: actions/checkout@v4
93+
- uses: hecrj/setup-rust-action@v2
94+
- name: Resolve MSRV aware dependencies
95+
run: cargo update
96+
env:
97+
CARGO_RESOLVER_INCOMPATIBLE_RUST_VERSIONS: fallback
98+
- name: Get MSRV from manifest file
99+
id: msrv
100+
run: echo "version=$(yq '.workspace.package.rust-version' Cargo.toml)" >> $GITHUB_OUTPUT
93101
- uses: hecrj/setup-rust-action@v2
94102
with:
95-
rust-version: "1.75" # msrv
103+
rust-version: ${{ steps.msrv.outputs.version }}
96104
- uses: taiki-e/install-action@cargo-no-dev-deps
97105
- uses: Swatinem/rust-cache@v2
98106
- run: cargo no-dev-deps --no-private check --all-features

Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ members = [
3131
]
3232
resolver = "2"
3333

34+
[workspace.package]
35+
rust-version = "1.75"
36+
3437
[workspace.lints.rust]
3538
missing_debug_implementations = "warn"
3639
missing_docs = "warn"

tonic-build/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ name = "tonic-build"
1313
readme = "README.md"
1414
repository = "https://github.com/hyperium/tonic"
1515
version = "0.13.0"
16+
rust-version = { workspace = true }
1617

1718
[dependencies]
1819
prettyplease = { version = "0.2" }

tonic-health/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ name = "tonic-health"
1313
readme = "README.md"
1414
repository = "https://github.com/hyperium/tonic"
1515
version = "0.13.0"
16+
rust-version = { workspace = true }
1617

1718
[dependencies]
1819
prost = "0.13"

tonic-reflection/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ name = "tonic-reflection"
1616
readme = "README.md"
1717
repository = "https://github.com/hyperium/tonic"
1818
version = "0.13.0"
19+
rust-version = { workspace = true }
1920

2021
[package.metadata.docs.rs]
2122
all-features = true

tonic-types/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ name = "tonic-types"
1616
readme = "README.md"
1717
repository = "https://github.com/hyperium/tonic"
1818
version = "0.13.0"
19+
rust-version = { workspace = true }
1920

2021
[dependencies]
2122
prost = "0.13"

tonic-web/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ name = "tonic-web"
1313
readme = "README.md"
1414
repository = "https://github.com/hyperium/tonic"
1515
version = "0.13.0"
16+
rust-version = { workspace = true }
1617

1718
[dependencies]
1819
base64 = "0.22"

tonic/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ license = "MIT"
2121
readme = "../README.md"
2222
repository = "https://github.com/hyperium/tonic"
2323
version = "0.13.0"
24+
rust-version = {workspace = true}
2425

2526
[features]
2627
codegen = ["dep:async-trait"]

0 commit comments

Comments
 (0)