Skip to content

Commit

Permalink
try out CodeChecker
Browse files Browse the repository at this point in the history
  • Loading branch information
ardera committed Sep 15, 2024
1 parent 51dbd71 commit 1698273
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/codeql-buildscript.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ $WRAPPER cmake \
-DBUILD_GSTREAMER_VIDEO_PLAYER_PLUGIN=ON \
-DBUILD_GSTREAMER_AUDIO_PLAYER_PLUGIN=ON \
-DENABLE_VULKAN=ON \
-DENABLE_SESSION_SWITCHING=ON
-DENABLE_SESSION_SWITCHING=ON \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON

$WRAPPER cmake --build build
47 changes: 46 additions & 1 deletion .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,17 @@ jobs:
WRAPPER: "scan-build --use-cc=cc --use-c++=c++ -sarif -o build/sarif"
run: |
./.github/workflows/codeql-buildscript.sh
- name: Install Deps, Configure and Build
env:
WRAPPER: "scan-build --use-cc=cc --use-c++=c++ -o build/scan-build-html"
run: |
./.github/workflows/codeql-buildscript.sh
- uses: actions/upload-artifact@v2
with:
name: "Scan-Build Bug Reports"
path: ${{ github.workspace }}/build/scan-build-html

- name: Bundle sarif
run: |
Expand All @@ -116,4 +127,38 @@ jobs:

- name: Fail if a warning is found
run: |
./.github/workflows/fail_on_warning.py build/sarif/merged.sarif
./.github/workflows/fail_on_warning.py build/sarif/merged.sarif
codechecker:
name: CodeChecker
runs-on: ubuntu-latest

permissions:
actions: read
contents: read
security-events: write

steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: recursive

- name: Install Deps, Configure and Build
run: |
./.github/workflows/codeql-buildscript.sh
- name: Run CodeChecker
id: codechecker
with:
ctu: true
logfile: ${{ github.workspace }}/build/compile_commands.json

- uses: actions/upload-artifact@v2
with:
name: "CodeChecker Bug Reports"
path: ${{ steps.codechecker.outputs.result-html-dir }}

- name: Fail if a warning is found
if: ${{ steps.codechecker.outputs.warnings == 'true' }}
run: exit 1

0 comments on commit 1698273

Please sign in to comment.