Skip to content

Commit a8015e5

Browse files
jasonleenaylorclaudeCopilot
authored
Add MSBuild log analyzer to CI workflows (#932)
Replace the simple grep-based "Scan Build Output" step in both patch-installer-cd.yml and base-installer-cd.yml with a Python analyzer that streams the build log, identifies root-cause failures with context, and surfaces them directly in the GitHub Actions job summary via GITHUB_STEP_SUMMARY and ::error:: annotations. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent adaf394 commit a8015e5

4 files changed

Lines changed: 680 additions & 24 deletions

File tree

.github/workflows/base-installer-cd.yml

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -163,19 +163,11 @@ jobs:
163163
run: |
164164
.\test.ps1 -Configuration Release -NoBuild -TestFilter 'TestCategory!=DesktopRequired' *>&1 | Tee-Object -FilePath test.log
165165
166-
- name: Scan Build Output
167-
shell: powershell
166+
- name: Analyze Build Log
167+
if: always() && steps.build.outcome != 'skipped'
168+
shell: pwsh
168169
run: |
169-
$results = Select-String -Path "build.log" -Pattern "^\s*[1-9][0-9]* Error\(s\)"
170-
if ($results) {
171-
foreach ($result in $results) {
172-
Write-Host "Found errors in build.log $($result.LineNumber): $($result.Line)" -ForegroundColor red
173-
}
174-
exit 1
175-
} else {
176-
Write-Host "No errors found" -ForegroundColor green
177-
exit 0
178-
}
170+
python scripts/tools/analyze_build_log.py build.log --workspace "${{ github.workspace }}"
179171
180172
- name: Move installers to staging folder
181173
id: stage_installers

.github/workflows/patch-installer-cd.yml

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -232,19 +232,11 @@ jobs:
232232
run: |
233233
.\test.ps1 -Configuration Release -NoBuild -TestFilter 'TestCategory!=DesktopRequired' *>&1 | Tee-Object -FilePath test.log
234234
235-
- name: Scan Build Output
236-
shell: powershell
235+
- name: Analyze Build Log
236+
if: always() && steps.build.outcome != 'skipped'
237+
shell: pwsh
237238
run: |
238-
$results = Select-String -Path "build.log" -Pattern "^\s*[1-9][0-9]* Error\(s\)"
239-
if ($results) {
240-
foreach ($result in $results) {
241-
Write-Host "Found errors in build.log $($result.LineNumber): $($result.Line)" -ForegroundColor red
242-
}
243-
exit 1
244-
} else {
245-
Write-Host "No errors found" -ForegroundColor green
246-
exit 0
247-
}
239+
python scripts/tools/analyze_build_log.py build.log --workspace "${{ github.workspace }}"
248240
249241
- name: Find patch installer
250242
id: find_patch

0 commit comments

Comments
 (0)