From 7923ce9310362e19e966614f515881694eb17df3 Mon Sep 17 00:00:00 2001 From: kminoda Date: Tue, 4 Jun 2024 21:09:42 +0900 Subject: [PATCH] minor fix Signed-off-by: kminoda --- .github/workflows/cppcheck-all.yaml | 2 +- .github/workflows/cppcheck-differential.yaml | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cppcheck-all.yaml b/.github/workflows/cppcheck-all.yaml index 49969b7a5ddae..94f04d2a02f22 100644 --- a/.github/workflows/cppcheck-all.yaml +++ b/.github/workflows/cppcheck-all.yaml @@ -51,7 +51,7 @@ jobs: - name: Upload Cppcheck report uses: actions/upload-artifact@v2 with: - name: latest-cppcheck-report + name: cppcheck-report path: cppcheck-report.xml - name: Fail the job if Cppcheck failed diff --git a/.github/workflows/cppcheck-differential.yaml b/.github/workflows/cppcheck-differential.yaml index fb8bb2b251d52..01223628eb895 100644 --- a/.github/workflows/cppcheck-differential.yaml +++ b/.github/workflows/cppcheck-differential.yaml @@ -36,6 +36,8 @@ jobs: cat changed_files.txt - name: Run Cppcheck on changed files + continue-on-error: true + id: cppcheck run: | files=$(cat changed_files.txt | grep -E '\.(cpp|hpp)$' || true) if [ -n "$files" ]; then @@ -46,3 +48,13 @@ jobs: echo "No C++ files changed." fi shell: bash + + - name: Upload Cppcheck report + uses: actions/upload-artifact@v2 + with: + name: cppcheck-report + path: cppcheck-report.txt + + - name: Fail the job if Cppcheck failed + if: steps.cppcheck.outcome == 'failure' + run: exit 1