Skip to content

Commit

Permalink
chore(CI): Make cargo deny actually use the external crates manifest (#…
Browse files Browse the repository at this point in the history
…3593)

* chore(CI): Make cargo deny actually use the external crates manifest

* naming

* move external deny to nightly

* default

* add openssl license

* dprint

* add exception and update futures-util

* dprint

* Update .github/workflows/nightly.yml

---------

Co-authored-by: Thibault Martinez <[email protected]>
  • Loading branch information
DaughterOfMars and thibault-martinez authored Nov 1, 2024
1 parent 7e9e00d commit 1c55189
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 28 deletions.
20 changes: 7 additions & 13 deletions .github/workflows/_cargo_deny.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ name: Cargo deny

on:
workflow_call:
inputs:
manifest-path:
type: string
required: false
default: "./Cargo.toml"
secrets:
SSH_PRIVATE_KEY_IOTA_CI:
required: true
Expand All @@ -13,24 +18,13 @@ concurrency:
cancel-in-progress: true

jobs:
rust-crates:
name: cargo-deny (advisories, licenses, bans, ...)
runs-on: [self-hosted]
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # pin@v4
- uses: EmbarkStudios/cargo-deny-action@8371184bd11e21dcf8ac82ebf8c9c9f74ebf7268 # pin@v2
with:
ssh-key: ${{ secrets.SSH_PRIVATE_KEY_IOTA_CI }}
ssh-known-hosts: ${{ secrets.SSH_GITHUB_KNOWN_HOSTS }}
use-git-cli: true

external-crates:
name: cargo-deny (advisories, licenses, bans, ...)
cargo-deny:
runs-on: [self-hosted]
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # pin@v4
- uses: EmbarkStudios/cargo-deny-action@8371184bd11e21dcf8ac82ebf8c9c9f74ebf7268 # pin@v2
with:
manifest-path: ${{ inputs.manifest-path }}
ssh-key: ${{ secrets.SSH_PRIVATE_KEY_IOTA_CI }}
ssh-known-hosts: ${{ secrets.SSH_GITHUB_KNOWN_HOSTS }}
use-git-cli: true
6 changes: 6 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ env:
RUST_BACKTRACE: short

jobs:
cargo-deny-external:
uses: ./.github/workflows/_cargo_deny.yml
with:
manifest-path: external-crates/move/Cargo.toml
secrets: inherit

release:
name: build release binaries
runs-on: ${{ matrix.os }}
Expand Down
28 changes: 14 additions & 14 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ allow = [
"Unlicense",
"BSL-1.0",
"Unicode-DFS-2016",
"OpenSSL",
# "Apache-2.0 WITH LLVM-exception",
]
# The confidence threshold for detecting a license from license text.
Expand All @@ -93,7 +94,7 @@ confidence-threshold = 0.8
# Allow 1 or more licenses on a per-crate basis, so that particular licenses
# aren't accepted for every possible crate as with the normal allow list
exceptions = [

{ allow = ["GPL-2.0"], name = "mysqlclient-src" },

# Each entry is the crate and version constraint, and its specific allow
# list
Expand Down

0 comments on commit 1c55189

Please sign in to comment.