name: Clippy on: workflow_dispatch: pull_request: push: branches: - main tags-ignore: - "*" env: CARGO_TERM_COLOR: always CARGO_UNSTABLE_SPARSE_REGISTRY: "true" concurrency: group: ${{ github.workflow }}-${{ github.ref || github.run_id }} cancel-in-progress: true jobs: clippy: strategy: fail-fast: false matrix: platform: - ubuntu - windows - macos name: Clippy on ${{ matrix.platform }} runs-on: "${{ matrix.platform }}-latest" steps: - uses: actions/checkout@v4 - name: Configure toolchain run: | rustup toolchain install stable --profile minimal --no-self-update --component clippy rustup default stable # https://github.com/actions/cache/issues/752 - if: ${{ runner.os == 'Windows' }} name: Use GNU tar shell: cmd run: | echo "Adding GNU tar to PATH" echo C:\Program Files\Git\usr\bin>>"%GITHUB_PATH%" - name: Configure caching uses: actions/cache@v4 with: path: | ~/.cargo/registry/index/ ~/.cargo/registry/cache/ ~/.cargo/git/db/ target/ key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} restore-keys: | ${{ runner.os }}-cargo- - name: Clippy run: cargo clippy -- $(cat .clippy-lints | tr -d '\r' | xargs) shell: bash