@@ -264,6 +264,7 @@ jobs:
264264 env :
265265 CC : ${{ inputs.compiler-CC }}
266266 CXX : ${{ inputs.compiler-CXX }}
267+ FAMILY : ${{ inputs.compiler-family }}
267268 CLANG_TIDY : ${{ inputs.compiler-CLANG_TIDY }}
268269 GCOV : ${{ inputs.compiler-GCOV }}
269270 SRC_DIR : ${{ github.workspace }}/rawspeed
@@ -279,8 +280,9 @@ jobs:
279280 cmake -E make_directory "${INSTALL_PREFIX}"
280281 export ECO="${ECO} -DRAWSPEED_REFERENCE_SAMPLE_ARCHIVE=${RPUU_DST}"
281282 export ECO="${ECO} -DCMAKE_CXX_CLANG_TIDY_EXPORT_FIXES_DIR=${BUILD_DIR}/clang-tidy/"
282- if [ "$FLAVOR " = "ClangTidy" ] || [ "$FLAVOR" = "ClangStaticAnalysis" ] || [ "$FLAVOR" = "ClangCTUStaticAnalysis" ] || [ "$FLAVOR" = "CodeQLAnalysis " ]; then
283+ if [ "$FAMILY " = "LLVM " ]; then
283284 export ECO="${ECO} -DRAWSPEED_ENABLE_WERROR=OFF"
285+ export ECO="${ECO} -DCMAKE_CXX_COMPILER_LAUNCHER='${SRC_DIR}/.ci/clang-sarif-wrapper.sh;${GITHUB_WORKSPACE}/clang_report/'"
284286 fi
285287 "${SRC_DIR}/.ci/ci-script.sh"
286288 - name : Build
@@ -295,6 +297,18 @@ jobs:
295297 run : |
296298 set -xe
297299 "${SRC_DIR}/.ci/ci-script.sh"
300+ if [ "$FAMILY" = "LLVM" ] || [ "$FLAVOR" = "ClangTidy" ] || [ "$FLAVOR" = "ClangStaticAnalysis" ] || [ "$FLAVOR" = "ClangCTUStaticAnalysis" ] || [ "$FLAVOR" = "CodeQLAnalysis" ]; then
301+ else
302+ exit [ ! -f ${GITHUB_WORKSPACE}/clang_report/.warnings ]
303+ fi
304+ - name : Upload results of clang compile [SARIF]
305+ timeout-minutes : 1
306+ if : inputs.compiler-family == 'LLVM' && !cancelled() && steps.build.conclusion != 'skipped'
307+ uses : github/codeql-action/upload-sarif@v3
308+ with :
309+ sarif_file : " ${{ github.workspace }}/clang_report/"
310+ checkout_path : " ${{ github.workspace }}/rawspeed"
311+ category : ${{ job.name }}
298312 - name : Test (unit tests)
299313 timeout-minutes : 1
300314 env :
0 commit comments