From 5f9ad28b6d00b088c2632a3a76bb1c161d429599 Mon Sep 17 00:00:00 2001 From: vrubelroman Date: Wed, 21 Oct 2026 19:27:41 +0300 Subject: [PATCH] CI: show the Windows start log as annotations Co-Authored-By: Claude Opus 5.5 --- .github/workflows/ci.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8eb4e08..1455fb9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -50,9 +50,12 @@ jobs: $p = Start-Process target/release/chesspenguin.exe -PassThru $p | Wait-Process -Timeout 90 -ErrorAction SilentlyContinue Get-Process chesspenguin -ErrorAction SilentlyContinue | Stop-Process -Force - $log = "$env:APPDATA/vrubelroman/ChessPenguin/config/chesspenguin.log" - if (Test-Path $log) { Get-Content $log } - Get-Content "$env:APPDATA/vrubelroman/ChessPenguin/config/graphics" -ErrorAction SilentlyContinue + $dir = "$env:APPDATA/vrubelroman/ChessPenguin/config" + # Annotations: readable on the run page without signing in. + $lines = @("exit code: $($p.ExitCode)") + if (Test-Path "$dir/graphics") { $lines += "graphics: " + (Get-Content "$dir/graphics") } + if (Test-Path "$dir/chesspenguin.log") { $lines += Get-Content "$dir/chesspenguin.log" | Select-Object -First 40 } + foreach ($l in $lines) { Write-Output "::warning title=Windows start::$($l -replace '%','%25')" } if (-not (Test-Path start.png)) { throw "no screenshot: the window did not start" } - uses: actions/upload-artifact@v7 if: always()