Skip to content

Commit

Permalink
Add GitHub workflow for creating 3rd party dependency list
Browse files Browse the repository at this point in the history
  • Loading branch information
sophokles73 committed Jan 25, 2024
1 parent 06318da commit cacea24
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 0 deletions.
63 changes: 63 additions & 0 deletions .github/workflows/check_dependencies.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# ********************************************************************************
# Copyright (c) 2023 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Apache License Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0
#
# SPDX-License-Identifier: Apache-2.0
# *******************************************************************************/

name: Check 3rd party dependencies

on:
push:
branches: [ main ]
pull_request:
paths:
- "Cargo.*"
workflow_call:
workflow_dispatch:

concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true

jobs:
deps:
name: "Check 3rd party licenses"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: cargo tree
working-directory: ${{github.workspace}}
run: |
cargo tree -e normal --prefix none --no-dedupe \
| sort -u \
| grep -v '^[[:space:]]*$' \
| grep -v uprotocol-sdk \
| sed -E 's|([^ ]+) v([^ ]+).*|crate/cratesio/-/\1/\2|' \
> DEPS.txt
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: "17"
- name: "Download latest Dash jar file"
working-directory: ${{github.workspace}}
run: |
wget -O dash.jar "https://repo.eclipse.org/service/local/artifact/maven/redirect?r=dash-licenses&g=org.eclipse.dash&a=org.eclipse.dash.licenses&v=LATEST"
- name: "Run latest Eclipse Dash jar file"
working-directory: ${{github.workspace}}
continue-on-error: true
run: |
wget -O dash.jar "https://repo.eclipse.org/service/local/artifact/maven/redirect?r=dash-licenses&g=org.eclipse.dash&a=org.eclipse.dash.licenses&v=LATEST"
java -Dorg.eclipse.dash.timeout=60 -jar dash.jar -batch 90 -summary DEPENDENCIES.txt DEPS.txt || true
- name: Upload DEPENDENCIES file
uses: actions/upload-artifact@v4
with:
name: 3rd-party-dependencies
path: DEPENDENCIES.txt
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,6 @@ protobuf-codegen = { version = "3.3" }
protoc-bin-vendored = { version = "3.0" }
ureq = { version = "2.7" }


[dev-dependencies]
test-case = { version = "3.3" }

0 comments on commit cacea24

Please sign in to comment.