Skip to content

Commit

Permalink
ci: Add cargo deny license check
Browse files Browse the repository at this point in the history
  • Loading branch information
philipp-caspers committed Dec 2, 2024
1 parent 4794854 commit 6c77c73
Show file tree
Hide file tree
Showing 3 changed files with 62 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
55 changes: 55 additions & 0 deletions deny.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
[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-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 6c77c73

Please sign in to comment.