1717jobs :
1818  test :
1919    name : Build and test 
20-     runs-on : windows-2019  
20+     runs-on : windows-2022  
2121    timeout-minutes : 20 
2222    strategy :
2323      fail-fast : false 
2424      matrix :
2525        python-version : ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] 
26-         architecture : [" x64", " x86" ] 
26+         architecture : [x64,  x86] 
2727
2828    steps :
2929      - uses : actions/checkout@v4 
@@ -65,12 +65,26 @@ jobs:
6565       #  Compilation and registration of the PyCOMTest server dll
6666      - name : Set up MSVC 
6767        uses : microsoft/setup-msbuild@v2 
68+ 
69+       #  See https://github.com/actions/runner-images/issues/9701
70+       #  Adapted from https://github.com/actions/runner-images/issues/9873#issuecomment-2139288682
71+       - name : Install missing Visual Studio components 
72+         run : | 
73+           Set-Location "C:\Program Files (x86)\Microsoft Visual Studio\Installer\" 
74+           $VsInstallPath = vswhere.exe -latest -products * -requires Microsoft.Component.MSBuild -property installationPath 
75+           [string]$ComponentsToAdd = @( 
76+             "Microsoft.VisualStudio.Component.VC.14.29.16.11.ATL" 
77+           ) | ForEach-Object {"--add $_"} 
78+           $ArgumentList = ('modify', '--installPath', "`"$VsInstallPath`"", $ComponentsToAdd, '--quiet', '--norestart', '--nocache') 
79+           echo "vs_installer.exe $($ArgumentList -join ' ')" 
80+           # should be run twice for some reason 
81+           Start-Process -FilePath vs_installer.exe -ArgumentList $ArgumentList -Wait -PassThru -WindowStyle Hidden 
82+           Start-Process -FilePath vs_installer.exe -ArgumentList $ArgumentList -Wait -PassThru -WindowStyle Hidden 
83+ 
6884       - name : Build and register the PyCOMTest server dll 
6985        run : | 
70-           cd com/TestSources/PyCOMTest 
71-           msbuild .\PyCOMTest.sln -property:Configuration=Release 
72-           cd x64/Release 
73-           regsvr32 .\PyCOMTest.dll 
86+           msbuild com/TestSources/PyCOMTest/PyCOMTest.sln -property:Configuration=Release 
87+           regsvr32 com/TestSources/PyCOMTest/x64/Release/PyCOMTest.dll 
7488
7589       - name : Run tests 
7690        #  Run the tests directly from the source dir so support files (eg, .wav files etc)
92106  #  Later, when available, we can add tests using this wheel on ARM64 VMs
93107  build_arm64 :
94108    name : Cross-compile ARM 
95-     runs-on : windows-2019  
109+     runs-on : windows-2022  
96110    timeout-minutes : 20 
97111    strategy :
98112      fail-fast : false 
@@ -141,7 +155,7 @@ jobs:
141155
142156  #  This job can be run locally by running `pre-commit run`
143157  checkers :
144-     runs-on : windows-2019  
158+     runs-on : windows-2022  
145159    timeout-minutes : 20 
146160    steps :
147161      - uses : actions/checkout@v4 
@@ -157,14 +171,15 @@ jobs:
157171        with :
158172          version : " 0.8.4" 
159173      - run : ruff format --check 
160-       - run : | #  Too many files to fit in a single command, also exclude vendored Scintilla and MAPIStubLibrary 
174+       #  Too many files to fit in a single command, also exclude vendored Scintilla and MAPIStubLibrary
175+       - run : | 
161176          clang-format --Werror --dry-run $(git ls-files '*.cpp' ':!:com/win32comext/mapi/src/MAPIStubLibrary/') 
162177          if ($LastExitCode -ne 0) { exit $LastExitCode } 
163178          clang-format --Werror --dry-run $(git ls-files '*.h' ':!:Pythonwin/Scintilla/' ':!:com/win32comext/mapi/src/MAPIStubLibrary/') 
164179          if ($LastExitCode -ne 0) { exit $LastExitCode } 
165180
166181   mypy :
167-     runs-on : windows-2019  
182+     runs-on : windows-2022  
168183    timeout-minutes : 20 
169184    strategy :
170185      fail-fast : false 
@@ -182,7 +197,7 @@ jobs:
182197      - run : mypy . --python-version=${{ matrix.python-version }} 
183198
184199  pyright :
185-     runs-on : windows-2019  
200+     runs-on : windows-2022  
186201    timeout-minutes : 20 
187202    strategy :
188203      fail-fast : false 
0 commit comments