Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 32 additions & 24 deletions .github/workflows/base-installer-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
- name: Compute build number
id: build_number
run: |
$lastJenkins = 1100 # The last base build from jenkins, rounded to the next hundred
$lastJenkins = 1000 # The last base build from jenkins, rounded to the nearest thousand
$githubRun = $env:GITHUB_RUN_NUMBER
$combined = $lastJenkins + $githubRun
echo "Calculated build number: $combined"
Expand Down Expand Up @@ -103,17 +103,35 @@ jobs:
fetch-depth: 0
path: 'Localizations/LCM'

- name: Download .NET 461 targeting pack
uses: suisei-cn/actions-download-file@818d6b7dc8fe73f2f924b6241f2b1134ca1377d9 # 1.6.0
id: downloadfile # Remember to give an ID if you need the output filename
with:
url: "https://download.microsoft.com/download/F/1/D/F1DEB8DB-D277-4EF9-9F48-3A65D4D8F965/NDP461-DevPack-KB3105179-ENU.exe"
target: public/
- name: Ensure .NET Framework 4.8 targeting pack
shell: pwsh
run: |
# Check registry Release key for .NET Framework 4.8 (Release >= 528040 indicates 4.8)
$targetRelease = 528040
try {
$releaseKey = (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full" -Name Release -ErrorAction Stop).Release
} catch {
$releaseKey = $null
}

- name: Install .NET 461 targeting pack
shell: cmd
working-directory: public
run: NDP461-DevPack-KB3105179-ENU.exe /q
if (-not $releaseKey -or $releaseKey -lt $targetRelease) {
Write-Host "Detected .NET release $releaseKey. Installing .NET Framework 4.8 Developer Pack..."
$installerUrl = "https://download.microsoft.com/download/9/5/0/9500E0A8-3C76-45F9-8D4B-8D2A7F2C1A3A/NDP48-DevPack-KB4486153-ENU.exe"
$installer = Join-Path $env:RUNNER_TEMP "NDP48-DevPack-KB4486153-ENU.exe"

Invoke-WebRequest -Uri $installerUrl -OutFile $installer -UseBasicParsing -TimeoutSec 120

Write-Host "Starting installer..."
$proc = Start-Process -FilePath $installer -ArgumentList "/quiet","/norestart" -Wait -PassThru
if ($proc.ExitCode -ne 0) {
Write-Error "Failed to install .NET 4.8 Developer Pack. ExitCode: $($proc.ExitCode)"
exit $proc.ExitCode
}
Write-Host ".NET 4.8 Developer Pack installation finished."
}
else {
Write-Host ".NET Framework 4.8 (Release=$releaseKey) already present. Skipping install."
}

- name: Setup dotnet
uses: actions/setup-dotnet@v4
Expand All @@ -134,24 +152,14 @@ 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: Prepare for build
shell: cmd
working-directory: Build
run: build64.bat /t:WriteNonlocalDevelopmentPropertiesFile

- name: Build and run tests
id: build_installer
shell: powershell
run: |
cd Build
.\build64.bat /t:BuildBaseInstaller "/property:config=release;action=test;desktopNotAvailable=true" /v:d /bl ^| tee-object -FilePath build.log
cd ..
cd BuildDir
md5sum *.exe > md5.txt
.\build.ps1 -BuildInstaller -Configuration Release -MsBuildArgs @("/p:action=test;desktopNotAvailable=true","/v:d","/bl") | Tee-Object -FilePath build.log

- name: Scan Build Output
shell: powershell
working-directory: Build
run: |
$results = Select-String -Path "build.log" -Pattern "^\s*[1-9][0-9]* Error\(s\)"
if ($results) {
Expand Down Expand Up @@ -298,5 +306,5 @@ jobs:
if-no-files-found: warn
name: build-logs
path: |
Build/*.log
Build/*.binlog
*.log
*.binlog
56 changes: 33 additions & 23 deletions .github/workflows/patch-installer-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ name: Patch Installer

on:
push:
branches: ["main"]
branches: ["main", "release/**"]
schedule:
# Runs every Monday at 03:30 UTC (which is 8:30pm MST/PDT Sunday evening)
- cron: "30 3 * * 1"
Expand Down Expand Up @@ -118,17 +118,35 @@ jobs:
fetch-depth: 0
path: 'Localizations/LCM'

- name: Download .NET 461 targeting pack
uses: suisei-cn/actions-download-file@818d6b7dc8fe73f2f924b6241f2b1134ca1377d9 # 1.6.0
id: downloadfile # Remember to give an ID if you need the output filename
with:
url: "https://download.microsoft.com/download/F/1/D/F1DEB8DB-D277-4EF9-9F48-3A65D4D8F965/NDP461-DevPack-KB3105179-ENU.exe"
target: public/
- name: Ensure .NET Framework 4.8 targeting pack
shell: pwsh
run: |
# Check registry Release key for .NET Framework 4.8 (Release >= 528040 indicates 4.8)
$targetRelease = 528040
try {
$releaseKey = (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full" -Name Release -ErrorAction Stop).Release
} catch {
$releaseKey = $null
}

- name: Install .NET 461 targeting pack
shell: cmd
working-directory: public
run: NDP461-DevPack-KB3105179-ENU.exe /q
if (-not $releaseKey -or $releaseKey -lt $targetRelease) {
Write-Host "Detected .NET release $releaseKey. Installing .NET Framework 4.8 Developer Pack..."
$installerUrl = "https://download.microsoft.com/download/9/5/0/9500E0A8-3C76-45F9-8D4B-8D2A7F2C1A3A/NDP48-DevPack-KB4486153-ENU.exe"
$installer = Join-Path $env:RUNNER_TEMP "NDP48-DevPack-KB4486153-ENU.exe"

Invoke-WebRequest -Uri $installerUrl -OutFile $installer -UseBasicParsing -TimeoutSec 120

Write-Host "Starting installer..."
$proc = Start-Process -FilePath $installer -ArgumentList "/quiet","/norestart" -Wait -PassThru
if ($proc.ExitCode -ne 0) {
Write-Error "Failed to install .NET 4.8 Developer Pack. ExitCode: $($proc.ExitCode)"
exit $proc.ExitCode
}
Write-Host ".NET 4.8 Developer Pack installation finished."
}
else {
Write-Host ".NET Framework 4.8 (Release=$releaseKey) already present. Skipping install."
}

- name: Setup dotnet
uses: actions/setup-dotnet@v4
Expand Down Expand Up @@ -183,10 +201,8 @@ jobs:
Expand-Archive -Path "base-artifacts/ProcRunner.zip" -DestinationPath $procTarget -Force
Write-Host "Expanded ProcRunner.zip -> $procTarget"

# Write out the properties file (a first build on a system requires a prompt response otherwise)
# and set an OS feature in the registry that will allow Wix v3 to use temporary files without error
# Set an OS feature in the registry that will allow Wix v3 to use temporary files without error
- name: Prepare for build
working-directory: Build
run: |
# Define paths and the key/value to set
$regPaths = @(
Expand All @@ -203,22 +219,16 @@ jobs:
}
New-ItemProperty -Path $path -Name $valueName -Value $expectedValue -Type String -Force
}

.\build64.bat /t:WriteNonlocalDevelopmentPropertiesFile

- name: Build Debug and run tests
id: build_installer
shell: powershell
run: |
Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\.NETFramework\AppContext"
cd Build
.\build64.bat /t:BuildPatchInstaller "/property:config=release;action=test;desktopNotAvailable=true" /v:d /bl ^| tee-object -FilePath build.log
cd ..
cd BuildDir
.\build.ps1 -BuildPatch -Configuration Release -MsBuildArgs @("/p:action=test;desktopNotAvailable=true","/v:d","/bl") | Tee-Object -FilePath build.log

- name: Scan Debug Build Output
shell: powershell
working-directory: Build
run: |
$results = Select-String -Path "build.log" -Pattern "^\s*[1-9][0-9]* Error\(s\)"
if ($results) {
Expand Down Expand Up @@ -281,5 +291,5 @@ jobs:
if-no-files-found: warn
name: build-logs
path: |
Build/*.log
Build/*.binlog
*.log
*.binlog
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ x64
*.user
*.ncrunchsolution
*.ncb
FW.sln
*.suo
*.o
*_ReSharper*
Expand Down Expand Up @@ -89,6 +88,7 @@ buildi686/
buildx86_64/
installi686/
installx86_64/
msbuild.binlog
test-results/
trash/
UpgradeLog*.XML
Expand Down
Loading
Loading