88
99jobs :
1010 test-msvc-cppwinrt-build :
11- name : ' ${{ matrix.compiler }}: Build (${{ matrix.arch }}, ${{ matrix.config }})'
11+ name : ' ${{ matrix.compiler }}: Build (${{ matrix.arch }}, ${{ matrix.config }}, ${{ matrix.toolchain.platform_toolset }} )'
1212 strategy :
1313 matrix :
1414 compiler : [MSVC, clang-cl]
1515 arch : [x86, x64, arm64]
1616 config : [Debug, Release]
17+ toolchain :
18+ - image : windows-2025
19+ platform_toolset : v143
20+ vswhere_version : " [17.0,18.0)"
21+ vswhere_prerelease : " false"
22+ - image : windows-2025-vs2026
23+ platform_toolset : v145
24+ vswhere_version : " [18.0,19.0)"
25+ vswhere_prerelease : " true"
1726 exclude :
1827 - arch : arm64
1928 config : Debug
2029 - compiler : clang-cl
2130 arch : arm64
2231 - compiler : clang-cl
2332 config : Release
24- runs-on : windows-latest
33+ runs-on : ${{ matrix.toolchain.image }}
2534 steps :
2635 - uses : actions/checkout@v6
2736
3241
3342 - name : Find VsDevCmd.bat
3443 run : |
35- $VSDevCmd = & "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere" -latest -find Common7\tools\VSDevCmd.bat
44+ $vswhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere"
45+ $vswhereArgs = @("-latest", "-products", "*", "-requires", "Microsoft.Component.MSBuild", "-version", "${{ matrix.toolchain.vswhere_version }}", "-find", "Common7\tools\VSDevCmd.bat")
46+ if ("${{ matrix.toolchain.vswhere_prerelease }}" -eq "true") {
47+ $vswhereArgs += "-prerelease"
48+ }
49+ $VSDevCmd = & $vswhere @vswhereArgs
3650 if (!$VSDevCmd) { exit 1 }
3751 echo "Using VSDevCmd: ${VSDevCmd}"
3852 Add-Content $env:GITHUB_ENV "VSDevCmd=$VSDevCmd"
4559 $props = "Configuration=$target_configuration,Platform=$target_platform,CppWinRTBuildVersion=$target_version"
4660 if ("${{ matrix.compiler }}" -eq "clang-cl") {
4761 $props += ",Clang=1,PlatformToolset=ClangCl"
62+ } else {
63+ $props += ",PlatformToolset=${{ matrix.toolchain.platform_toolset }}"
4864 }
4965 Add-Content $env:GITHUB_ENV "msbuild_config_props=/p:$props"
5066
6884 - name : Upload built executables
6985 uses : actions/upload-artifact@v7
7086 with :
71- name : msvc-build-${{ matrix.compiler}}-${{ matrix.arch }}-${{ matrix.config }}-bin
87+ name : msvc-build-${{ matrix.compiler}}-${{ matrix.arch }}-${{ matrix.config }}-${{ matrix.toolchain.platform_toolset }}- bin
7288 path : |
7389 _build/${{ matrix.arch }}/${{ matrix.config }}/*.exe
7490 _build/${{ matrix.arch }}/${{ matrix.config }}/*.dll
84100 & "_build\$target_platform\$target_configuration\cppwinrt.exe" -in local -out _build\$target_platform\$target_configuration -verbose
85101
86102 test-msvc-cppwinrt-test :
87- name : ' ${{ matrix.compiler }}: Test [${{ matrix.test_exe }}] (${{ matrix.arch }}, ${{ matrix.config }})'
103+ name : ' ${{ matrix.compiler }}: Test [${{ matrix.test_exe }}] (${{ matrix.arch }}, ${{ matrix.config }}, ${{ matrix.toolchain.platform_toolset }} )'
88104 needs : test-msvc-cppwinrt-build
89105 strategy :
90106 fail-fast : false
@@ -93,29 +109,38 @@ jobs:
93109 arch : [x86, x64, arm64]
94110 config : [Debug, Release]
95111 test_exe : [test, test_nocoro, test_cpp20, test_cpp20_no_sourcelocation, test_fast, test_slow, test_old, test_module_lock_custom, test_module_lock_none]
112+ toolchain :
113+ - image : windows-2025
114+ platform_toolset : v143
115+ vswhere_version : " [17.0,18.0)"
116+ vswhere_prerelease : " false"
117+ - image : windows-2025-vs2026
118+ platform_toolset : v145
119+ vswhere_version : " [18.0,19.0)"
120+ vswhere_prerelease : " true"
96121 exclude :
97122 - arch : arm64
98123 config : Debug
99124 - compiler : clang-cl
100125 arch : arm64
101126 - compiler : clang-cl
102127 config : Release
103- runs-on : windows-latest
128+ runs-on : ${{ matrix.toolchain.image }}
104129 steps :
105130 - uses : actions/checkout@v6
106131
107132 - name : Fetch cppwinrt executables
108133 if : matrix.arch != 'arm64'
109134 uses : actions/download-artifact@v8
110135 with :
111- name : msvc-build-${{ matrix.compiler}}-${{ matrix.arch }}-${{ matrix.config }}-bin
136+ name : msvc-build-${{ matrix.compiler}}-${{ matrix.arch }}-${{ matrix.config }}-${{ matrix.toolchain.platform_toolset }}- bin
112137 path : _build/${{ matrix.arch }}/${{ matrix.config }}/
113138
114139 - name : Fetch x86 cppwinrt executables (arm64 only)
115140 if : matrix.arch == 'arm64'
116141 uses : actions/download-artifact@v8
117142 with :
118- name : msvc-build-${{ matrix.compiler}}-x86-Release-bin
143+ name : msvc-build-${{ matrix.compiler}}-x86-Release-${{ matrix.toolchain.platform_toolset }}- bin
119144 path : _build/x86/Release/
120145
121146 - name : Download nuget
@@ -125,7 +150,12 @@ jobs:
125150
126151 - name : Find VsDevCmd.bat
127152 run : |
128- $VSDevCmd = & "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere" -latest -find Common7\tools\VSDevCmd.bat
153+ $vswhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere"
154+ $vswhereArgs = @("-latest", "-products", "*", "-requires", "Microsoft.Component.MSBuild", "-version", "${{ matrix.toolchain.vswhere_version }}", "-find", "Common7\tools\VSDevCmd.bat")
155+ if ("${{ matrix.toolchain.vswhere_prerelease }}" -eq "true") {
156+ $vswhereArgs += "-prerelease"
157+ }
158+ $VSDevCmd = & $vswhere @vswhereArgs
129159 if (!$VSDevCmd) { exit 1 }
130160 echo "Using VSDevCmd: ${VSDevCmd}"
131161 Add-Content $env:GITHUB_ENV "VSDevCmd=$VSDevCmd"
@@ -138,6 +168,8 @@ jobs:
138168 $props = "Configuration=$target_configuration,Platform=$target_platform,CppWinRTBuildVersion=$target_version"
139169 if ("${{ matrix.compiler }}" -eq "clang-cl") {
140170 $props += ",Clang=1,PlatformToolset=ClangCl"
171+ } else {
172+ $props += ",PlatformToolset=${{ matrix.toolchain.platform_toolset }}"
141173 }
142174 Add-Content $env:GITHUB_ENV "msbuild_config_props=/p:$props"
143175
@@ -232,7 +264,7 @@ jobs:
232264 if : matrix.arch == 'arm64'
233265 uses : actions/upload-artifact@v7
234266 with :
235- name : msvc-tests-${{ matrix.test_exe }}-${{ matrix.compiler }}-${{ matrix.arch }}-${{ matrix.config }}-bin
267+ name : msvc-tests-${{ matrix.test_exe }}-${{ matrix.compiler }}-${{ matrix.arch }}-${{ matrix.config }}-${{ matrix.toolchain.platform_toolset }}- bin
236268 path : |
237269 _build/${{ matrix.arch }}/${{ matrix.config }}/*.exe
238270 _build/${{ matrix.arch }}/${{ matrix.config }}/*.dll
@@ -313,22 +345,31 @@ jobs:
313345 cmd /c "$env:VSDevCmd" "&" msbuild /m /clp:ForceConsoleColor "$env:msbuild_config_props" /p:Deployment=${{ matrix.Deployment }} natvis\cppwinrtvisualizer.sln
314346
315347 build-msvc-nuget-test :
316- name : ' Build nuget test (${{ matrix.arch }})'
348+ name : ' Build nuget test (${{ matrix.arch }}, ${{ matrix.toolchain.platform_toolset }} )'
317349 needs : test-msvc-cppwinrt-build
318350 strategy :
319351 matrix :
320352 compiler :
321353 - MSVC
322354 arch : [x86, x64]
323355 config : [Release]
324- runs-on : windows-latest
356+ toolchain :
357+ - image : windows-2025
358+ platform_toolset : v143
359+ vswhere_version : " [17.0,18.0)"
360+ vswhere_prerelease : " false"
361+ - image : windows-2025-vs2026
362+ platform_toolset : v145
363+ vswhere_version : " [18.0,19.0)"
364+ vswhere_prerelease : " true"
365+ runs-on : ${{ matrix.toolchain.image }}
325366 steps :
326367 - uses : actions/checkout@v6
327368
328369 - name : Fetch cppwinrt executables
329370 uses : actions/download-artifact@v8
330371 with :
331- name : msvc-build-${{ matrix.compiler}}-${{ matrix.arch }}-${{ matrix.config }}-bin
372+ name : msvc-build-${{ matrix.compiler}}-${{ matrix.arch }}-${{ matrix.config }}-${{ matrix.toolchain.platform_toolset }}- bin
332373 path : _build/${{ matrix.arch }}/${{ matrix.config }}/
333374
334375 - name : Download nuget
@@ -338,7 +379,12 @@ jobs:
338379
339380 - name : Find VsDevCmd.bat
340381 run : |
341- $VSDevCmd = & "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere" -latest -find Common7\tools\VSDevCmd.bat
382+ $vswhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere"
383+ $vswhereArgs = @("-latest", "-products", "*", "-requires", "Microsoft.Component.MSBuild", "-version", "${{ matrix.toolchain.vswhere_version }}", "-find", "Common7\tools\VSDevCmd.bat")
384+ if ("${{ matrix.toolchain.vswhere_prerelease }}" -eq "true") {
385+ $vswhereArgs += "-prerelease"
386+ }
387+ $VSDevCmd = & $vswhere @vswhereArgs
342388 if (!$VSDevCmd) { exit 1 }
343389 echo "Using VSDevCmd: ${VSDevCmd}"
344390 Add-Content $env:GITHUB_ENV "VSDevCmd=$VSDevCmd"
@@ -348,7 +394,7 @@ jobs:
348394 $target_configuration = "${{ matrix.config }}"
349395 $target_platform = "${{ matrix.arch }}"
350396 $target_version = "999.999.999.999"
351- Add-Content $env:GITHUB_ENV "msbuild_config_props=/p:Configuration=$target_configuration,Platform=$target_platform,CppWinRTBuildVersion=$target_version"
397+ Add-Content $env:GITHUB_ENV "msbuild_config_props=/p:Configuration=$target_configuration,Platform=$target_platform,CppWinRTBuildVersion=$target_version,PlatformToolset=${{ matrix.toolchain.platform_toolset }} "
352398
353399 - name : Restore nuget packages
354400 run : |
0 commit comments