Skip to content

Commit

Permalink
chore: Fix cargo-deny configuration (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
DataTriny authored Oct 13, 2024
1 parent 88e72d3 commit 5cc7729
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 27 deletions.
33 changes: 27 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,6 @@ jobs:
with:
clang-format-version: 15

cargo-deny:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: EmbarkStudios/cargo-deny-action@v1

clippy:
runs-on: ${{ matrix.os }}
strategy:
Expand Down Expand Up @@ -62,6 +56,33 @@ jobs:
- id: step2
run: echo "version=`cat Cargo.toml | sed -n 's/rust-version = "\(.*\)"/\1/p'`" >> "$GITHUB_OUTPUT"

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
with:
rust-version: ${{ needs.find-msrv.outputs.version }}
log-level: error
command: check
arguments: --target ${{ matrix.target }}

test:
runs-on: ${{ matrix.os }}
needs: find-msrv
Expand Down
39 changes: 18 additions & 21 deletions deny.toml
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -22,10 +28,6 @@ allow = [
"ISC",
"MIT",
]
deny = []
copyleft = "warn"
allow-osi-fsf-free = "neither"
default = "deny"
confidence-threshold = 0.8
exceptions = [
{ name = "unicode-ident", allow = [
Expand All @@ -34,19 +36,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"

0 comments on commit 5cc7729

Please sign in to comment.