Skip to content

Commit

Permalink
ci: Add cargo deny license check
Browse files Browse the repository at this point in the history
Co-authored-by: Julian Oeltjen <[email protected]>
  • Loading branch information
philipp-caspers and julianoeltjen committed Dec 2, 2024
1 parent 4794854 commit 1e8eefd
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ USER $USERNAME
# Install Rust and the cargo-ament-build plugin
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain 1.82.0 -y
ENV PATH=/home/$USERNAME/.cargo/bin:$PATH
RUN cargo install cargo-ament-build
RUN cargo install cargo-ament-build cargo-deny
# Install autocompletion for rustup and cargo
RUN mkdir -p ~/.local/share/bash-completion/completions
RUN rustup completions bash >> ~/.local/share/bash-completion/completions/rustup
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/ci_lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,9 @@ jobs:
cacheFrom: ghcr.io/vorausrobotik/voraus-ros-bridge-dev
runCmd: cargo clippy --all-targets --all-features -- -Dwarnings
push: never
- name: Cargo deny license check
uses: devcontainers/[email protected]
with:
chacheFrom: ghcr.io/vorausrobotik/voraus-ros-bride-dev
runCmd: cargo deny check licenses
push: never
56 changes: 56 additions & 0 deletions deny.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
[graph]
all-features = false
no-default-features = false

[output]
feature-depth = 1

# More documentation for the licenses section can be found here:
# https://embarkstudios.github.io/cargo-deny/checks/licenses/cfg.html
[licenses]
allow = [
"MIT",
"Apache-2.0",
"Apache-2.0 WITH LLVM-exception",
"MPL-2.0",
"ISC",
"BSD-3-Clause",
"Unicode-DFS-2016",
"Unicode-3.0",
]
confidence-threshold = 0.8

[[licenses.clarify]]
name = "voraus_interfaces"
expression = "MIT"
license-files = []

[[licenses.clarify]]
name = "builtin_interfaces"
# License can not be inferred but is Apache License 2.0, see https://index.ros.org/p/builtin_interfaces/
expression = "Apache-2.0"
license-files = []

[[licenses.clarify]]
name = "geometry_msgs"
# License can not be inferred but is Apache License 2.0, see https://index.ros.org/p/geometry_msgs/
expression = "Apache-2.0"
license-files = []

[[licenses.clarify]]
name = "sensor_msgs"
# License can not be inferred but is Apache License 2.0, see https://index.ros.org/p/sensor_msgs/"
expression = "Apache-2.0"
license-files = []

[[licenses.clarify]]
name = "std_msgs"
# License can not be inferred but is Apache License 2.0, see https://index.ros.org/p/std_msgs/
expression = "Apache-2.0"
license-files = []

[[licenses.clarify]]
name = "std_srvs"
# License can not be inferred but is Apache License 2.0, see https://index.ros.org/p/std_srvs/
expression = "Apache-2.0"
license-files = []

0 comments on commit 1e8eefd

Please sign in to comment.