on:
push:
branches: [main]
pull_request:
merge_group:
name: Clippy
jobs:
ci:
name: CI
runs-on: ubuntu-latest
needs: [clippy-check]
if: always()
steps:
- name: Done
run: jq --exit-status 'all(.result == "success")' <<< '${{ toJson(needs) }}'
clippy-check:
strategy:
matrix:
include:
- { target: x86_64-unknown-linux-gnu, os: ubuntu-latest }
- { target: x86_64-apple-darwin, os: macos-latest }
- { target: aarch64-apple-darwin, os: macos-latest }
- { target: x86_64-pc-windows-msvc, os: windows-latest }
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install Rust toolchain
run: rustup target add ${{ matrix.target }}
- name: Cache Dependencies
uses: Swatinem/rust-cache@v2
with:
key: v2.1-${{ matrix.target }}
- uses: actions-rs/cargo@v1
with:
command: clippy
args: --target ${{ matrix.target }}