diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0ea7fa7..2e67c88 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -49,7 +49,7 @@ jobs: $env:MULBERRY_SELFTEST = "$PWD\selftest-windows" $p = Start-Process build/dist/Mulberry/Mulberry.exe -PassThru if (-not $p.WaitForExit(90000)) { Stop-Process $p.Id; throw "Mulberry did not finish the self-test" } - if (-not (Test-Path selftest-windows.png)) { throw "no screenshot - the app failed to start" } + if (-not (Test-Path selftest-windows.png)) { Write-Output "::error title=Windows self-test::no screenshot"; throw "no screenshot - the app failed to start" } Get-Content selftest-windows.txt - uses: actions/upload-artifact@v4 with: @@ -92,9 +92,14 @@ jobs: run: pyinstaller packaging/mulberry.spec --noconfirm --distpath build/dist --workpath build/work - name: Self-test (launch the built app, screenshot, quit) run: | - sudo apt-get install -y xvfb libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-shape0 libxcb-xinerama0 libxcb-xkb1 libxkbcommon-x11-0 >/dev/null - MULBERRY_SELFTEST=$PWD/selftest-linux timeout 90 xvfb-run -a build/dist/Mulberry/mulberry - test -f selftest-linux.png && cat selftest-linux.txt + set +e + QT_QPA_PLATFORM=offscreen MULBERRY_SELFTEST=$PWD/selftest-linux timeout 90 dbus-run-session -- build/dist/Mulberry/mulberry > selftest-linux.log 2>&1 + rc=$? + if [ ! -f selftest-linux.png ]; then + echo "::error title=Linux self-test failed (rc=$rc)::$(tail -c 3000 selftest-linux.log | tr '\n' '|')" + exit 1 + fi + cat selftest-linux.txt - uses: actions/upload-artifact@v4 with: name: selftest-linux