diff options
Diffstat (limited to '.github/scripts/epoxy-ci-linux.sh')
-rwxr-xr-x | .github/scripts/epoxy-ci-linux.sh | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/.github/scripts/epoxy-ci-linux.sh b/.github/scripts/epoxy-ci-linux.sh new file mode 100755 index 0000000..e95584f --- /dev/null +++ b/.github/scripts/epoxy-ci-linux.sh @@ -0,0 +1,32 @@ +#!/bin/bash + +dump_log_and_quit() { + local exitcode=$1 + + cat meson-logs/testlog.txt + + exit $exitcode +} + +# Start Xvfb +XVFB_WHD=${XVFB_WHD:-1280x720x16} + +Xvfb :99 -ac -screen 0 $XVFB_WHD -nolisten tcp & +xvfb=$! + +export DISPLAY=:99 + +srcdir=$( pwd ) +builddir=$( mktemp -d build_XXXXXX ) + +meson --prefix /usr "$@" $builddir $srcdir || exit $? + +cd $builddir + +ninja || exit $? +meson test || dump_log_and_quit $? + +cd .. + +# Stop Xvfb +kill -9 ${xvfb} |