From 3a002b8f1f4dd2b9e5a2d8beaf77ef9a19a4106f Mon Sep 17 00:00:00 2001 From: Arnold Loubriat Date: Wed, 1 Oct 2025 00:33:14 +0200 Subject: [PATCH] chore: Fix cargo-deny configuration --- .github/workflows/ci.yml | 26 +++++++++++++++++++++++--- deny.toml | 39 ++++++++++++++++++--------------------- 2 files changed, 41 insertions(+), 24 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 781edd2..452895a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,11 +31,31 @@ jobs: uses: chartboost/ruff-action@v1 cargo-deny: + strategy: + fail-fast: false + matrix: + include: + - target: aarch64-apple-darwin + - target: i686-pc-windows-gnu + - target: i686-pc-windows-msvc + - target: i686-unknown-linux-gnu + - target: x86_64-apple-darwin + - target: x86_64-pc-windows-gnu + - target: x86_64-pc-windows-msvc + - target: x86_64-unknown-linux-gnu + - target: x86_64-unknown-linux-musl + + name: cargo-deny ${{ matrix.target }} runs-on: ubuntu-22.04 + needs: find-msrv steps: - - uses: actions/checkout@v4 - - uses: EmbarkStudios/cargo-deny-action@v1 - + - uses: actions/checkout@v5 + - uses: EmbarkStudios/cargo-deny-action@v2 + with: + rust-version: ${{ needs.find-msrv.outputs.version }} + log-level: error + command: check + arguments: --target ${{ matrix.target }} clippy: runs-on: ${{ matrix.os }} strategy: diff --git a/deny.toml b/deny.toml index 005ca0b..895f777 100644 --- a/deny.toml +++ b/deny.toml @@ -1,19 +1,25 @@ -targets = [] +[graph] +# Note: running just `cargo deny check` without a `--target` can result in +# false positives due to https://github.com/EmbarkStudios/cargo-deny/issues/324 +targets = [ + { triple = "aarch64-apple-darwin" }, + { triple = "i686-pc-windows-gnu" }, + { triple = "i686-pc-windows-msvc" }, + { triple = "i686-unknown-linux-gnu" }, + { triple = "x86_64-apple-darwin" }, + { triple = "x86_64-pc-windows-gnu" }, + { triple = "x86_64-pc-windows-msvc" }, + { triple = "x86_64-unknown-linux-gnu" }, + { triple = "x86_64-unknown-linux-musl" }, +] all-features = true -no-default-features = false -feature-depth = 1 [advisories] db-path = "~/.cargo/advisory-db" db-urls = ["https://github.com/rustsec/advisory-db"] -vulnerability = "deny" -unmaintained = "warn" -yanked = "warn" -notice = "warn" ignore = [] [licenses] -unlicensed = "deny" allow = [ "Apache-2.0", "Apache-2.0 WITH LLVM-exception", @@ -23,10 +29,6 @@ allow = [ "MIT", "Zlib", ] -deny = [] -copyleft = "warn" -allow-osi-fsf-free = "neither" -default = "deny" confidence-threshold = 0.8 exceptions = [ { name = "unicode-ident", allow = [ @@ -35,19 +37,14 @@ exceptions = [ ] [bans] -multiple-versions = "warn" -wildcards = "allow" +multiple-versions = "deny" +wildcards = "deny" highlight = "all" -workspace-default-features = "allow" -external-default-features = "allow" allow = [] deny = [] - skip = [] skip-tree = [] [sources] -unknown-registry = "warn" -unknown-git = "warn" -allow-registry = ["https://github.com/rust-lang/crates.io-index"] -allow-git = [] +unknown-registry = "deny" +unknown-git = "deny"