Skip to content

Commit

Permalink
Try ORT CI API
Browse files Browse the repository at this point in the history
  • Loading branch information
barshaul committed Feb 8, 2024
1 parent c99685b commit a4b9d9a
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 19 deletions.
58 changes: 42 additions & 16 deletions .github/workflows/ort.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
uses: actions/checkout@v4
with:
submodules: "true"

- name: Set up JDK 11 for the ORT package
uses: actions/setup-java@v3
with:
Expand Down Expand Up @@ -114,11 +114,21 @@ jobs:
envsubst < package.json.tmpl > "package.json"
cat package.json
- name: Run ORT tools for Node
uses: ./.github/workflows/run-ort-tools
- name: Run GitHub Action for ORT for NodeJS
uses: oss-review-toolkit/ort-ci-github-action@v1
with:
folder_name: "node"

allow-dynamic-versions: "true"
ort-home-path: "${{ github.workspace }}/node"
report-formats: "PlainTextTemplate"
run: >
analyzer,
reporter
# - name: Run ORT tools for Node
# uses: ./.github/workflows/run-ort-tools
# with:
# folder_name: "node"

### Python ###

- name: Set up Python 3.10
Expand All @@ -132,23 +142,39 @@ jobs:
python -m pip install --upgrade pip
pip install git+https://github.com/nexB/python-inspector
- name: Run ORT tools for Python
uses: ./.github/workflows/run-ort-tools
# - name: Run ORT tools for Python
# uses: ./.github/workflows/run-ort-tools
# with:
# folder_name: "python"
- name: Run GitHub Action for ORT for NodeJS
uses: oss-review-toolkit/ort-ci-github-action@v1
with:
folder_name: "python"

allow-dynamic-versions: "true"
ort-home-path: "${{ github.workspace }}/python"
report-formats: "PlainTextTemplate"
run: >
analyzer,
reporter
### Rust ###

- name: Run ORT tools for Rust
uses: ./.github/workflows/run-ort-tools
- name: Run GitHub Action for ORT for NodeJS
uses: oss-review-toolkit/ort-ci-github-action@v1
with:
folder_name: "glide-core"
allow-dynamic-versions: "true"
ort-home-path: "${{ github.workspace }}/glide-core"
report-formats: "PlainTextTemplate"
run: >
analyzer,
reporter
# - name: Run ORT tools for Rust
# uses: ./.github/workflows/run-ort-tools
# with:
# folder_name: "glide-core"

- name: Check for diff
run: |
cp python/ort_results/NOTICE_DEFAULT $PYTHON_ATTRIBUIOTNS
cp node/ort_results/NOTICE_DEFAULT $NODE_ATTRIBUIOTNS
cp glide-core/ort_results/NOTICE_DEFAULT $RUST_ATTRIBUIOTNS
cp python/ort-results/NOTICE_DEFAULT $PYTHON_ATTRIBUIOTNS
cp node/ort-results/NOTICE_DEFAULT $NODE_ATTRIBUIOTNS
cp glide-core/ort-results/NOTICE_DEFAULT $RUST_ATTRIBUIOTNS
GIT_DIFF=`git diff $PYTHON_ATTRIBUIOTNS $NODE_ATTRIBUIOTNS $RUST_ATTRIBUIOTNS`
if [ -n "$GIT_DIFF" ]; then
echo "FOUND_DIFF=true" >> $GITHUB_ENV
Expand Down
6 changes: 3 additions & 3 deletions utils/get_licenses_from_ort.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ def __init__(self, name: str, ort_results_folder: str) -> None:


ort_results_per_lang = [
OrtResults("Python", "python/ort_results"),
OrtResults("Node", "node/ort_results"),
OrtResults("Rust", "glide-core/ort_results"),
OrtResults("Python", "python/ort-results"),
OrtResults("Node", "node/ort-results"),
OrtResults("Rust", "glide-core/ort-results"),
]

licenses_set = set()
Expand Down

0 comments on commit a4b9d9a

Please sign in to comment.