diff options
| -rw-r--r-- | .github/workflows/clippy.yml | 35 | ||||
| -rwxr-xr-x | ci/check-clippy.sh | 9 |
2 files changed, 44 insertions, 0 deletions
diff --git a/.github/workflows/clippy.yml b/.github/workflows/clippy.yml new file mode 100644 index 0000000000..ac37e831dc --- /dev/null +++ b/.github/workflows/clippy.yml @@ -0,0 +1,35 @@ +name: Rust - Run Clippy to check lints +on: + # Check whenever a file that affects Clippy is changed in a pull request + pull_request: + paths: + - .github/workflows/clippy.yml + - ci/check-clippy.sh + - clippy.toml + - '**/*.rs' + # Check if requested manually from the Actions tab + workflow_dispatch: +jobs: + clippy_check: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - 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 + run: | + sudo apt-get update + sudo apt-get install libdbus-1-dev + + - name: Clippy check + run: | + ./ci/check-clippy.sh diff --git a/ci/check-clippy.sh b/ci/check-clippy.sh new file mode 100755 index 0000000000..e48adfc6b6 --- /dev/null +++ b/ci/check-clippy.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +set -eux + +export RUSTFLAGS="--deny warnings" + +# Check rust crates with clippy +source env.sh +time cargo clippy --locked --verbose |
