summaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ideasonboard.com>2025-09-12 18:10:33 +0300
committerTomi Valkeinen <tomi.valkeinen@ideasonboard.com>2025-12-18 13:20:16 +0200
commit9c6600529d4e0f6c72bc2429728ab01617fb5349 (patch)
treeceb6d3cd2634697d66cea925a975579d5e9f37c6 /.github/workflows
parent06ebb8835022b92ea64c5b10bdb3f5afbad0e5f8 (diff)
github: add code checkers
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/c-cpp.yml20
1 files changed, 18 insertions, 2 deletions
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