From 807c83785a60d2983eca682d6c3770266a9297ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Mockers?= Date: Fri, 15 Nov 2024 21:07:25 +0100 Subject: [PATCH] update ci --- .github/workflows/ci.yml | 61 +++++++++------------------------------- 1 file changed, 14 insertions(+), 47 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ccf5e70..da8f4ed 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,9 +22,9 @@ jobs: name: Test Suite steps: - name: Checkout sources - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Cache - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: | ~/.cargo/bin/ @@ -33,28 +33,21 @@ jobs: ~/.cargo/git/db/ target/ key: ${{ runner.os }}-cargo-test-${{ hashFiles('**/Cargo.toml') }} - - name: Install stable toolchain - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true + - uses: dtolnay/rust-toolchain@stable - name: Install Dependencies if: runner.os == 'linux' run: sudo apt-get update; sudo apt-get install pkg-config libx11-dev libasound2-dev libudev-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libusb-1.0-0-dev libhidapi-dev - name: Run cargo test - uses: actions-rs/cargo@v1 - with: - command: test + run: cargo test clippy_check: name: Clippy runs-on: ubuntu-latest steps: - name: Checkout sources - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Cache - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: | ~/.cargo/bin/ @@ -63,59 +56,33 @@ jobs: ~/.cargo/git/db/ target/ key: ${{ runner.os }}-cargo-clippy-${{ hashFiles('**/Cargo.toml') }} - - name: Install stable toolchain - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - profile: minimal - components: clippy - override: true + - uses: dtolnay/rust-toolchain@stable - name: Install Dependencies run: sudo apt-get update; sudo apt-get install pkg-config libx11-dev libasound2-dev libudev-dev libusb-1.0-0-dev libhidapi-dev - name: Run clippy - uses: actions-rs/clippy-check@v1 - with: - token: ${{ secrets.GITHUB_TOKEN }} - args: -- -D warnings + run: cargo clippy -- -D warnings format: name: Format runs-on: ubuntu-latest steps: - name: Checkout sources - uses: actions/checkout@v2 - - name: Install stable toolchain - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - profile: minimal - components: rustfmt - override: true + uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable - name: Run cargo fmt - uses: actions-rs/cargo@v1 - with: - command: fmt - args: --all -- --check + run: cargo fmt --all -- --check doc: name: Doc runs-on: ubuntu-latest steps: - name: Checkout sources - uses: actions/checkout@v2 - - name: Install stable toolchain - uses: actions-rs/toolchain@v1 - with: - toolchain: nightly - profile: minimal - override: true + uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable - name: Install Dependencies if: runner.os == 'linux' run: sudo apt-get update; sudo apt-get install pkg-config libx11-dev libasound2-dev libudev-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libusb-1.0-0-dev libhidapi-dev - name: Run cargo doc - uses: actions-rs/cargo@v1 - with: - command: doc - args: --no-deps + run: cargo doc --no-deps env: RUSTDOCFLAGS: -D warnings