summaryrefslogtreecommitdiffhomepage
path: root/.github/workflows/clippy.yml
blob: 8d55bd2c05df4cf33d63e2a93c0fdcef17299b99 (plain)
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
---
name: Rust - Run Clippy to check lints
on:
  pull_request:
    paths:
      - .github/workflows/clippy.yml
      - clippy.toml
      - '**/*.rs'
  workflow_dispatch:
jobs:
  clippy_check:
    strategy:
      matrix:
        os: [ubuntu-latest, windows-latest, macos-latest]
    runs-on: ${{ matrix.os }}
    steps:
      - name: Checkout repository
        uses: actions/checkout@v3

      - name: Install Protoc
        uses: arduino/setup-protoc@v1
        with:
          repo-token: ${{ secrets.GITHUB_TOKEN }}

      - name: Checkout binaries submodule
        run: git submodule update --init --depth=1 dist-assets/binaries

      - uses: actions-rs/toolchain@v1.0.6
        with:
          toolchain: stable
          components: clippy
          override: true

      - name: Install build dependencies
        if: matrix.os == 'ubuntu-latest'
        run: |
          sudo apt-get update
          sudo apt-get install libdbus-1-dev

      - name: Clippy check
        shell: bash
        run: |-
          export RUSTFLAGS="--deny warnings"
          source env.sh
          time cargo clippy --locked -- -W clippy::unused_async