-
Notifications
You must be signed in to change notification settings - Fork 1
36 lines (32 loc) · 1.2 KB
/
clippy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: "clippy"
on:
push:
branches: [ "main", "dev" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
jobs:
clippy:
strategy:
# https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs#handling-failures
fail-fast: false
# https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs#using-a-matrix-strategy
matrix:
command_variant:
- cache_sub_key: "variant-default"
lint_flags: "-D warnings"
params: ""
- cache_sub_key: "variant-release"
lint_flags: "-D warnings -A dead_code -A unused-imports -A unused_mut -A unused-variables"
params: "--release"
- cache_sub_key: "test"
lint_flags: "-D warnings"
params: "--profile test"
runs-on: ubuntu-latest
steps:
# https://github.com/marketplace/actions/checkout
- uses: actions/checkout@v3
- uses: ./.github/shared-steps
# --features bevy_x11: we need Bevy's support for X11 in GitHub Actions on Ubuntu
- run: cargo clippy --workspace --features bevy_x11 ${{ matrix.command_variant.params }} -- ${{ matrix.command_variant.lint_flags }} --verbose