diff --git a/.github/workflows/base-installer-cd.yml b/.github/workflows/base-installer-cd.yml index 709be6dc09..3a7f11b694 100644 --- a/.github/workflows/base-installer-cd.yml +++ b/.github/workflows/base-installer-cd.yml @@ -152,25 +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 -BuildTests -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 50f6af2400..bbcbec76ec 100644 --- a/.github/workflows/patch-installer-cd.yml +++ b/.github/workflows/patch-installer-cd.yml @@ -220,26 +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 -BuildTests -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 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 diff --git a/build.ps1 b/build.ps1 index c1143e4676..ad1424fbf6 100644 --- a/build.ps1 +++ b/build.ps1 @@ -197,7 +197,8 @@ if ($Configuration -eq 'Release' -and -not $isGitHubActions) { } } -# ===========ed Module +# ============================================================================= +# Import FwBuildHelpers Module (for building build tasks) # ============================================================================= $helpersPath = Join-Path $PSScriptRoot "Build/Agent/FwBuildHelpers.psm1" @@ -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" } @@ -596,7 +598,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