From 8967abb37d80bbb9057a244663196083cf3db9d1 Mon Sep 17 00:00:00 2001 From: Clement Delafargue Date: Sat, 14 Nov 2026 23:36:42 +0100 Subject: [PATCH] ci: run licenses vetting --- .github/workflows/test.yml | 43 ++++++++++++++++++++++++++++++++++++++ release-checklist.md | 2 +- 2 files changed, 44 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9e421ad..ed748a0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -44,3 +44,46 @@ jobs: uses: jpetrucciani/mypy-check@a33bdbb3d3b6133ec6b9a69178f65aa46751d50b # master with: requirements_file: "requirements-dev.txt" + + licenses: + runs-on: ubuntu-24.04 + continue-on-error: true + env: + DASH_VERSION: 1.1.0 + DASH_SHA256: ba4e84e1981f0e51f92a42ec8fc8b9668dabb08d1279afde46b8414e11752b06 + steps: + - uses: actions/checkout@v4 + - uses: actions-rust-lang/setup-rust-toolchain@v1 + - uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: 21 + - name: Cache the Eclipse Dash license tool + id: dash-cache + uses: actions/cache@v4 + with: + path: dash-licenses.jar + key: dash-licenses-${{ env.DASH_VERSION }} + - name: Download the Eclipse Dash license tool + if: steps.dash-cache.outputs.cache-hit != 'true' + run: | + curl -fsSL -o dash-licenses.jar \ + https://clementd-files.cellar-c2.services.clever-cloud.com/org.eclipse.dash.licenses-$DASH_VERSION.jar + - name: Verify the Eclipse Dash license tool + run: echo "$DASH_SHA256 dash-licenses.jar" | sha256sum -c + - name: Check dependency licenses + # the tool exits with the number of dependencies that are not approved + shell: bash + run: | + cargo tree -e normal --prefix none --no-dedupe \ + | sort -u \ + | grep -v '^[[:space:]]*$' \ + | grep -v biscuit \ + | sed -E 's|([^ ]+) v([^ ]+).*|crate/cratesio/-/\1/\2|' \ + | java -jar dash-licenses.jar -summary DEPENDENCIES - + - name: Upload the license summary + if: always() + uses: actions/upload-artifact@v4 + with: + name: dependencies-licenses + path: DEPENDENCIES diff --git a/release-checklist.md b/release-checklist.md index 0022bbe..c200803 100644 --- a/release-checklist.md +++ b/release-checklist.md @@ -15,7 +15,7 @@ Eclipse projects can only be released within the validity period of a release re ``` (you’ll need to download the [eclipse dash licenses jar](repo.eclipse.org/content/repositories/dash-licenses/org/eclipse/dash/org.eclipse.dash.licenses/)) -This step should be automated at some point. +This check runs in CI, in the `licenses` job of `.github/workflows/test.yml`. Note: the python library does not have any dependency so this step is only required for rust dependencies.