Check license of dependencies in CI

This commit is contained in:
Johannes Altmanninger
2025-11-04 11:08:04 +01:00
parent 462fa9077a
commit bed2da9b83
10 changed files with 38 additions and 3 deletions

17
.github/workflows/lint-dependencies.yml vendored Normal file
View File

@@ -0,0 +1,17 @@
name: CI
on:
pull_request:
paths:
- 'Cargo.lock'
- '**/Cargo.toml'
- 'deny.toml'
jobs:
cargo-deny:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: EmbarkStudios/cargo-deny-action@v2
with:
command: check licenses
arguments: --all-features --locked --exclude-dev
rust-version: 1.91 # updatecli.d/rust.yml

View File

@@ -6,6 +6,9 @@ members = ["crates/*"]
rust-version = "1.85"
edition = "2024"
repository = "https://github.com/fish-shell/fish-shell"
# see doc_src/license.rst for details
# don't forget to update COPYING and debian/copyright too
license = "GPL-2.0-only AND LGPL-2.0-or-later AND MIT AND PSF-2.0"
[workspace.dependencies]
bitflags = "2.5.0"
@@ -74,9 +77,7 @@ version = "4.2.1-snapshot"
edition.workspace = true
rust-version.workspace = true
default-run = "fish"
# see doc_src/license.rst for details
# don't forget to update COPYING and debian/copyright too
license = "GPL-2.0-only AND LGPL-2.0-or-later AND MIT AND PSF-2.0"
license.workspace = true
homepage = "https://fishshell.com"
readme = "README.rst"

View File

@@ -70,6 +70,9 @@ template_file=$(mktemp)
cargo build --workspace --all-targets --features=gettext-extract
)
if $lint; then
if command -v cargo-deny >/dev/null; then
cargo deny --all-features --locked --exclude-dev check licenses
fi
PATH="$build_dir:$PATH" "$workspace_root/build_tools/style.fish" --all --check
for features in "" --no-default-features; do
cargo clippy --workspace --all-targets $features

View File

@@ -4,6 +4,7 @@ edition.workspace = true
rust-version.workspace = true
version = "0.0.0"
repository.workspace = true
license.workspace = true
[dependencies]
rsconf.workspace = true

View File

@@ -4,6 +4,7 @@ edition.workspace = true
rust-version.workspace = true
version = "0.0.0"
repository.workspace = true
license.workspace = true
[build-dependencies]
fish-build-helper.workspace = true

View File

@@ -4,6 +4,7 @@ edition.workspace = true
rust-version.workspace = true
version = "0.0.0"
repository.workspace = true
license.workspace = true
description = "proc-macro for extracting strings for gettext translation"
[lib]

View File

@@ -4,6 +4,7 @@ edition.workspace = true
rust-version.workspace = true
version = "0.0.0"
repository.workspace = true
license.workspace = true
[dependencies]
phf.workspace = true

View File

@@ -4,6 +4,7 @@ edition.workspace = true
rust-version.workspace = true
version = "0.0.0"
repository.workspace = true
license.workspace = true
[lints]
workspace = true

View File

@@ -4,6 +4,7 @@ edition.workspace = true
rust-version.workspace = true
version = "0.0.0"
repository.workspace = true
license.workspace = true
[dependencies]
nix = { workspace = true, features = ["fs", "feature"] }

View File

@@ -29,6 +29,14 @@ targets:
file: .github/actions/rust-toolchain/action.yml
matchpattern: '\(stable\) echo \d+\.\d+ ;;.*'
replacepattern: '(stable) echo {{ source "rust_stable_version" }} ;; # updatecli.d/rust.yml'
update_rust_stable2:
name: "Update Rust stable #2"
sourceid: rust_stable_version
kind: file
spec:
file: .github/workflows/lint-dependencies.yml
matchpattern: 'rust-version: \d+\.\d+\b.*'
replacepattern: 'rust-version: {{ source "rust_stable_version" }} # updatecli.d/rust.yml'
update_msrv:
name: "Update MSRV"
sourceid: rust_stable_version