Skip to content

Commit

Permalink
Switch to windows-2022 hosted runners (#3056)
Browse files Browse the repository at this point in the history
Co-authored-by: Rafael Rivera <rafael@withinwindows.com>
  • Loading branch information
kennykerr and riverar authored May 25, 2024
1 parent ccd334f commit 92e4fd7
Show file tree
Hide file tree
Showing 9 changed files with 43 additions and 21 deletions.
28 changes: 21 additions & 7 deletions .github/actions/fix-environment/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ runs:
- name: Configure environment
shell: pwsh
run: |
$vs_root = & "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" `
-latest -property installationPath -format value
switch -Wildcard ("${{ matrix.target }}")
{
"*-pc-windows-gnu"
Expand All @@ -26,27 +29,38 @@ runs:
}
"i686*"
{
"C:\Program Files (x86)\Windows Kits\10\bin\10.0.22000.0\x86" >> $env:GITHUB_PATH
((Resolve-Path "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\*\bin\Hostx86\x86")
"${env:ProgramFiles(x86)}\Windows Kits\10\bin\10.0.22000.0\x86" >> $env:GITHUB_PATH
((Resolve-Path "$vs_root\VC\Tools\MSVC\*\bin\Hostx86\x86")
| Sort-Object -Descending | Select -First 1).ToString() >> $env:GITHUB_PATH
}
"x86_64*"
{
"C:\Program Files (x86)\Windows Kits\10\bin\10.0.22000.0\x64" >> $env:GITHUB_PATH
((Resolve-Path "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\*\bin\Hostx64\x64")
"${env:ProgramFiles(x86)}\Windows Kits\10\bin\10.0.22000.0\x64" >> $env:GITHUB_PATH
((Resolve-Path "$vs_root\VC\Tools\MSVC\*\bin\Hostx64\x64")
| Sort-Object -Descending | Select -First 1).ToString() >> $env:GITHUB_PATH
}
"aarch64*"
{
"C:\Program Files (x86)\Windows Kits\10\bin\10.0.22000.0\x64" >> $env:GITHUB_PATH
((Resolve-Path "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\*\bin\Hostx64\x64")
"${env:ProgramFiles(x86)}\Windows Kits\10\bin\10.0.22000.0\x64" >> $env:GITHUB_PATH
((Resolve-Path "$vs_root\VC\Tools\MSVC\*\bin\Hostx64\x64")
| Sort-Object -Descending | Select -First 1).ToString() >> $env:GITHUB_PATH
}
"*"
{
(Join-Path $env:GITHUB_WORKSPACE "target\debug\deps").ToString() >> $env:GITHUB_PATH
(Join-Path $env:GITHUB_WORKSPACE "target\test\debug\deps").ToString() >> $env:GITHUB_PATH
"INCLUDE=C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\winrt;C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\cppwinrt" `
"INCLUDE=${env:ProgramFiles(x86)}\Windows Kits\10\include\10.0.22000.0\winrt;${env:ProgramFiles(x86)}\Windows Kits\10\include\10.0.22000.0\cppwinrt" `
>> $env:GITHUB_ENV
}
}
# Workaround to address several issues with windows-2022 runners:
# - Old mingw-w64-* binutils that prevent deterministic builds.
# - Missing llvm-dlltool in the native Windows LLVM package.
# - Missing mingw-w64 compiler packages.
- name: Update packages
shell: pwsh
run: |
C:\msys64\usr\bin\pacman.exe -S --noconfirm mingw-w64-x86_64-binutils
C:\msys64\usr\bin\pacman.exe -S --noconfirm mingw-w64-x86_64-llvm
C:\msys64\usr\bin\pacman.exe -S --noconfirm mingw-w64-i686-gcc
C:\msys64\usr\bin\pacman.exe -S --noconfirm mingw-w64-x86_64-gcc
2 changes: 1 addition & 1 deletion .github/workflows/clippy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ env:

jobs:
check:
runs-on: windows-2019
runs-on: windows-2022

strategy:
matrix:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/debugger_visualizer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ env:

jobs:
check:
runs-on: windows-2019
runs-on: windows-2022

strategy:
matrix:
Expand Down
18 changes: 13 additions & 5 deletions .github/workflows/lib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ env:

jobs:
check:
runs-on: windows-2019
runs-on: windows-2022
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -27,22 +27,30 @@ jobs:
set PATH=C:\msys64\mingw64\bin;%PATH%
cargo run -p tool_gnu -- all
- name: Find Visual Studio
id: visual-studio
shell: pwsh
run: |
$path = & "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" `
-latest -property installationPath -format value
"install_path=$path" | Out-File -FilePath $env:GITHUB_OUTPUT -Append
- name: Build i686_msvc
shell: cmd
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars32.bat" x86
call "${{steps.visual-studio.outputs.install_path}}\VC\Auxiliary\Build\vcvars32.bat" x86
cargo run -p tool_msvc
- name: Build x86_64_msvc
shell: cmd
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars32.bat" amd64
call "${{steps.visual-studio.outputs.install_path}}\VC\Auxiliary\Build\vcvars32.bat" amd64
cargo run -p tool_msvc
- name: Build aarch64_msvc
shell: cmd
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars32.bat" amd64_arm64
call "${{steps.visual-studio.outputs.install_path}}\VC\Auxiliary\Build\vcvars32.bat" amd64_arm64
cargo run -p tool_msvc
- name: Upload libs
Expand All @@ -60,7 +68,7 @@ jobs:
- name: Check dumpbin
shell: pwsh
run: |
$VisualStudioRoot = & vswhere -latest -property installationPath -format value
$VisualStudioRoot = "${{steps.visual-studio.outputs.install_path}}"
$DumpbinPath = Resolve-Path "$VisualStudioRoot\VC\Tools\MSVC\*\bin\*\x86\dumpbin.exe" |
Select -ExpandProperty Path -First 1
$Tests = @(
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/msrv-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
matrix:
rust: [1.70.0, stable, nightly]
runs-on:
- windows-2019
- windows-2022
- ubuntu-latest
runs-on: ${{ matrix.runs-on }}
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/no-default-features.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ env:

jobs:
check:
runs-on: windows-2019
runs-on: windows-2022

strategy:
matrix:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/raw_dylib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ env:

jobs:
check:
runs-on: windows-2019
runs-on: windows-2022

strategy:
matrix:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ env:

jobs:
check:
runs-on: windows-2019
runs-on: windows-2022

strategy:
matrix:
Expand Down
6 changes: 3 additions & 3 deletions crates/tools/yml/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ env:
jobs:
check:
runs-on: windows-2019
runs-on: windows-2022
strategy:
matrix:
Expand Down Expand Up @@ -119,7 +119,7 @@ env:
jobs:
check:
runs-on: windows-2019
runs-on: windows-2022
strategy:
matrix:
Expand Down Expand Up @@ -171,7 +171,7 @@ env:
jobs:
check:
runs-on: windows-2019
runs-on: windows-2022
strategy:
matrix:
Expand Down

0 comments on commit 92e4fd7

Please sign in to comment.