From 166708e60f926448d2fe80d0ebaa0064eff3ad9e Mon Sep 17 00:00:00 2001 From: Hasso Date: Thu, 19 Mar 2026 16:36:33 -0500 Subject: [PATCH 1/8] Fail Installer Builds if Tests Fail --- .github/workflows/base-installer-cd.yml | 1 + .github/workflows/patch-installer-cd.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/base-installer-cd.yml b/.github/workflows/base-installer-cd.yml index 709be6dc09..7621d19869 100644 --- a/.github/workflows/base-installer-cd.yml +++ b/.github/workflows/base-installer-cd.yml @@ -157,6 +157,7 @@ jobs: shell: powershell run: | .\build.ps1 -BuildInstaller -Configuration Release -Verbosity detailed -BuildTests -RunTests -TestFilter 'TestCategory!=DesktopRequired' -MsBuildArgs @("/bl") | Tee-Object -FilePath build.log + if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } - name: Scan Build Output shell: powershell diff --git a/.github/workflows/patch-installer-cd.yml b/.github/workflows/patch-installer-cd.yml index 50f6af2400..aeb98830e5 100644 --- a/.github/workflows/patch-installer-cd.yml +++ b/.github/workflows/patch-installer-cd.yml @@ -226,6 +226,7 @@ jobs: run: | Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\.NETFramework\AppContext" .\build.ps1 -BuildPatch -Configuration Release -Verbosity detailed -BuildTests -RunTests -TestFilter 'TestCategory!=DesktopRequired' -MsBuildArgs @("/bl") | Tee-Object -FilePath build.log + if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } - name: Scan Build Output shell: powershell From 7a4514d6bba6efa813de890c13feaf3b4d233eab Mon Sep 17 00:00:00 2001 From: Hasso Date: Fri, 20 Mar 2026 08:57:27 -0500 Subject: [PATCH 2/8] Remove redundant -BuildTests flag it is implied by -RunTests --- .github/workflows/base-installer-cd.yml | 2 +- .github/workflows/patch-installer-cd.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/base-installer-cd.yml b/.github/workflows/base-installer-cd.yml index 7621d19869..8cc6c748f3 100644 --- a/.github/workflows/base-installer-cd.yml +++ b/.github/workflows/base-installer-cd.yml @@ -156,7 +156,7 @@ jobs: id: build_and_test shell: powershell run: | - .\build.ps1 -BuildInstaller -Configuration Release -Verbosity detailed -BuildTests -RunTests -TestFilter 'TestCategory!=DesktopRequired' -MsBuildArgs @("/bl") | Tee-Object -FilePath build.log + .\build.ps1 -BuildInstaller -Configuration Release -Verbosity detailed -RunTests -TestFilter 'TestCategory!=DesktopRequired' -MsBuildArgs @("/bl") | Tee-Object -FilePath build.log if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } - name: Scan Build Output diff --git a/.github/workflows/patch-installer-cd.yml b/.github/workflows/patch-installer-cd.yml index aeb98830e5..56571e491c 100644 --- a/.github/workflows/patch-installer-cd.yml +++ b/.github/workflows/patch-installer-cd.yml @@ -225,7 +225,7 @@ jobs: shell: powershell run: | Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\.NETFramework\AppContext" - .\build.ps1 -BuildPatch -Configuration Release -Verbosity detailed -BuildTests -RunTests -TestFilter 'TestCategory!=DesktopRequired' -MsBuildArgs @("/bl") | Tee-Object -FilePath build.log + .\build.ps1 -BuildPatch -Configuration Release -Verbosity detailed -RunTests -TestFilter 'TestCategory!=DesktopRequired' -MsBuildArgs @("/bl") | Tee-Object -FilePath build.log if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } - name: Scan Build Output From 55aa3a9c116e0cabf456eba503d15f4b763ba393 Mon Sep 17 00:00:00 2001 From: Hasso Date: Fri, 20 Mar 2026 09:45:36 -0500 Subject: [PATCH 3/8] Fail fast on test failure --- build.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.ps1 b/build.ps1 index c1143e4676..97db31b124 100644 --- a/build.ps1 +++ b/build.ps1 @@ -555,6 +555,7 @@ try { $script:testExitCode = 0 } elseif ($script:testExitCode -ne 0) { Write-Warning "Some tests failed (exit code: $($script:testExitCode)). Check output above for details." + exit $testExitCode } } @@ -615,5 +616,4 @@ finally { } if ($testExitCode -ne 0) { - exit $testExitCode } From 9af8f6e0e03858b5a2f66bf2f89904b417789a75 Mon Sep 17 00:00:00 2001 From: Hasso Date: Fri, 20 Mar 2026 09:55:09 -0500 Subject: [PATCH 4/8] Allow dereferencing "$BaseOrPatch Build" --- build.ps1 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/build.ps1 b/build.ps1 index 97db31b124..51f569d89c 100644 --- a/build.ps1 +++ b/build.ps1 @@ -197,6 +197,7 @@ if ($Configuration -eq 'Release' -and -not $isGitHubActions) { } } +# REVIEW (HASSO) 2026.03: what happened to the rest of this comment? # ===========ed Module # ============================================================================= @@ -384,6 +385,7 @@ try { $finalMsBuildArgs += "/p:BuildNativeTests=true" } + # REVIEW (Hasso) 2026.03: do we want to build additional apps for the installer? (moot, because the installer shouldn't be rebuilding stuff) if ($BuildAdditionalApps) { $finalMsBuildArgs += "/p:BuildAdditionalApps=true" } @@ -597,7 +599,7 @@ try { Invoke-MSBuild ` -Arguments (@('Build/InstallerBuild.proj', "/t:Build$BaseOrPatch", '/p:config=release', "/p:InstallerToolset=$InstallerToolset", $installerCleanArg) + ` $InstallerMsBuildArgs) ` - -Description '$BaseOrPatch Build' ` + -Description "$BaseOrPatch Build" ` -LogPath $LogFile ` -TailLines $TailLines From e3f18003a7890929174f1e0c6b968f5e5d48b205 Mon Sep 17 00:00:00 2001 From: Hasso Date: Fri, 20 Mar 2026 12:14:57 -0500 Subject: [PATCH 5/8] Separate test and install builds Failing tests were not failing installer builds. Now they do. --- .github/workflows/base-installer-cd.yml | 18 ++++-------------- .github/workflows/patch-installer-cd.yml | 19 ++++--------------- 2 files changed, 8 insertions(+), 29 deletions(-) diff --git a/.github/workflows/base-installer-cd.yml b/.github/workflows/base-installer-cd.yml index 8cc6c748f3..3a7f11b694 100644 --- a/.github/workflows/base-installer-cd.yml +++ b/.github/workflows/base-installer-cd.yml @@ -152,26 +152,16 @@ jobs: echo "C:\Program Files (x86)\WiX Toolset v3.11\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append if: github.event_name != 'pull_request' - - name: Build and test - id: build_and_test + - name: Build and run tests shell: powershell run: | - .\build.ps1 -BuildInstaller -Configuration Release -Verbosity detailed -RunTests -TestFilter 'TestCategory!=DesktopRequired' -MsBuildArgs @("/bl") | Tee-Object -FilePath build.log + .\test.ps1 -Configuration Release -Verbosity detailed -TestFilter 'TestCategory!=DesktopRequired' | Tee-Object -FilePath test.log if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } - - name: Scan Build Output + - name: Build installer shell: powershell run: | - $results = Select-String -Path "build.log" -Pattern "^\s*[1-9][0-9]* Error\(s\)" - if ($results) { - foreach ($result in $results) { - Write-Host "Found errors in build.log $($result.LineNumber): $($result.Line)" -ForegroundColor red - } - exit 1 - } else { - Write-Host "No errors found" -ForegroundColor green - exit 0 - } + .\build.ps1 -BuildInstaller -Configuration Release -Verbosity detailed -MsBuildArgs @("/bl") | Tee-Object -FilePath build.log - name: Move installers to staging folder id: stage_installers diff --git a/.github/workflows/patch-installer-cd.yml b/.github/workflows/patch-installer-cd.yml index 56571e491c..bbcbec76ec 100644 --- a/.github/workflows/patch-installer-cd.yml +++ b/.github/workflows/patch-installer-cd.yml @@ -220,27 +220,16 @@ jobs: New-ItemProperty -Path $path -Name $valueName -Value $expectedValue -Type String -Force } - - name: Build and test - id: build_and_test + - name: Build and run tests shell: powershell run: | - Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\.NETFramework\AppContext" - .\build.ps1 -BuildPatch -Configuration Release -Verbosity detailed -RunTests -TestFilter 'TestCategory!=DesktopRequired' -MsBuildArgs @("/bl") | Tee-Object -FilePath build.log + .\test.ps1 -Configuration Release -Verbosity detailed -TestFilter 'TestCategory!=DesktopRequired' | Tee-Object -FilePath test.log if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } - - name: Scan Build Output + - name: Build patch installer shell: powershell run: | - $results = Select-String -Path "build.log" -Pattern "^\s*[1-9][0-9]* Error\(s\)" - if ($results) { - foreach ($result in $results) { - Write-Host "Found errors in build.log $($result.LineNumber): $($result.Line)" -ForegroundColor red - } - exit 1 - } else { - Write-Host "No errors found" -ForegroundColor green - exit 0 - } + .\build.ps1 -BuildPatch -Configuration Release -Verbosity detailed -MsBuildArgs @("/bl") | Tee-Object -FilePath build.log - name: Find patch installer id: find_patch From 23db57a85e31ad57376a20d02eaa50c8b4d149ef Mon Sep 17 00:00:00 2001 From: Hasso Date: Wed, 18 Mar 2026 15:27:18 -0500 Subject: [PATCH 6/8] Ignore test residue --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 5ed27ca330..47476587d9 100644 --- a/.gitignore +++ b/.gitignore @@ -63,6 +63,7 @@ _user.mak.lnx *.usertasks *.resources *.bak +*.fwdata.lock *.swp *.pyc *.log From 6bf009bc8f7db24cebfd93ffca388b92438edfba Mon Sep 17 00:00:00 2001 From: Hasso Date: Wed, 25 Mar 2026 10:33:08 -0500 Subject: [PATCH 7/8] Revert "Fail fast on test failure" This reverts commit 68b3d014beb933e96e2c694c5f57cb9a2819b548. That commit didn't fix CD builds. --- build.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.ps1 b/build.ps1 index 51f569d89c..5a6d63e3b5 100644 --- a/build.ps1 +++ b/build.ps1 @@ -557,7 +557,6 @@ try { $script:testExitCode = 0 } elseif ($script:testExitCode -ne 0) { Write-Warning "Some tests failed (exit code: $($script:testExitCode)). Check output above for details." - exit $testExitCode } } @@ -618,4 +617,5 @@ finally { } if ($testExitCode -ne 0) { + exit $testExitCode } From d35c964bb0e847d19307cb29eed45b502793c0b4 Mon Sep 17 00:00:00 2001 From: Hasso Date: Wed, 25 Mar 2026 10:45:11 -0500 Subject: [PATCH 8/8] fix garbled comment --- build.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.ps1 b/build.ps1 index 5a6d63e3b5..ad1424fbf6 100644 --- a/build.ps1 +++ b/build.ps1 @@ -197,8 +197,8 @@ if ($Configuration -eq 'Release' -and -not $isGitHubActions) { } } -# REVIEW (HASSO) 2026.03: what happened to the rest of this comment? -# ===========ed Module +# ============================================================================= +# Import FwBuildHelpers Module (for building build tasks) # ============================================================================= $helpersPath = Join-Path $PSScriptRoot "Build/Agent/FwBuildHelpers.psm1"