Skip to content

Commit 376c52c

Browse files
committed
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.
1 parent d230e87 commit 376c52c

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

.github/workflows/windows.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,12 @@ jobs:
4646
if ($LastExitCode -ne 0) { throw "Error during build" }
4747
& powershell.exe .\tools\win32\test.ps1
4848
if ($LastExitCode -ne 0) { throw "Error during test" }
49+
50+
- name: Show Log Files
51+
if: ${{ always() }}
52+
run: |
53+
foreach ($file in Get-ChildItem -Recurse -Filter "*.log") {
54+
Write-Host "::group::$($file.FullName)"
55+
Get-Content $file.FullName
56+
Write-Host "::endgroup::"
57+
}

0 commit comments

Comments
 (0)