Skip to content

Commit 5c5e30d

Browse files
authored
Merge pull request #2848 from input-output-hk/djo/2746/ci/add-license-check
ci: Check external crates licenses compatibility
2 parents affa665 + 97f5735 commit 5c5e30d

File tree

2 files changed

+80
-0
lines changed

2 files changed

+80
-0
lines changed

.github/workflows/ci.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,50 @@ jobs:
333333
if: success() || failure()
334334
run: make check-format
335335

336+
licenses:
337+
runs-on: ubuntu-22.04
338+
strategy:
339+
fail-fast: false
340+
matrix:
341+
include:
342+
## Note about deny command options:
343+
## `--no-default-features` is only available when running against one crate
344+
345+
# Global
346+
- deny-args: ""
347+
manifest-path: ./Cargo.toml
348+
- deny-args: "--all-features"
349+
manifest-path: ./Cargo.toml
350+
- deny-args: "--features rug-backend"
351+
manifest-path: ./Cargo.toml
352+
- deny-args: "--features num-integer-backend"
353+
manifest-path: ./Cargo.toml
354+
- deny-args: "--features jemallocator"
355+
manifest-path: ./Cargo.toml
356+
- deny-args: "--features bundle_tls"
357+
manifest-path: ./Cargo.toml
358+
359+
# Mithril Client
360+
- deny-args: ""
361+
manifest-path: mithril-client/Cargo.toml
362+
- deny-args: "--all-features"
363+
manifest-path: mithril-client/Cargo.toml
364+
- deny-args: "--no-default-features"
365+
manifest-path: mithril-client/Cargo.toml
366+
367+
# Mithril Client WASM
368+
- deny-args: ""
369+
manifest-path: mithril-client-wasm/Cargo.toml
370+
steps:
371+
- uses: actions/checkout@v5
372+
373+
- uses: EmbarkStudios/cargo-deny-action@v2
374+
with:
375+
command: check licenses
376+
arguments: ${{ matrix.deny-args }}
377+
log-level: error
378+
manifest-path: ${{ matrix.manifest-path }}
379+
336380
e2e:
337381
runs-on: ubuntu-24.04
338382
needs: [build-ubuntu]
@@ -471,6 +515,7 @@ jobs:
471515
needs:
472516
- build
473517
- check
518+
- licenses
474519
- test
475520
- e2e
476521
strategy:
@@ -573,6 +618,7 @@ jobs:
573618
- test
574619
- e2e
575620
- check
621+
- licenses
576622
steps:
577623
- name: Checkout sources
578624
uses: actions/checkout@v5
@@ -632,6 +678,7 @@ jobs:
632678
- test
633679
- e2e
634680
- check
681+
- licenses
635682
steps:
636683
- name: Checkout sources
637684
uses: actions/checkout@v5

deny.toml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Cargo-deny configuration file
2+
3+
[graph]
4+
targets = [
5+
"aarch64-apple-darwin",
6+
"aarch64-unknown-linux-gnu",
7+
"x86_64-pc-windows-msvc",
8+
"x86_64-unknown-linux-gnu",
9+
"x86_64-unknown-linux-musl",
10+
"wasm32-unknown-unknown"
11+
]
12+
13+
[licenses]
14+
# We want really high confidence when inferring licenses from text
15+
confidence-threshold = 0.93
16+
# This list of allowed licenses is not final and is currently under legal investigation. It may be updated in the future.
17+
allow = [
18+
"Apache-2.0",
19+
"BlueOak-1.0.0",
20+
"BSD-2-Clause",
21+
"BSD-3-Clause",
22+
"bzip2-1.0.6",
23+
"CC0-1.0",
24+
"CDLA-Permissive-2.0",
25+
"ISC",
26+
"LGPL-3.0-or-later",
27+
"MIT",
28+
"MIT-0",
29+
"MPL-2.0",
30+
"Unicode-3.0",
31+
"Zlib",
32+
]
33+

0 commit comments

Comments
 (0)