From 21f1081e737677d80922566c709613ae1e968182 Mon Sep 17 00:00:00 2001 From: David Peter Date: Wed, 15 Mar 2023 09:56:02 +0100 Subject: [PATCH] Fix pipeline! --- .github/workflows/CICD.yml | 19 ++++--------------- Cargo.toml | 3 +-- 2 files changed, 5 insertions(+), 17 deletions(-) diff --git a/.github/workflows/CICD.yml b/.github/workflows/CICD.yml index 43f0258..02bf48a 100644 --- a/.github/workflows/CICD.yml +++ b/.github/workflows/CICD.yml @@ -13,33 +13,22 @@ on: - '*' jobs: - ensure_cargo_fmt: - name: Ensure 'cargo fmt' has been run - runs-on: ubuntu-20.04 - steps: - - uses: dtolnay/rust-toolchain@stable - with: - components: rustfmt - - uses: actions/checkout@v3 - - run: cargo fmt -- --check - - name: Ensure MSRV is set in `clippy.toml` - run: grep "^msrv = \"${{ env.MIN_SUPPORTED_RUST_VERSION }}\"\$" clippy.toml - min_version: name: Minimum supported rust version runs-on: ubuntu-20.04 steps: - name: Checkout source code uses: actions/checkout@v3 - - name: Get the MSRV from the package metadata id: msrv - run: cargo metadata --no-deps --format-version 1 | jq -r '"version=" + (.packages[] | select(.name = "bat").rust_version)' >> $GITHUB_OUTPUT + run: cargo metadata --no-deps --format-version 1 | jq -r '"version=" + (.packages[] | select(.name = "hyperfine").rust_version)' >> $GITHUB_OUTPUT - name: Install rust toolchain (v${{ steps.msrv.outputs.version }}) uses: dtolnay/rust-toolchain@master with: toolchain: ${{ steps.msrv.outputs.version }} - components: clippy + components: clippy, rustfmt + - name: Run cargo fmt + run: cargo fmt -- --check - name: Run clippy (on minimum supported rust version to prevent warnings we can't fix) run: cargo clippy --locked --all-targets ${{ env.MSRV_FEATURES }} - name: Run tests diff --git a/Cargo.toml b/Cargo.toml index dfe3264..4cd300e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,10 +8,9 @@ name = "hyperfine" readme = "README.md" repository = "https://github.com/sharkdp/hyperfine" version = "1.16.0" -rust-version = "1.60.0" edition = "2018" build = "build.rs" -rust-version = "1.62" +rust-version = "1.62.0" [features] # Use the nightly feature windows_process_extensions_main_thread_handle