From 9121297e7b549d94fc5a5451ecf826e31507ef64 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Thu, 31 Aug 2023 16:33:07 -0400 Subject: [PATCH] ci: Move lints into main build And drop another hardcoded MSRV. --- .github/workflows/rust.yml | 25 ++++--------------------- 1 file changed, 4 insertions(+), 21 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index faa44bab..dd159dd9 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -14,8 +14,6 @@ env: CARGO_PROJECT_FEATURES: "v2022_6" # TODO: Automatically query this from the C side LATEST_LIBOSTREE: "v2022_6" - # Pinned toolchain for linting - ACTION_LINTS_TOOLCHAIN: 1.64.0 jobs: build: @@ -25,10 +23,14 @@ jobs: - uses: actions/checkout@v2 - name: Cache Dependencies uses: Swatinem/rust-cache@ce325b60658c1b38465c06cc965b79baf32c1e72 + - name: cargo fmt (check) + run: cargo fmt -p ostree -- --check -l - name: Build run: cargo build --verbose --features=${{ env['CARGO_PROJECT_FEATURES'] }} - name: Run tests run: cargo test --verbose --features=${{ env['CARGO_PROJECT_FEATURES'] }} + - name: cargo clippy (non-gating) + run: cargo clippy -p ostree --features=${{ env['CARGO_PROJECT_FEATURES'] }} build-minimum-toolchain: name: "Build, minimum supported toolchain (MSRV)" runs-on: ubuntu-latest @@ -83,25 +85,6 @@ jobs: run: cargo test --no-run --verbose --features=${{ env['LATEST_LIBOSTREE'] }} - name: Run tests run: cargo test --verbose --features=${{ env['LATEST_LIBOSTREE'] }} - linting: - name: "Lints, pinned toolchain" - runs-on: ubuntu-latest - container: quay.io/coreos-assembler/fcos-buildroot:testing-devel - steps: - - name: Checkout repository - uses: actions/checkout@v2 - - name: Remove system Rust toolchain - run: dnf remove -y rust cargo - - name: Install toolchain - uses: actions-rs/toolchain@v1 - with: - toolchain: ${{ env['ACTION_LINTS_TOOLCHAIN'] }} - default: true - components: rustfmt, clippy - - name: cargo fmt (check) - run: cargo fmt -p ostree -- --check -l - - name: cargo clippy (warnings) - run: cargo clippy -p ostree --features=${{ env['CARGO_PROJECT_FEATURES'] }} -- -D warnings cargo-deny: runs-on: ubuntu-latest steps: -- 2.30.2