From 6ca97fc5bb6983e03653f38471e8dca2af7ee595 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 | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fe81bafcb39..fb56c567f0b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,18 +14,22 @@ on: - '.github/workflows/ci.yml' jobs: - Check_Formatting: + check-formatting: + name: Check formatting runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 - - uses: hecrj/setup-rust-action@v1 + - uses: actions-rs/toolchain@v1 with: - rust-version: stable - components: rustfmt + toolchain: stable + override: true + profile: minimal + components: rustfmt - name: Check Formatting run: cargo +stable fmt --all -- --check - Tests: + tests: + name: Tests strategy: fail-fast: false matrix: @@ -66,10 +70,13 @@ jobs: path: ~/.cargo key: ${{ matrix.platform.target }}-cargo-${{ matrix.rust_version }} - - uses: hecrj/setup-rust-action@v1 + - uses: actions-rs/toolchain@v1 with: - rust-version: ${{ matrix.rust_version }}${{ matrix.platform.host }} - targets: ${{ matrix.platform.target }} + toolchain: ${{ matrix.rust_version }} + override: true + profile: minimal + components: clippy + target: ${{ matrix.platform.target }} - name: Install GCC Multilib if: (matrix.platform.os == 'ubuntu-latest') && contains(matrix.platform.target, 'i686') @@ -84,6 +91,10 @@ 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 + 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 +115,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