Skip to content

Commit 8c29ca7

Browse files
authored
chore: leverage fallback resolver for MSRV check (#2993)
1 parent 4b3a383 commit 8c29ca7

File tree

15 files changed

+41
-91
lines changed

15 files changed

+41
-91
lines changed

.cargo/config.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[resolver]
2+
# https://doc.rust-lang.org/cargo/reference/config.html#resolverincompatible-rust-versions
3+
incompatible-rust-versions = "fallback"

.github/workflows/ci.yml

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ jobs:
8585
external-types:
8686
strategy:
8787
matrix:
88-
example: [opentelemetry, opentelemetry-sdk, opentelemetry-otlp, opentelemetry-zipkin]
88+
member: [opentelemetry, opentelemetry-sdk, opentelemetry-otlp, opentelemetry-zipkin]
8989
runs-on: ubuntu-latest # TODO: Check if this could be covered for Windows. The step used currently fails on Windows.
9090
steps:
9191
- name: Harden the runner (Audit all outbound calls)
@@ -96,20 +96,20 @@ jobs:
9696
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
9797
- uses: dtolnay/rust-toolchain@b3b07ba8b418998c39fb20f53e8b695cdcc8de1b
9898
with:
99-
toolchain: nightly-2024-06-30
99+
# Rust version should be kept in sync with the one the release was tested with
100+
# https://github.com/awslabs/cargo-check-external-types/releases
101+
toolchain: nightly-2025-05-04
100102
components: rustfmt
101-
- name: Patch dependencies versions
102-
run: bash ./scripts/patch_dependencies.sh
103+
- uses: taiki-e/install-action@33734a118689b0b418824fb78ea2bf18e970b43b # v2.50.4
104+
with:
105+
103106
- name: external-type-check
104-
run: |
105-
cargo install [email protected]
106-
cd ${{ matrix.example }}
107-
cargo check-external-types --all-features --config allowed-external-types.toml
107+
working-directory: ${{ matrix.member }}
108+
run: cargo check-external-types --all-features --config allowed-external-types.toml
108109
msrv:
109110
strategy:
110111
matrix:
111112
os: [windows-latest, ubuntu-latest]
112-
rust: [1.75.0]
113113
runs-on: ${{ matrix.os }}
114114
continue-on-error: true
115115
steps:
@@ -121,14 +121,17 @@ jobs:
121121
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
122122
with:
123123
submodules: true
124-
- name: Set up Rust ${{ matrix.rust }}
125-
uses: dtolnay/rust-toolchain@b3b07ba8b418998c39fb20f53e8b695cdcc8de1b
124+
- uses: dtolnay/rust-toolchain@b3b07ba8b418998c39fb20f53e8b695cdcc8de1b
125+
with:
126+
toolchain: stable
127+
- uses: taiki-e/install-action@33734a118689b0b418824fb78ea2bf18e970b43b # v2.50.4
126128
with:
127-
toolchain: ${{ matrix.rust }}
128-
- name: Patch dependencies versions
129-
run: bash ./scripts/patch_dependencies.sh
129+
tool: cargo-msrv
130+
- uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3.0.0
131+
with:
132+
repo-token: ${{ secrets.GITHUB_TOKEN }}
130133
- name: Check MSRV for all crates
131-
run: bash ./scripts/msrv.sh ${{ matrix.rust }}
134+
run: bash ./scripts/msrv.sh
132135
cargo-deny:
133136
runs-on: ubuntu-latest # This uses the step `EmbarkStudios/cargo-deny-action@v1` which is only supported on Linux
134137
continue-on-error: true # Prevent sudden announcement of a new advisory from failing ci

examples/logs-basic/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name = "logs-basic"
33
version = "0.1.0"
44
edition = "2021"
55
license = "Apache-2.0"
6+
rust-version = "1.75.0"
67
publish = false
78
autobenches = false
89

examples/metrics-advanced/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name = "metrics-advanced"
33
version = "0.1.0"
44
edition = "2021"
55
license = "Apache-2.0"
6+
rust-version = "1.75.0"
67
publish = false
78
autobenches = false
89

examples/metrics-basic/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name = "metrics-basic"
33
version = "0.1.0"
44
edition = "2021"
55
license = "Apache-2.0"
6+
rust-version = "1.75.0"
67
publish = false
78
autobenches = false
89

examples/tracing-grpc/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name = "tracing-grpc"
33
version = "0.1.0"
44
edition = "2021"
55
license = "Apache-2.0"
6+
rust-version = "1.75.0"
67
publish = false
78
autobenches = false
89

examples/tracing-http-propagator/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name = "tracing-http-propagator"
33
version = "0.1.0"
44
edition = "2021"
55
license = "Apache-2.0"
6+
rust-version = "1.75.0"
67
publish = false
78
autobenches = false
89

opentelemetry-otlp/examples/basic-otlp-http/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name = "basic-otlp-http"
33
version = "0.1.0"
44
edition = "2021"
55
license = "Apache-2.0"
6+
rust-version = "1.75.0"
67
publish = false
78
autobenches = false
89

opentelemetry-otlp/examples/basic-otlp/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name = "basic-otlp"
33
version = "0.1.0"
44
edition = "2021"
55
license = "Apache-2.0"
6+
rust-version = "1.75.0"
67
publish = false
78
autobenches = false
89

opentelemetry-otlp/tests/integration_test/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
name = "integration_test_runner"
33
version = "0.1.0"
44
edition = "2021"
5+
license = "Apache-2.0"
6+
rust-version = "1.75.0"
57
publish = false
68
autobenches = false
79

0 commit comments

Comments
 (0)