From f8c8427c9c8ad24cd893cd728ed6ba79024fd66d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois?= Date: Fri, 16 Jul 2021 01:38:41 +0000 Subject: [PATCH] add check for unused dependencies (#2461) # Objective - Unused dependencies are bad ## Solution - Add check for unused dependencies with https://github.com/est31/cargo-udeps - #2455 --- .github/bors.toml | 1 + .github/workflows/ci.yml | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/.github/bors.toml b/.github/bors.toml index 20c21ea8281588..078b78bd2c0b2e 100644 --- a/.github/bors.toml +++ b/.github/bors.toml @@ -11,6 +11,7 @@ status = [ "run-examples", "check-doc", "check-missing-examples-in-docs", + "check-unused-dependencies", ] use_squash_merge = true diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4fe6ee5d013f48..af23b4c778af95 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -168,3 +168,22 @@ jobs: file-types: '[".rs"]' exclude-folders: '["./examples/ios"]' exclude-files: '[]' + + check-unused-dependencies: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - uses: actions-rs/toolchain@v1 + with: + toolchain: nightly + override: true + + - name: Installs cargo-udeps + run: cargo install cargo-udeps + + - name: Install alsa and udev + run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev + + - name: Run cargo udeps + run: cargo udeps