From 46bd1fef95eccf372ad5ea26105f8b1dfba1f1d9 Mon Sep 17 00:00:00 2001 From: tokyo4j Date: Mon, 29 Sep 2025 16:13:37 +0900 Subject: [PATCH] CI: add unit tests --- .github/workflows/build.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2b76b4d2..0cf69f85 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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'