@@ -263,6 +263,7 @@ jobs:
263263 env :
264264 CC : ${{ inputs.compiler-CC }}
265265 CXX : ${{ inputs.compiler-CXX }}
266+ FAMILY : ${{ inputs.compiler-family }}
266267 CLANG_TIDY : ${{ inputs.compiler-CLANG_TIDY }}
267268 GCOV : ${{ inputs.compiler-GCOV }}
268269 SRC_DIR : ${{ github.workspace }}/rawspeed
@@ -278,8 +279,9 @@ jobs:
278279 cmake -E make_directory "${INSTALL_PREFIX}"
279280 export ECO="${ECO} -DRAWSPEED_REFERENCE_SAMPLE_ARCHIVE=${RPUU_DST}"
280281 export ECO="${ECO} -DCMAKE_CXX_CLANG_TIDY_EXPORT_FIXES_DIR=${BUILD_DIR}/clang-tidy/"
281- if [ "$FLAVOR " = "ClangTidy" ] || [ "$FLAVOR" = "ClangStaticAnalysis" ] || [ "$FLAVOR" = "ClangCTUStaticAnalysis" ] || [ "$FLAVOR" = "CodeQLAnalysis " ]; then
282+ if [ "$FAMILY " = "LLVM " ]; then
282283 export ECO="${ECO} -DRAWSPEED_ENABLE_WERROR=OFF"
284+ export ECO="${ECO} -DCMAKE_CXX_COMPILER_LAUNCHER=\"${SRC_DIR}/.ci/clang-sarif-wrapper.sh;${GITHUB_WORKSPACE}/clang_report/\""
283285 fi
284286 "${SRC_DIR}/.ci/ci-script.sh"
285287 - name : Build
@@ -290,9 +292,22 @@ jobs:
290292 INSTALL_PREFIX : ${{ github.workspace }}/rawspeed-install
291293 FLAVOR : ${{ inputs.flavor }}
292294 TARGET : build
295+ id : build
293296 run : |
294297 set -xe
295298 "${SRC_DIR}/.ci/ci-script.sh"
299+ if [ "$FAMILY" = "LLVM" ] || [ "$FLAVOR" = "ClangTidy" ] || [ "$FLAVOR" = "ClangStaticAnalysis" ] || [ "$FLAVOR" = "ClangCTUStaticAnalysis" ] || [ "$FLAVOR" = "CodeQLAnalysis" ]; then
300+ else
301+ exit [ ! -f ${GITHUB_WORKSPACE}/clang_report/.warnings ]
302+ fi
303+ - name : Upload results of clang compile [SARIF]
304+ timeout-minutes : 1
305+ if : inputs.compiler-family == 'LLVM' && (success() || (failure() && steps.build.conclusion == 'failure'))
306+ uses : github/codeql-action/upload-sarif@v3
307+ with :
308+ sarif_file : " ${{ github.workspace }}/clang_report/"
309+ checkout_path : " ${{ github.workspace }}/rawspeed"
310+ category : ${{ jobs[github.job].name }}
296311 - name : Test (unit tests)
297312 timeout-minutes : 1
298313 env :
0 commit comments