[GITHUB] build-msbuild-i386: Prepare support for Visual Studio 18 2026

Add support for VS2026 as an MSBuild project generator
by checking `VisualStudioVersion` environment variable.

`windows-latest` builds will be affected by
https://github.blog/changelog/2026-02-05-github-actions-early-february-2026-updates/#windows-server-2025-with-visual-studio-2026-image-now-available-for-github-hosted-runners

> The migration to the new Visual Studio 2026 image will start on June 8, 2026.

Closes #8998.
This commit is contained in:
Stanislav Motylkov
2026-05-16 16:23:05 +03:00
parent 2722bf811e
commit 216114682d

View File

@@ -331,6 +331,8 @@ jobs:
run: |
mkdir build
cd build
cmake -G "Visual Studio 17 2022" -A Win32 -DCMAKE_TOOLCHAIN_FILE:FILEPATH=toolchain-msvc.cmake -DARCH:STRING=i386 -DENABLE_ROSTESTS=1 -DENABLE_ROSAPPS=1 ${{github.workspace}}\src
$GENERATOR = "Visual Studio 17 2022"
if ($env:VisualStudioVersion -ge "18") { $GENERATOR = "Visual Studio 18 2026" }
cmake -G $GENERATOR -A Win32 -DCMAKE_TOOLCHAIN_FILE:FILEPATH=toolchain-msvc.cmake -DARCH:STRING=i386 -DENABLE_ROSTESTS=1 -DENABLE_ROSAPPS=1 ${{github.workspace}}\src
- name: Build
run: cmake --build ${{github.workspace}}\build --target bootcd