pacman-key --init
pacman -Syu --noconfirm
pacman -S --noconfirm git meson clang wlroots libdrm libinput \
- wayland-protocols cairo pango libxml2 xorg-xwayland librsvg libdisplay-info
+ wayland-protocols cairo pango libxml2 xorg-xwayland librsvg \
+ libdisplay-info
- name: Install Debian Testing dependencies
if: matrix.name == 'Debian'
sed -i '/^Types/ s/deb/& deb-src/' /etc/apt/sources.list.d/debian.sources
apt-get update
apt-get upgrade -y
- apt-get install -y git gcc clang
+ apt-get install -y git gcc clang gdb xwayland
apt-get build-dep -y labwc
- name: Install FreeBSD dependencies
xbps-install -Syu
xbps-install -y git meson gcc clang pkg-config scdoc \
cairo-devel glib-devel libpng-devel librsvg-devel libxml2-devel \
- pango-devel wlroots0.17-devel
+ pango-devel wlroots0.17-devel gdb bash xorg-server-xwayland
+ # These build are executed on all runners
- name: Build with gcc
run: |
echo '
meson compile -C build-gcc-release
' | $TARGET
+ # Runtime tests, these run on Debian and Void only (the later due to libmusl being used)
- name: Build with clang - release
run: |
echo '
-Dbuildtype=release -Db_ndebug=true --werror
meson compile -C build-clang-release
' | $TARGET
+
+ - name: Build with gcc - runtime test
+ if: matrix.name == 'Debian'
+ run: |
+ echo '
+ cd "$GITHUB_WORKSPACE"
+ export CC=gcc
+ meson setup build-gcc-ci -Dxwayland=enabled -Db_sanitize=undefined --werror
+ meson compile -C build-gcc-ci
+ scripts/ci/smoke-test.sh build-gcc-ci
+ ' | $TARGET
+
+ - name: Build with clang - runtime test
+ if: matrix.name == 'Debian'
+ run: |
+ echo '
+ cd "$GITHUB_WORKSPACE"
+ export CC=clang
+ meson setup build-clang-ci -Dxwayland=enabled -Db_sanitize=undefined --werror
+ meson compile -C build-clang-ci
+ scripts/ci/smoke-test.sh build-clang-ci
+ ' | $TARGET
+
+ # Void-musl doesn't support sanitizer
+ - name: Build with gcc - runtime test w/o sanitizer
+ if: matrix.name == 'Void-musl'
+ run: |
+ echo '
+ cd "$GITHUB_WORKSPACE"
+ export CC=gcc
+ meson setup build-gcc-ci -Dxwayland=enabled --werror
+ meson compile -C build-gcc-ci
+ scripts/ci/smoke-test.sh build-gcc-ci
+ ' | $TARGET
--- /dev/null
+#!/usr/bin/env bash
+
+if ! test -x "$1/labwc"; then
+ echo "$1/labwc not found"
+ exit 1
+fi
+
+args=(
+ "$1/labwc"
+ -C scripts/ci
+ -d
+)
+
+export XDG_RUNTIME_DIR=$(mktemp -d)
+export WLR_BACKENDS=headless
+
+echo "Starting ${args[@]}"
+output=$("${args[@]}" 2>&1)
+ret=$?
+
+if test $ret -ge 128; then
+ # Not using -Db_sanitize=address,undefined
+ # because it slows down the usual execution
+ # way too much and spams pages over pages
+ # of irrelevant memory-still-in-use logs
+ # for external libraries.
+ #
+ # Not using coredumps either because they
+ # are a pain to setup on GH actions and
+ # just running labwc again is a lot faster
+ # anyway.
+
+ echo
+ echo "labwc crashed, restarting under gdb"
+ echo
+ gdb --batch \
+ -ex run \
+ -ex 'bt full' \
+ -ex 'echo \n' \
+ -ex 'echo "Local vars:\n' \
+ -ex 'info locals' \
+ -ex 'echo \n' \
+ -ex 'set listsize 50' \
+ -ex list \
+ --args "${args[@]}"
+else
+ echo "$output"
+fi
+
+echo "labwc terminated with return code $ret"
+exit $ret