Skip to content

Commit 9c66005

Browse files
committed
github: add code checkers
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
1 parent 06ebb88 commit 9c66005

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

.github/workflows/c-cpp.yml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,16 +57,32 @@ jobs:
5757

5858
steps:
5959
- uses: actions/checkout@v3
60+
6061
- name: update apt
6162
run: sudo apt update -y
63+
6264
- name: install compiler
6365
run: sudo apt install -y ${{ matrix.config.deps }}
66+
67+
- name: install tools
68+
run: sudo apt install -y meson ninja-build cppcheck clang-tools
69+
6470
- name: install deps
65-
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
71+
run: |
72+
sudo apt install -y libdrm-dev libegl1-mesa-dev libgles2-mesa-dev libwayland-dev \
73+
libx11-xcb-dev libx11-dev libgbm-dev libevdev-dev libfmt-dev
74+
6675
- name: configure
6776
env:
6877
CC: ${{ matrix.config.cc }}
6978
CXX: ${{ matrix.config.cxx }}
70-
run: meson setup -Dkmscube=true -Dpykms=enabled -Dwerror=true -Db_lto=true build
79+
run: SCANBUILD="/usr/bin/scan-build --status-bugs" meson setup -Dkmscube=true -Dpykms=enabled -Dwerror=true -Db_lto=true build
80+
7181
- name: build
7282
run: ninja -v -C build
83+
84+
- name: Clang static analysis
85+
run: SCANBUILD="/usr/bin/scan-build --status-bugs" ninja -C build scan-build
86+
87+
- name: cppcheck
88+
run: cppcheck --quiet --error-exitcode=1 --suppress=*:/usr/include/* --suppress='*:ext/*' --project=build/compile_commands.json

0 commit comments

Comments
 (0)