From c13e52da04de7e1c63053e85afe383e955a6920f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vuka=C5=A1in=20Vojinovi=C4=87?= <150025636+git-f0x@users.noreply.github.com> Date: Thu, 12 Mar 2026 15:14:24 +0100 Subject: [PATCH] ci: add clippy --- .github/workflows/ci.yml | 35 ++++++++++++++++++++++++++++------- 1 file changed, 28 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a9b0ecb9..b1aaad2f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,13 +11,13 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout sources - uses: actions/checkout@v5 + uses: actions/checkout@v6 - name: Rust toolchain uses: dtolnay/rust-toolchain@stable with: components: rustfmt - name: Cargo cache - uses: actions/cache@v4 + uses: actions/cache@v5 with: path: | ~/.cargo/registry @@ -26,15 +26,36 @@ jobs: - name: Format run: cargo +stable fmt --all -- --check + clippy-check: + runs-on: ubuntu-latest + steps: + - name: Checkout sources + uses: actions/checkout@v6 + - name: Rust toolchain + uses: dtolnay/rust-toolchain@stable + with: + components: clippy + - name: Cargo cache + uses: actions/cache@v5 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }} + - name: System dependencies + run: sudo apt-get update; sudo apt-get install libudev-dev libgbm-dev libxkbcommon-dev libegl1-mesa-dev libwayland-dev libinput-dev libdbus-1-dev libsystemd-dev libseat-dev libdisplay-info-dev + - name: Clippy + run: cargo +stable clippy -- -D warnings + check-features: runs-on: ubuntu-latest steps: - name: Checkout sources - uses: actions/checkout@v5 + uses: actions/checkout@v6 - name: Rust toolchain uses: dtolnay/rust-toolchain@stable - name: Cargo cache - uses: actions/cache@v4 + uses: actions/cache@v5 with: path: | ~/.cargo/registry @@ -50,11 +71,11 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout sources - uses: actions/checkout@v5 + uses: actions/checkout@v6 - name: Rust toolchain uses: dtolnay/rust-toolchain@stable - name: Cargo cache - uses: actions/cache@v4 + uses: actions/cache@v5 with: path: | ~/.cargo/registry @@ -63,7 +84,7 @@ jobs: - name: System dependencies run: sudo apt-get update; sudo apt-get install libudev-dev libgbm-dev libxkbcommon-dev libegl1-mesa-dev libwayland-dev libinput-dev libdbus-1-dev libsystemd-dev libdisplay-info-dev libpixman-1-dev meson ninja-build - name: Build cache - uses: actions/cache@v4 + uses: actions/cache@v5 with: path: target key: ${{ runner.os }}-build-${{ hashFiles('**/Cargo.toml') }}