From 6cad16991e84c396de8a8692112959e53e697546 Mon Sep 17 00:00:00 2001 From: hashlag Date: Mon, 12 Oct 2026 02:39:27 +0300 Subject: [PATCH] CI: introduce static-analysis job. --- .gitea/workflows/ChaosCi.yaml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/.gitea/workflows/ChaosCi.yaml b/.gitea/workflows/ChaosCi.yaml index ab45374..da1e6ab 100644 --- a/.gitea/workflows/ChaosCi.yaml +++ b/.gitea/workflows/ChaosCi.yaml @@ -58,6 +58,38 @@ jobs: include-hidden-files: true retention-days: 10 + static-analysis: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + submodules: true + + - name: Install + run: | + sudo apt-get update + sudo apt-get install -y build-essential cmake cppcheck + + - name: Generate compile commands + run: | + mkdir build-debug + cmake -S . -B build-debug/ -D CMAKE_BUILD_TYPE=Debug -D CMAKE_EXPORT_COMPILE_COMMANDS=ON + + - name: Run cppcheck + run: | + cppcheck --version + cppcheck --project=build-debug/compile_commands.json \ + --file-filter="$PWD/Chaos/*" \ + --file-filter="$PWD/ChaosTests/*" \ + --file-filter="$PWD/ChaosBenches/*" \ + --enable=warning,performance,portability \ + --suppress='*:*/_deps/*' \ + --suppress=missingIncludeSystem \ + --inline-suppr \ + --error-exitcode=1 + benchmark: runs-on: ubuntu-latest