Skip to content

Commit 3a002b8

Browse files
committed
chore: Fix cargo-deny configuration
1 parent c107b8d commit 3a002b8

File tree

2 files changed

+41
-24
lines changed

2 files changed

+41
-24
lines changed

.github/workflows/ci.yml

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,31 @@ jobs:
3131
uses: chartboost/ruff-action@v1
3232

3333
cargo-deny:
34+
strategy:
35+
fail-fast: false
36+
matrix:
37+
include:
38+
- target: aarch64-apple-darwin
39+
- target: i686-pc-windows-gnu
40+
- target: i686-pc-windows-msvc
41+
- target: i686-unknown-linux-gnu
42+
- target: x86_64-apple-darwin
43+
- target: x86_64-pc-windows-gnu
44+
- target: x86_64-pc-windows-msvc
45+
- target: x86_64-unknown-linux-gnu
46+
- target: x86_64-unknown-linux-musl
47+
48+
name: cargo-deny ${{ matrix.target }}
3449
runs-on: ubuntu-22.04
50+
needs: find-msrv
3551
steps:
36-
- uses: actions/checkout@v4
37-
- uses: EmbarkStudios/cargo-deny-action@v1
38-
52+
- uses: actions/checkout@v5
53+
- uses: EmbarkStudios/cargo-deny-action@v2
54+
with:
55+
rust-version: ${{ needs.find-msrv.outputs.version }}
56+
log-level: error
57+
command: check
58+
arguments: --target ${{ matrix.target }}
3959
clippy:
4060
runs-on: ${{ matrix.os }}
4161
strategy:

deny.toml

Lines changed: 18 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,25 @@
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 = "i686-pc-windows-gnu" },
7+
{ triple = "i686-pc-windows-msvc" },
8+
{ triple = "i686-unknown-linux-gnu" },
9+
{ triple = "x86_64-apple-darwin" },
10+
{ triple = "x86_64-pc-windows-gnu" },
11+
{ triple = "x86_64-pc-windows-msvc" },
12+
{ triple = "x86_64-unknown-linux-gnu" },
13+
{ triple = "x86_64-unknown-linux-musl" },
14+
]
215
all-features = true
3-
no-default-features = false
4-
feature-depth = 1
516

617
[advisories]
718
db-path = "~/.cargo/advisory-db"
819
db-urls = ["https://github.com/rustsec/advisory-db"]
9-
vulnerability = "deny"
10-
unmaintained = "warn"
11-
yanked = "warn"
12-
notice = "warn"
1320
ignore = []
1421

1522
[licenses]
16-
unlicensed = "deny"
1723
allow = [
1824
"Apache-2.0",
1925
"Apache-2.0 WITH LLVM-exception",
@@ -23,10 +29,6 @@ allow = [
2329
"MIT",
2430
"Zlib",
2531
]
26-
deny = []
27-
copyleft = "warn"
28-
allow-osi-fsf-free = "neither"
29-
default = "deny"
3032
confidence-threshold = 0.8
3133
exceptions = [
3234
{ name = "unicode-ident", allow = [
@@ -35,19 +37,14 @@ exceptions = [
3537
]
3638

3739
[bans]
38-
multiple-versions = "warn"
39-
wildcards = "allow"
40+
multiple-versions = "deny"
41+
wildcards = "deny"
4042
highlight = "all"
41-
workspace-default-features = "allow"
42-
external-default-features = "allow"
4343
allow = []
4444
deny = []
45-
4645
skip = []
4746
skip-tree = []
4847

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

0 commit comments

Comments
 (0)