-
Notifications
You must be signed in to change notification settings - Fork 11
67 lines (56 loc) · 1.81 KB
/
clippy.yml
File metadata and controls
67 lines (56 loc) · 1.81 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: Clippy
on:
push:
branches:
- main
- "v*-dev"
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
jobs:
clippy:
name: Clippy
if: github.event.pull_request.draft != true
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Cache Cargo registry
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-registry-
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: 1.92
components: clippy, rustfmt
override: true
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential pkg-config clang cmake libsqlite3-dev
- name: Install protoc
run: |
curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v25.2/protoc-25.2-linux-x86_64.zip
sudo unzip -o protoc-25.2-linux-x86_64.zip -d /usr/local bin/protoc
sudo unzip -o protoc-25.2-linux-x86_64.zip -d /usr/local 'include/*'
rm -f protoc-25.2-linux-x86_64.zip
env:
PROTOC: /usr/local/bin/protoc
- name: Check formatting
run: cargo fmt --all -- --check
- name: Run Clippy
uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features --all-targets -- -D warnings
name: Clippy Report