diff --git a/.github/workflows/cargo-unused.yml b/.github/workflows/cargo-unused.yml new file mode 100644 index 000000000..ebb2e763a --- /dev/null +++ b/.github/workflows/cargo-unused.yml @@ -0,0 +1,50 @@ +# Run `cargo-unused-features` for finding out unused features +# NOTE: this is broken for now, see https://github.com/TimonPost/cargo-unused-features/pull/10 + +name: Cargo Unused Features + +on: + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + bloat: + name: Cargo Unused Features + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Install Rust Toolchain + uses: ./.github/actions/rustup + + - name: Install cargo-unused-features + uses: taiki-e/install-action@v2 + with: + tool: cargo-unused-features + + - name: Run + run: unused-features analyze + + check-dependencies: + name: Check Unused Dependencies + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - uses: dorny/paths-filter@v2 + id: filter + with: + filters: | + src: + - 'Cargo.lock' + + - name: Install cargo-udeps + if: steps.filter.outputs.src == 'true' + uses: taiki-e/install-action@cargo-udeps + + - if: steps.filter.outputs.src == 'true' + run: cargo udeps diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2947ad14c..ee6dd474c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -55,26 +55,6 @@ jobs: with: files: . - check-dependencies: - name: Check Unused Dependencies - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - - uses: dorny/paths-filter@v2 - id: filter - with: - filters: | - src: - - 'Cargo.lock' - - - name: Install cargo-udeps - if: steps.filter.outputs.src == 'true' - uses: taiki-e/install-action@cargo-udeps - - - if: steps.filter.outputs.src == 'true' - run: cargo udeps - deny: name: Cargo Deny runs-on: ubuntu-latest