From 9c6600529d4e0f6c72bc2429728ab01617fb5349 Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Fri, 12 Sep 2025 18:10:33 +0300 Subject: github: add code checkers Signed-off-by: Tomi Valkeinen --- .github/workflows/c-cpp.yml | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to '.github/workflows/c-cpp.yml') diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index c30e6ba..77221f5 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -57,16 +57,32 @@ jobs: steps: - uses: actions/checkout@v3 + - name: update apt run: sudo apt update -y + - name: install compiler run: sudo apt install -y ${{ matrix.config.deps }} + + - name: install tools + run: sudo apt install -y meson ninja-build cppcheck clang-tools + - name: install deps - run: sudo apt install -y meson ninja-build libdrm-dev libegl1-mesa-dev libgles2-mesa-dev libwayland-dev libx11-xcb-dev libx11-dev libgbm-dev libevdev-dev libfmt-dev + run: | + sudo apt install -y libdrm-dev libegl1-mesa-dev libgles2-mesa-dev libwayland-dev \ + libx11-xcb-dev libx11-dev libgbm-dev libevdev-dev libfmt-dev + - name: configure env: CC: ${{ matrix.config.cc }} CXX: ${{ matrix.config.cxx }} - run: meson setup -Dkmscube=true -Dpykms=enabled -Dwerror=true -Db_lto=true build + run: SCANBUILD="/usr/bin/scan-build --status-bugs" meson setup -Dkmscube=true -Dpykms=enabled -Dwerror=true -Db_lto=true build + - name: build run: ninja -v -C build + + - name: Clang static analysis + run: SCANBUILD="/usr/bin/scan-build --status-bugs" ninja -C build scan-build + + - name: cppcheck + run: cppcheck --quiet --error-exitcode=1 --suppress=*:/usr/include/* --suppress='*:ext/*' --project=build/compile_commands.json -- cgit v1.2.3