Skip to content

Commit 2883514

Browse files
authored
Add CI job for checking 3rd party license compatibility (#124)
1 parent dd9af33 commit 2883514

1 file changed

Lines changed: 52 additions & 0 deletions

File tree

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# ********************************************************************************
2+
# Copyright (c) 2025 Contributors to the Eclipse Foundation
3+
#
4+
# See the NOTICE file(s) distributed with this work for additional
5+
# information regarding copyright ownership.
6+
#
7+
# This program and the accompanying materials are made available under the
8+
# terms of the Apache License Version 2.0 which is available at
9+
# https://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# SPDX-License-Identifier: Apache-2.0
12+
# *******************************************************************************/
13+
14+
name: Check 3rd party dependencies
15+
16+
on:
17+
push:
18+
branches: [ main ]
19+
pull_request:
20+
paths:
21+
- "Cargo.*"
22+
workflow_call:
23+
workflow_dispatch:
24+
25+
concurrency:
26+
group: ${{ github.ref }}-${{ github.workflow }}
27+
cancel-in-progress: true
28+
29+
env:
30+
RUST_TOOLCHAIN: ${{ vars.RUST_TOOLCHAIN || 'stable' }}
31+
RUSTFLAGS: -Dwarnings
32+
CARGO_TERM_COLOR: always
33+
34+
jobs:
35+
deps:
36+
name: "Check 3rd party licenses"
37+
runs-on: ubuntu-latest
38+
steps:
39+
- uses: actions/checkout@v4
40+
- name: Determine 3rd party dependencies
41+
working-directory: ${{github.workspace}}
42+
run: |
43+
cargo tree --all-features --locked -e no-build,no-dev --prefix none --no-dedupe \
44+
| sed -n '2~1p' \
45+
| sort -u \
46+
| grep -v '^[[:space:]]*$' \
47+
| sed -E 's|([^ ]+) v([^ ]+).*|crate/cratesio/-/\1/\2|' \
48+
> DEPS.txt
49+
- name: Run Eclipse Dash Licenses tool
50+
uses: eclipse-uprotocol/ci-cd/.github/actions/run-eclipse-dash@main
51+
with:
52+
components-file: DEPS.txt

0 commit comments

Comments
 (0)