From 664b4a966353a009a8f48703bde83d2bab7c98d9 Mon Sep 17 00:00:00 2001 From: Richard Date: Sun, 18 Feb 2024 17:39:54 -0700 Subject: [PATCH] Merge workflows Use a single workflow with a build and cppcheck job --- .github/workflows/cmake.yml | 32 +++++++++++++++++++++++++++++++ .github/workflows/cppcheck.yml | 35 ---------------------------------- 2 files changed, 32 insertions(+), 35 deletions(-) delete mode 100644 .github/workflows/cppcheck.yml diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 6b56c4619..32edf7b65 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -36,3 +36,35 @@ jobs: - name: CMake workflow run: cmake --workflow --preset default + + cppcheck: + name: cppcheck + runs-on: ubuntu-latest + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Configure Compilation Database + run: cmake --preset cppcheck + + - name: Run CppCheck + uses: deep5050/cppcheck-action@v3.0 + with: + github_token: ${{secrets.GITHUB_TOKEN}} + enable: 'style' + force: 'enable' + other_options: >- + --suppress=commaSeparatedReturn + --suppress=cstyleCast + --suppress=functionStatic + --suppress=incorrectStringBooleanError + --suppress=invalidPointerCast + --suppress=invalidscanf + --suppress=variableHidingEnum + --suppress=variableScope + --inline-suppr + -I headers hc common headers unix win32 + -ifractint + + - name: Print Report + run: cmake -E cat cppcheck_report.txt diff --git a/.github/workflows/cppcheck.yml b/.github/workflows/cppcheck.yml deleted file mode 100644 index 95440145c..000000000 --- a/.github/workflows/cppcheck.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: CppCheck Analysis -on: [push] - -jobs: - build: - name: cppcheck - runs-on: ubuntu-latest - steps: - - name: Checkout Repository - uses: actions/checkout@v4 - - - name: Configure Compilation Database - run: cmake --preset cppcheck - - - name: Run CppCheck - uses: deep5050/cppcheck-action@v3.0 - with: - github_token: ${{secrets.GITHUB_TOKEN}} - enable: 'style' - force: 'enable' - other_options: >- - --suppress=commaSeparatedReturn - --suppress=cstyleCast - --suppress=functionStatic - --suppress=incorrectStringBooleanError - --suppress=invalidPointerCast - --suppress=invalidscanf - --suppress=variableHidingEnum - --suppress=variableScope - --inline-suppr - -I headers hc common headers unix win32 - -ifractint - - - name: Print Report - run: cmake -E cat cppcheck_report.txt