Skip to content

Commit

Permalink
Update Windows runners to 2022
Browse files Browse the repository at this point in the history
  • Loading branch information
jdpurcell committed Jun 26, 2024
1 parent e076dc7 commit b364675
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,18 @@ jobs:
- runner: 'macos-12'
qtVersion: '5.15.2'
osSuffix: '_legacy'
- runner: 'windows-2019'
- runner: 'windows-2022'
qtVersion: '6.5.3'
qtArch: 'win64_msvc2019_64'
osSuffix: '_64'
qtModules: 'qtimageformats'
- runner: 'windows-2019'
- runner: 'windows-2022'
qtVersion: '6.5.3'
qtArch: 'win64_msvc2019_arm64'
osSuffix: '_arm64'
qtModules: 'qtimageformats'
buildArch: 'Arm64'
- runner: 'windows-2019'
- runner: 'windows-2022'
qtVersion: '5.15.2'
qtArch: 'win32_msvc2019'
osSuffix: '_32'
Expand Down
2 changes: 1 addition & 1 deletion dist/scripts/download-plugins.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Write-Host "Detected Qt Version $qtVersion"

# Qt version availability and runner names are assumed.
if ($IsWindows) {
$imageName = "windows-2019"
$imageName = "windows-2022"
} elseif ($IsMacOS) {
$imageName = "macos-12"
} else {
Expand Down
11 changes: 6 additions & 5 deletions dist/scripts/vcvars.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@ $arch =
$env:buildArch -eq 'X86' ? 'x64_x86' :
$env:buildArch -eq 'Arm64' ? 'x64_arm64' :
'x64'
$path = Resolve-Path "${env:ProgramFiles(x86)}\Microsoft Visual Studio\*\*\VC\Auxiliary\Build" | select -ExpandProperty Path
$path = Resolve-Path "${env:ProgramFiles}\Microsoft Visual Studio\*\*\VC\Auxiliary\Build" | Select-Object -ExpandProperty Path

cmd.exe /c "call `"$path\vcvarsall.bat`" $arch && set > %temp%\vcvars.txt"

$exclusions = @('VCPKG_ROOT') # Workaround for https://developercommunity.visualstudio.com/t/VCPKG_ROOT-is-being-overwritten-by-the-D/10430650
Get-Content "$env:temp\vcvars.txt" | Foreach-Object {
if ($_ -match "^(.*?)=(.*)$") {
Set-Content "env:\$($matches[1])" $matches[2]
}
}
if ($_ -match "^(.*?)=(.*)$" -and $matches[1] -notin $exclusions) {
[Environment]::SetEnvironmentVariable($matches[1], $matches[2])
}
}

0 comments on commit b364675

Please sign in to comment.