From 068eee64b06569f2109c1acabcf5d32c70c2708b Mon Sep 17 00:00:00 2001 From: Andreas Buhr Date: Wed, 10 Dec 2025 08:54:07 +0100 Subject: [PATCH 1/3] Add MSVC 2026 to CI --- .github/workflows/cmake.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 8be09c45..9df5e25a 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -305,6 +305,24 @@ jobs: environment_script: "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvars64.bat", cxxver: 20, } + - { + name: "Windows MSVC 2026 (x64) C++17", + os: windows-2022, + buildtype: Release, + cxx: "cl", + environment_script: "C:/Program Files/Microsoft Visual Studio/2026/Community/VC/Auxiliary/Build/vcvars64.bat", + cxxver: 17, + msvcver: 2026, + } + - { + name: "Windows MSVC 2026 (x64) C++20", + os: windows-2022, + buildtype: Release, + cxx: "cl", + environment_script: "C:/Program Files/Microsoft Visual Studio/2026/Community/VC/Auxiliary/Build/vcvars64.bat", + cxxver: 20, + msvcver: 2026, + } - { name: "Msys2/CLANG", os: windows-2019, @@ -508,6 +526,14 @@ jobs: choco install visualstudio2017-workload-nativedesktop choco install visualstudio2017-workload-vctools + - name: Install MSVC 2026 (Visual Studio 2026 Community with C++ tools) + id: install_msvc_2026 + if: startsWith(matrix.config.os, 'windows-') && ( matrix.config.cxx == 'cl' ) && ( matrix.config.msvcver == 2026 ) + shell: powershell + run: | + choco install visualstudio2026community --yes --no-progress --execution-timeout=7200 ` + --package-parameters "--add Microsoft.VisualStudio.Workload.VCTools --includeRecommended --passive --locale en-US" + - name: MSYS2 - Configure, Build & Test id: install_msys2 if: (startsWith(matrix.config.os, 'windows-2019') && contains(matrix.config.mingw, 'MINGW')) From 587d6ff88653f1e8665b045da95f528974c01c13 Mon Sep 17 00:00:00 2001 From: Andreas Buhr Date: Wed, 10 Dec 2025 09:04:32 +0100 Subject: [PATCH 2/3] Add MSVC 2026 to CI --- .github/workflows/cmake.yml | 46 ++++++++++++++++++++++++++++++++----- 1 file changed, 40 insertions(+), 6 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 9df5e25a..7352ffee 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -533,6 +533,7 @@ jobs: run: | choco install visualstudio2026community --yes --no-progress --execution-timeout=7200 ` --package-parameters "--add Microsoft.VisualStudio.Workload.VCTools --includeRecommended --passive --locale en-US" + choco install visualstudio2026-workload-nativedesktop --yes --no-progress --execution-timeout=7200 - name: MSYS2 - Configure, Build & Test id: install_msys2 @@ -555,8 +556,24 @@ jobs: # We'll use this as our working directory for all subsequent commands run: cmake -E make_directory "build" + - name: Configure CMake (MSVC) + if: (!contains(matrix.config.mingw, 'MINGW')) && startsWith(matrix.config.os, 'windows-') && ( matrix.config.cxx == 'cl' ) + shell: cmd + working-directory: build + run: | + if not "${{ matrix.config.environment_script }}"=="" ( + call "${{ matrix.config.environment_script }}" + ) + cmake %GITHUB_WORKSPACE% ^ + -DCMAKE_BUILD_TYPE=${{ matrix.config.buildtype }} ^ + -DCMAKE_CXX_STANDARD=${{ matrix.config.cxxver }} ^ + -DBUILD_TESTING=ON ^ + -DCMAKE_CXX_FLAGS="${{ matrix.config.cxx_flags }}" ^ + -DCMAKE_EXE_LINKER_FLAGS="${{ matrix.config.exe_linker_flags }}" ^ + -DCMAKE_VERBOSE_MAKEFILE=ON + - name: Configure CMake - if: (!contains(matrix.config.mingw, 'MINGW')) + if: (!contains(matrix.config.mingw, 'MINGW')) && !(startsWith(matrix.config.os, 'windows-') && ( matrix.config.cxx == 'cl' )) # Use a bash shell so we can use the same syntax for environment variable # access regardless of the host operating system shell: bash @@ -567,9 +584,6 @@ jobs: # and build directories, but this is only available with CMake 3.13 and higher. # The CMake binaries on the Github Actions machines are (as of this writing) 3.12 run: | - # run environment setup script if any - [ -n "${{ matrix.config.environment_script }}" ] && "${{ matrix.config.environment_script }}" - cmake $GITHUB_WORKSPACE \ -DCMAKE_BUILD_TYPE=${{ matrix.config.buildtype }} \ -DCMAKE_CXX_STANDARD=${{ matrix.config.cxxver }} \ @@ -578,15 +592,35 @@ jobs: -DCMAKE_EXE_LINKER_FLAGS=${{ matrix.config.exe_linker_flags }} \ -DCMAKE_VERBOSE_MAKEFILE=ON + - name: Build (MSVC) + if: (!contains(matrix.config.mingw, 'MINGW')) && startsWith(matrix.config.os, 'windows-') && ( matrix.config.cxx == 'cl' ) + working-directory: build + shell: cmd + run: | + if not "${{ matrix.config.environment_script }}"=="" ( + call "${{ matrix.config.environment_script }}" + ) + cmake --build . --config ${{ matrix.config.buildtype }} + - name: Build - if: (!contains(matrix.config.mingw, 'MINGW')) + if: (!contains(matrix.config.mingw, 'MINGW')) && !(startsWith(matrix.config.os, 'windows-') && ( matrix.config.cxx == 'cl' )) working-directory: build shell: bash # Execute the build. You can specify a specific target with "--target " run: cmake --build . --config ${{ matrix.config.buildtype }} + - name: Test (MSVC) + if: (!contains(matrix.config.mingw, 'MINGW')) && startsWith(matrix.config.os, 'windows-') && ( matrix.config.cxx == 'cl' ) + working-directory: build + shell: cmd + run: | + if not "${{ matrix.config.environment_script }}"=="" ( + call "${{ matrix.config.environment_script }}" + ) + ctest --output-on-failure -C ${{ matrix.config.buildtype }} + - name: Test - if: (!contains(matrix.config.mingw, 'MINGW')) + if: (!contains(matrix.config.mingw, 'MINGW')) && !(startsWith(matrix.config.os, 'windows-') && ( matrix.config.cxx == 'cl' )) working-directory: build shell: bash # Execute tests defined by the CMake configuration. From a0d9005cf36c68984bfca9b72ecf280e792e2e7b Mon Sep 17 00:00:00 2001 From: Andreas Buhr Date: Wed, 10 Dec 2025 09:24:09 +0100 Subject: [PATCH 3/3] Add MSVC 2026 to CI --- .github/workflows/cmake.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 7352ffee..e7e6004e 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -531,9 +531,10 @@ jobs: if: startsWith(matrix.config.os, 'windows-') && ( matrix.config.cxx == 'cl' ) && ( matrix.config.msvcver == 2026 ) shell: powershell run: | - choco install visualstudio2026community --yes --no-progress --execution-timeout=7200 ` - --package-parameters "--add Microsoft.VisualStudio.Workload.VCTools --includeRecommended --passive --locale en-US" - choco install visualstudio2026-workload-nativedesktop --yes --no-progress --execution-timeout=7200 + choco feature disable --name="'exitOnRebootDetected'" + choco install visualstudio2026community + choco install visualstudio2026-workload-nativedesktop + choco install visualstudio2026-workload-vctools - name: MSYS2 - Configure, Build & Test id: install_msys2