@@ -184,7 +184,7 @@ jobs:
184
184
timeout-minutes : 1
185
185
run : |
186
186
set -xe
187
- git config --global --add safe.directory "$GITHUB_WORKSPACE"
187
+ git config --global --add safe.directory "${ GITHUB_WORKSPACE} "
188
188
- name : Fetch/Checkout RawSpeed git repo
189
189
timeout-minutes : 1
190
190
uses : actions/checkout@v4
@@ -396,24 +396,36 @@ jobs:
396
396
BUILD_DIR : ${{ github.workspace }}/rawspeed-build
397
397
CC : ${{ inputs.compiler-CC }}
398
398
CXX : ${{ inputs.compiler-CXX }}
399
+ id : CC-CSA-plain
399
400
run : |
400
401
set -xe
401
402
. "$PWD/codechecker/venv/bin/activate"
402
403
export PATH="$PWD/codechecker/build/CodeChecker/bin:$PATH"
403
404
set +e
404
- CodeChecker check --logfile "${BUILD_DIR}/compile_commands.json" --analyzers clangsa --jobs "$(nproc --all)" --file "${SRC_DIR}/*" --disable deadcode.DeadStores -o "${BUILD_DIR}/codechecker_results"
405
+ CodeChecker check --logfile "${BUILD_DIR}/compile_commands.json" --analyzers clangsa --jobs "$(nproc --all)" --file "${SRC_DIR}/*" --disable deadcode.DeadStores --disable alpha.unix.Stream - o "${BUILD_DIR}/codechecker_results"
405
406
bugs=$?
406
- CodeChecker parse -e html "${BUILD_DIR}/codechecker_results" -o "${BUILD_DIR}/codechecker_report"
407
+ CodeChecker parse -e sarif "${BUILD_DIR}/codechecker_results" -o "${GITHUB_WORKSPACE}/codechecker_report.json"
408
+ CodeChecker parse -e html "${BUILD_DIR}/codechecker_results" -o "${GITHUB_WORKSPACE}/codechecker_report"
407
409
set -xe
408
- tar -cvJ -f "$GITHUB_WORKSPACE/codechecker_report.tar.xz" -C "${BUILD_DIR}" "codechecker_report"
409
410
[ $bugs -eq 0 ] || exit 1
410
- - name : Upload results of clang static analysis (plain mode)
411
+ - name : Upload results of clang static analysis [SARIF] (plain mode)
411
412
timeout-minutes : 1
412
- if : failure()
413
+ if : inputs.flavor == 'ClangStaticAnalysis' && failure() && steps.CC-CSA-plain.conclusion == 'failure'
414
+ uses : github/codeql-action/upload-sarif@v3
415
+ with :
416
+ sarif_file : " ${{ github.workspace }}/codechecker_report.json"
417
+ checkout_path : " ${{ github.workspace }}/rawspeed"
418
+ category : CodeChecker-CSA-plain
419
+ - name : Upload results of clang static analysis [HTML] (plain mode)
420
+ timeout-minutes : 1
421
+ if : inputs.flavor == 'ClangStaticAnalysis' && failure() && steps.CC-CSA-plain.conclusion == 'failure'
413
422
uses : actions/upload-artifact@v4
414
423
with :
415
- name : codechecker_report.tar.xz
416
- path : ${{ github.workspace }}/codechecker_report.tar.xz
424
+ name : codechecker_report
425
+ path : ${{ github.workspace }}/codechecker_report/
426
+ if-no-files-found : error
427
+ compression-level : 9
428
+ overwrite : true
417
429
- name : Perform clang static analysis (CTU mode)
418
430
timeout-minutes : 25
419
431
if : inputs.flavor == 'ClangCTUStaticAnalysis'
@@ -422,24 +434,36 @@ jobs:
422
434
BUILD_DIR : ${{ github.workspace }}/rawspeed-build
423
435
CC : ${{ inputs.compiler-CC }}
424
436
CXX : ${{ inputs.compiler-CXX }}
437
+ id : CC-CSA-CTU
425
438
run : |
426
439
set -xe
427
440
. "$PWD/codechecker/venv/bin/activate"
428
441
export PATH="$PWD/codechecker/build/CodeChecker/bin:$PATH"
429
442
set +e
430
- CodeChecker check --ctu --ctu-reanalyze-on-failure --logfile "${BUILD_DIR}/compile_commands.json" --analyzers clangsa --jobs "$(nproc --all)" --file "${SRC_DIR}/*" --disable deadcode.DeadStores -o "${BUILD_DIR}/codechecker_ctu_results"
443
+ CodeChecker check --ctu --ctu-reanalyze-on-failure --logfile "${BUILD_DIR}/compile_commands.json" --analyzers clangsa --jobs "$(nproc --all)" --file "${SRC_DIR}/*" --disable deadcode.DeadStores --disable alpha.unix.Stream - o "${BUILD_DIR}/codechecker_ctu_results"
431
444
bugs=$?
432
- CodeChecker parse -e html "${BUILD_DIR}/codechecker_ctu_results" -o "${BUILD_DIR}/codechecker_ctu_report"
445
+ CodeChecker parse -e sarif "${BUILD_DIR}/codechecker_ctu_results" -o "${GITHUB_WORKSPACE}/codechecker_ctu_report.json"
446
+ CodeChecker parse -e html "${BUILD_DIR}/codechecker_ctu_results" -o "${GITHUB_WORKSPACE}/codechecker_ctu_report"
433
447
set -xe
434
- tar -cvJ -f "$GITHUB_WORKSPACE/codechecker_ctu_report.tar.xz" -C "${BUILD_DIR}" "codechecker_ctu_report"
435
448
[ $bugs -eq 0 ] || exit 1
436
- - name : Upload results of clang static analysis (CTU mode)
449
+ - name : Upload results of clang static analysis [SARIF] (plain mode)
450
+ timeout-minutes : 1
451
+ if : inputs.flavor == 'ClangCTUStaticAnalysis' && failure() && steps.CC-CSA-CTU.conclusion == 'failure'
452
+ uses : github/codeql-action/upload-sarif@v3
453
+ with :
454
+ sarif_file : " ${{ github.workspace }}/codechecker_ctu_report.json"
455
+ checkout_path : " ${{ github.workspace }}/rawspeed"
456
+ category : CodeChecker-CSA-ctu
457
+ - name : Upload results of clang static analysis [HTML] (CTU mode)
437
458
timeout-minutes : 1
459
+ if : inputs.flavor == 'ClangCTUStaticAnalysis' && failure() && steps.CC-CSA-CTU.conclusion == 'failure'
438
460
uses : actions/upload-artifact@v4
439
- if : failure()
440
461
with :
441
- name : codechecker_ctu_report.tar.xz
442
- path : ${{ github.workspace }}/codechecker_ctu_report.tar.xz
462
+ name : codechecker_ctu_report
463
+ path : ${{ github.workspace }}/codechecker_ctu_report/
464
+ if-no-files-found : error
465
+ compression-level : 9
466
+ overwrite : true
443
467
- name : Perform CodeQL static analysis
444
468
timeout-minutes : 11
445
469
if : inputs.flavor == 'CodeQLAnalysis'
0 commit comments