Skip to content

Commit 4c7a89c

Browse files
committed
fix: Update cargo deny configuration to prevent duplicate dependencies
1 parent 22f1433 commit 4c7a89c

File tree

2 files changed

+47
-23
lines changed

2 files changed

+47
-23
lines changed

.github/workflows/ci.yml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,29 @@ jobs:
2828
args: "--aosp --set-exit-if-changed"
2929

3030
cargo-deny:
31+
strategy:
32+
fail-fast: false
33+
matrix:
34+
include:
35+
- target: aarch64-apple-darwin
36+
- target: aarch64-linux-android
37+
- target: i686-pc-windows-gnu
38+
- target: i686-pc-windows-msvc
39+
- target: x86_64-pc-windows-gnu
40+
- target: x86_64-pc-windows-msvc
41+
- target: x86_64-unknown-linux-gnu
42+
43+
name: cargo-deny ${{ matrix.target }}
3144
runs-on: ubuntu-22.04
45+
needs: find-msrv
3246
steps:
3347
- uses: actions/checkout@v4
34-
- uses: EmbarkStudios/cargo-deny-action@v1
48+
- uses: EmbarkStudios/cargo-deny-action@v2
49+
with:
50+
rust-version: ${{ needs.find-msrv.outputs.version }}
51+
log-level: error
52+
command: check
53+
arguments: --target ${{ matrix.target }}
3554

3655
clippy:
3756
runs-on: ${{ matrix.os }}

deny.toml

Lines changed: 27 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,23 @@
1-
targets = []
1+
[graph]
2+
# Note: running just `cargo deny check` without a `--target` can result in
3+
# false positives due to https://github.com/EmbarkStudios/cargo-deny/issues/324
4+
targets = [
5+
{ triple = "aarch64-apple-darwin" },
6+
{ triple = "aarch64-linux-android" },
7+
{ triple = "i686-pc-windows-gnu" },
8+
{ triple = "i686-pc-windows-msvc" },
9+
{ triple = "x86_64-pc-windows-gnu" },
10+
{ triple = "x86_64-pc-windows-msvc" },
11+
{ triple = "x86_64-unknown-linux-gnu" },
12+
]
213
all-features = true
3-
no-default-features = false
4-
feature-depth = 1
514

615
[advisories]
716
db-path = "~/.cargo/advisory-db"
817
db-urls = ["https://github.com/rustsec/advisory-db"]
9-
vulnerability = "deny"
10-
unmaintained = "warn"
11-
yanked = "warn"
12-
notice = "warn"
1318
ignore = []
1419

1520
[licenses]
16-
unlicensed = "deny"
1721
allow = [
1822
"Apache-2.0",
1923
"Apache-2.0 WITH LLVM-exception",
@@ -23,10 +27,6 @@ allow = [
2327
"MIT",
2428
"Zlib",
2529
]
26-
deny = []
27-
copyleft = "warn"
28-
allow-osi-fsf-free = "neither"
29-
default = "deny"
3030
confidence-threshold = 0.8
3131
exceptions = [
3232
{ name = "unicode-ident", allow = [
@@ -35,19 +35,24 @@ exceptions = [
3535
]
3636

3737
[bans]
38-
multiple-versions = "warn"
39-
wildcards = "allow"
38+
multiple-versions = "deny"
39+
wildcards = "deny"
4040
highlight = "all"
41-
workspace-default-features = "allow"
42-
external-default-features = "allow"
4341
allow = []
4442
deny = []
45-
46-
skip = []
43+
skip = [
44+
"bitflags:<2",
45+
"quick-xml:<0.37",
46+
"raw-window-handle:<0.6",
47+
"windows-sys:<0.59",
48+
"windows-targets:<0.52",
49+
"windows_i686_gnu:<0.52",
50+
"windows_i686_msvc:<0.52",
51+
"windows_x86_64_gnu:<0.52",
52+
"windows_x86_64_msvc:<0.52",
53+
]
4754
skip-tree = []
4855

4956
[sources]
50-
unknown-registry = "warn"
51-
unknown-git = "warn"
52-
allow-registry = ["https://github.com/rust-lang/crates.io-index"]
53-
allow-git = []
57+
unknown-registry = "deny"
58+
unknown-git = "deny"

0 commit comments

Comments
 (0)