From 5a464afdaa2e250341468b497f3a4cf36597c9a5 Mon Sep 17 00:00:00 2001 From: Julian Brost Date: Wed, 14 May 2025 09:56:57 +0200 Subject: [PATCH] GitHub Actions: Show log files in Windows jobs If CPack fails, it may write the actual errors to a dedicated log file: EXEC : CPack error : Problem running WiX. Please check 'D:/a/icinga2/icinga2/Build/_CPack_Packages/win64/WIX/wix.log' for errors. [D:\a\icinga2\icinga2\Build\PACKAGE.vcxproj] Show all `*.log` files as part of the job output so that it doesn't get lost. --- .github/workflows/windows.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 5d682be3d..b04deaaab 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -46,3 +46,12 @@ jobs: if ($LastExitCode -ne 0) { throw "Error during build" } & powershell.exe .\tools\win32\test.ps1 if ($LastExitCode -ne 0) { throw "Error during test" } + + - name: Show Log Files + if: ${{ always() }} + run: | + foreach ($file in Get-ChildItem -Recurse -Filter "*.log") { + Write-Host "::group::$($file.FullName)" + Get-Content $file.FullName + Write-Host "::endgroup::" + }