Skip to content

Commit 6121b7d

Browse files
authored
Fix ORT/scancode errors (#49)
* Add debug information for why ORT is failing * Use scancode versions specified by the scancode developers Signed-off-by: James Duong <[email protected]>
1 parent 459f65a commit 6121b7d

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

.github/workflows/ort.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,13 @@ jobs:
230230
- name: Install scancode-toolkit
231231
run: |
232232
python3 -m pip install --upgrade pip setuptools wheel
233+
# Use exact versions from scancode-toolkit requirements.txt
234+
python_version=$(python3 -c "import sys; print(f'{sys.version_info.major}.{sys.version_info.minor}')")
235+
if [[ $(echo "$python_version >= 3.10" | bc -l) -eq 1 ]]; then
236+
pip install "click==8.2.1"
237+
else
238+
pip install "click==8.1.7"
239+
fi
233240
pip install scancode-toolkit
234241
235242
- name: Install and setup aboutcode-toolkit
@@ -240,6 +247,9 @@ jobs:
240247
241248
- name: Run scancode license scanning
242249
run: |
250+
set -e
251+
set -o pipefail
252+
243253
scancode -n 4 --license . \
244254
--ignore "*valkey-glide/*" \
245255
--ignore "*bin/*" \
@@ -255,8 +265,20 @@ jobs:
255265
--ignore "*THIRD_PARTY_LICENSES_PHP*" \
256266
--json report.json --csv report.csv -v 2>&1 | tee scancode_output.log
257267
268+
if [ ! -f "report.json" ] || [ ! -s "report.json" ]; then
269+
echo "ERROR: report.json not created or empty"
270+
cat scancode_output.log
271+
exit 1
272+
fi
273+
258274
- name: Generate attribution with aboutcode-toolkit
259275
run: |
276+
if [ ! -f "report.json" ]; then
277+
echo "ERROR: report.json not found. Scancode step may have failed."
278+
echo "Checking scancode output:"
279+
cat scancode_output.log || echo "No scancode output log found"
280+
exit 1
281+
fi
260282
cd aboutcode-toolkit
261283
mkdir -p out
262284
./about attrib --scancode ../report.json --template ../aboutcode.template out/rep.csv

0 commit comments

Comments
 (0)