-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (33 loc) · 999 Bytes
/
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
37
38
39
40
41
name: Clippy
on:
push:
env:
RUST_BACKTRACE: 1
jobs:
clippy:
name: Clippy rust
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
rust: [nightly]
steps:
- uses: actions/checkout/@v4
- name: Install Toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly
components: clippy
- name: Rust Cache
uses: Swatinem/rust-cache@v2
- name: Install Dbus
if: startsWith(matrix.os, 'ubuntu-')
run: |
sudo apt update
sudo apt install -y libdbus-1-dev pkg-config
- name: Run Clippy Allow Warning
if: ${{ ! (github.ref == 'refs/heads/main' || github.event_name == 'pull_request') }}
run: cargo clippy --locked
- name: Run Clippy Deny Warning
if: github.ref == 'refs/heads/main' || github.event_name == 'pull_request'
run: cargo clippy --locked -- -D warnings