From 9a62def800c39a04f8b57c815707bbaae6d59457 Mon Sep 17 00:00:00 2001 From: Marijn Suijten Date: Sat, 28 May 2022 18:16:35 +0200 Subject: [PATCH] ci: Run clippy --- .github/workflows/ci.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fe81bafcb39..0237e0a0f9e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,8 @@ on: - '.github/workflows/ci.yml' jobs: - Check_Formatting: + check-formatting: + name: Check formatting runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 @@ -25,7 +26,8 @@ jobs: - name: Check Formatting run: cargo +stable fmt --all -- --check - Tests: + tests: + name: Tests strategy: fail-fast: false matrix: @@ -70,6 +72,7 @@ jobs: with: rust-version: ${{ matrix.rust_version }}${{ matrix.platform.host }} targets: ${{ matrix.platform.target }} + components: clippy - name: Install GCC Multilib if: (matrix.platform.os == 'ubuntu-latest') && contains(matrix.platform.target, 'i686') @@ -84,6 +87,11 @@ jobs: if: matrix.platform.target != 'wasm32-unknown-unknown' run: cd glutin && cargo doc --no-deps --target ${{ matrix.platform.target }} $OPTIONS --features $FEATURES --document-private-items + - name: Lint with clippy + shell: bash + if: matrix.rust_version != 'nightly' + run: cargo clippy --workspace --all-targets --target ${{ matrix.platform.target }} $OPTIONS --features $FEATURES -- -Dwarnings + - name: Build glutin shell: bash run: cd glutin && cargo $WEB build --verbose --target ${{ matrix.platform.target }} $OPTIONS --features $FEATURES @@ -104,7 +112,6 @@ jobs: if: (!contains(matrix.platform.target, 'ios') && !contains(matrix.platform.target, 'wasm32')) run: cd glutin && cargo $WEB test --verbose --target ${{ matrix.platform.target }} $OPTIONS --features $FEATURES - - name: Build with serde enabled shell: bash run: cd glutin && cargo $WEB build --verbose --target ${{ matrix.platform.target }} $OPTIONS --features serde,$FEATURES