From ec9fd62d2ef6ebdcc736d26258758c11c8650b5f Mon Sep 17 00:00:00 2001 From: Cijo Thomas Date: Fri, 24 May 2024 12:52:35 -0700 Subject: [PATCH] Run msrv check for all crates (#1826) --- .github/workflows/ci.yml | 6 ++---- scripts/msrv.sh | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 4 deletions(-) create mode 100755 scripts/msrv.sh diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 295c69bc6b..18a18f849d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -110,10 +110,8 @@ jobs: - uses: dtolnay/rust-toolchain@1.65.0 - name: Patch dependencies versions # some dependencies bump MSRV without major version bump run: bash ./scripts/patch_dependencies.sh - - name: Run tests - run: cargo --version && - cargo test --manifest-path=opentelemetry/Cargo.toml --features trace,metrics,testing && - cargo test --manifest-path=opentelemetry-zipkin/Cargo.toml + - name: Check MSRV for all crates + run: bash ./scripts/msrv.sh cargo-deny: runs-on: ubuntu-latest # This uses the step `EmbarkStudios/cargo-deny-action@v1` which is only supported on Linux continue-on-error: true # Prevent sudden announcement of a new advisory from failing ci diff --git a/scripts/msrv.sh b/scripts/msrv.sh new file mode 100755 index 0000000000..eb9386cfa3 --- /dev/null +++ b/scripts/msrv.sh @@ -0,0 +1,33 @@ +#!/bin/bash + +set -eu + +echo "Running msrv check for opentelemetry package" +cargo check --manifest-path=opentelemetry/Cargo.toml --all-features + +echo "Running msrv check for opentelemetry-sdk package" +cargo check --manifest-path=opentelemetry-sdk/Cargo.toml --all-features + +echo "Running msrv check for opentelemetry-stdout package" +cargo check --manifest-path=opentelemetry-stdout/Cargo.toml --all-features + +# TODO: Ignoring as this is failing with the following error: +# error: package `prost-derive v0.12.6` cannot be built because it requires rustc 1.70 or newer, while the currently active rustc version is 1.65.0 +#echo "Running msrv check for opentelemetry-otlp package" +# cargo check --manifest-path=opentelemetry-otlp/Cargo.toml --all-features + +echo "Running msrv check for opentelemetry-http package" +cargo check --manifest-path=opentelemetry-http/Cargo.toml --all-features + +echo "Running msrv check for opentelemetry-jaeger-propagator package" +cargo check --manifest-path=opentelemetry-jaeger-propagator/Cargo.toml --all-features + +echo "Running msrv check for opentelemetry-zipkin package" +cargo check --manifest-path=opentelemetry-zipkin/Cargo.toml --all-features + +echo "Running msrv check for opentelemetry-appender-log package" +cargo check --manifest-path=opentelemetry-appender-log/Cargo.toml --all-features + +echo "Running msrv check for opentelemetry-appender-tracing package" +cargo check --manifest-path=opentelemetry-appender-tracing/Cargo.toml --all-features +