CI: run the Linux self-test offscreen and surface errors as annotations
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J7imThHV9BMkG24GaxPDeq
This commit is contained in:
parent
393fb22621
commit
3cb200048d
1 changed files with 9 additions and 4 deletions
13
.github/workflows/build.yml
vendored
13
.github/workflows/build.yml
vendored
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue