2022-09-07 02:36:55 +02:00
|
|
|
name: Clippy
|
2022-05-30 04:34:22 +02:00
|
|
|
|
2021-04-10 13:53:12 +02:00
|
|
|
on:
|
2022-09-07 02:36:55 +02:00
|
|
|
workflow_dispatch:
|
2021-04-10 13:53:12 +02:00
|
|
|
pull_request:
|
2022-09-07 02:36:55 +02:00
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
tags-ignore:
|
|
|
|
- "*"
|
2021-04-10 13:53:12 +02:00
|
|
|
|
2022-09-07 04:15:38 +02:00
|
|
|
env:
|
|
|
|
CARGO_TERM_COLOR: always
|
|
|
|
CARGO_UNSTABLE_SPARSE_REGISTRY: "true"
|
|
|
|
|
2023-01-06 14:53:49 +01:00
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
2021-04-10 13:53:12 +02:00
|
|
|
jobs:
|
2023-01-06 14:53:49 +01:00
|
|
|
clippy:
|
2021-04-10 13:53:12 +02:00
|
|
|
strategy:
|
2023-01-06 14:53:49 +01:00
|
|
|
fail-fast: false
|
2021-04-10 13:53:12 +02:00
|
|
|
matrix:
|
|
|
|
platform:
|
|
|
|
- ubuntu
|
|
|
|
- windows
|
|
|
|
- macos
|
|
|
|
|
2022-09-07 02:36:55 +02:00
|
|
|
name: Clippy on ${{ matrix.platform }}
|
2021-04-10 13:53:12 +02:00
|
|
|
runs-on: "${{ matrix.platform }}-latest"
|
|
|
|
|
|
|
|
steps:
|
2023-09-05 06:05:40 +02:00
|
|
|
- uses: actions/checkout@v4
|
2022-09-07 04:15:38 +02:00
|
|
|
- name: Configure toolchain
|
|
|
|
run: |
|
2023-01-06 14:53:49 +01:00
|
|
|
rustup toolchain install stable --profile minimal --no-self-update --component clippy
|
|
|
|
rustup default stable
|
2022-09-07 05:41:34 +02:00
|
|
|
|
|
|
|
# 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%"
|
|
|
|
|
2022-09-07 04:15:38 +02:00
|
|
|
- name: Configure caching
|
|
|
|
uses: actions/cache@v3
|
|
|
|
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
|
2023-01-06 14:53:49 +01:00
|
|
|
run: cargo clippy -- $(cat .clippy-lints | tr -d '\r' | xargs)
|
|
|
|
shell: bash
|