diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index fab378c2..621c73da 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -11,7 +11,11 @@ on: jobs: codechecker: name: CodeChecker - runs-on: ubuntu-latest + + # Use latest Ubuntu 24.04 for latest GCC. + # CodeChecker requires gcc >= 13.0.0. + # ubuntu-latest is ubuntu 22.04 (atm) + runs-on: ubuntu-24.04 permissions: actions: read @@ -37,10 +41,18 @@ jobs: config: ${{ github.workspace }}/.codechecker.json - uses: actions/upload-artifact@v4 + id: upload with: name: "CodeChecker Bug Reports" path: ${{ steps.codechecker.outputs.result-html-dir }} - - name: Fail if a warning is found + - name: Fail on Warnings if: ${{ steps.codechecker.outputs.warnings == 'true' }} - run: exit 1 + run: | + cat <>$GITHUB_STEP_SUMMARY + **CodeChecker found warnings.** + Please see the 'CodeChecker Bug Reports' artifact for more details: + [${{ steps.upload.outputs.artifact_url }}] + EOF + + exit 1