CI: add unit tests

This commit is contained in:
tokyo4j 2025-09-29 16:13:37 +09:00 committed by Johan Malm
parent 7e27f78662
commit 46bd1fef95

View file

@ -82,7 +82,7 @@ jobs:
pacman -Syu --noconfirm
pacman -S --noconfirm git meson clang wlroots0.19 libdrm libinput \
wayland-protocols cairo pango libxml2 xorg-xwayland librsvg \
libdisplay-info gdb ttf-dejavu foot libsfdo
libdisplay-info gdb ttf-dejavu foot libsfdo cmocka
- name: Install Debian Testing dependencies
if: matrix.name == 'Debian'
@ -207,6 +207,18 @@ jobs:
meson compile -C build-gcc-no-feature
' | $TARGET
# Unit tests, run on Arch only
- name: Build with gcc - unit test
if: matrix.name == 'Arch'
run: |
echo '
cd "$GITHUB_WORKSPACE"
export CC=gcc
meson setup build-gcc-unit-test -Dtest=enabled --werror
meson compile -C build-gcc-unit-test
meson test -C build-gcc-unit-test --print-errorlogs
' | $TARGET
# Runtime tests, these run on Arch and Void only (the later due to libmusl being used)
- name: Build with gcc - runtime test
if: matrix.name == 'Arch'