@@ -305,6 +305,24 @@ jobs:
305305 environment_script : " C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvars64.bat" ,
306306 cxxver : 20,
307307 }
308+ - {
309+ name : " Windows MSVC 2026 (x64) C++17" ,
310+ os : windows-2022,
311+ buildtype : Release,
312+ cxx : " cl" ,
313+ environment_script : " C:/Program Files/Microsoft Visual Studio/2026/Community/VC/Auxiliary/Build/vcvars64.bat" ,
314+ cxxver : 17,
315+ msvcver : 2026,
316+ }
317+ - {
318+ name : " Windows MSVC 2026 (x64) C++20" ,
319+ os : windows-2022,
320+ buildtype : Release,
321+ cxx : " cl" ,
322+ environment_script : " C:/Program Files/Microsoft Visual Studio/2026/Community/VC/Auxiliary/Build/vcvars64.bat" ,
323+ cxxver : 20,
324+ msvcver : 2026,
325+ }
308326 - {
309327 name : " Msys2/CLANG" ,
310328 os : windows-2019,
@@ -508,6 +526,16 @@ jobs:
508526 choco install visualstudio2017-workload-nativedesktop
509527 choco install visualstudio2017-workload-vctools
510528
529+ - name : Install MSVC 2026 (Visual Studio 2026 Community with C++ tools)
530+ id : install_msvc_2026
531+ if : startsWith(matrix.config.os, 'windows-') && ( matrix.config.cxx == 'cl' ) && ( matrix.config.msvcver == 2026 )
532+ shell : powershell
533+ run : |
534+ choco feature disable --name="'exitOnRebootDetected'"
535+ choco install visualstudio2026community
536+ choco install visualstudio2026-workload-nativedesktop
537+ choco install visualstudio2026-workload-vctools
538+
511539 - name : MSYS2 - Configure, Build & Test
512540 id : install_msys2
513541 if : (startsWith(matrix.config.os, 'windows-2019') && contains(matrix.config.mingw, 'MINGW'))
@@ -529,8 +557,24 @@ jobs:
529557 # We'll use this as our working directory for all subsequent commands
530558 run : cmake -E make_directory "build"
531559
560+ - name : Configure CMake (MSVC)
561+ if : (!contains(matrix.config.mingw, 'MINGW')) && startsWith(matrix.config.os, 'windows-') && ( matrix.config.cxx == 'cl' )
562+ shell : cmd
563+ working-directory : build
564+ run : |
565+ if not "${{ matrix.config.environment_script }}"=="" (
566+ call "${{ matrix.config.environment_script }}"
567+ )
568+ cmake %GITHUB_WORKSPACE% ^
569+ -DCMAKE_BUILD_TYPE=${{ matrix.config.buildtype }} ^
570+ -DCMAKE_CXX_STANDARD=${{ matrix.config.cxxver }} ^
571+ -DBUILD_TESTING=ON ^
572+ -DCMAKE_CXX_FLAGS="${{ matrix.config.cxx_flags }}" ^
573+ -DCMAKE_EXE_LINKER_FLAGS="${{ matrix.config.exe_linker_flags }}" ^
574+ -DCMAKE_VERBOSE_MAKEFILE=ON
575+
532576 - name : Configure CMake
533- if : (!contains(matrix.config.mingw, 'MINGW'))
577+ if : (!contains(matrix.config.mingw, 'MINGW')) && !(startsWith(matrix.config.os, 'windows-') && ( matrix.config.cxx == 'cl' ))
534578 # Use a bash shell so we can use the same syntax for environment variable
535579 # access regardless of the host operating system
536580 shell : bash
@@ -541,9 +585,6 @@ jobs:
541585 # and build directories, but this is only available with CMake 3.13 and higher.
542586 # The CMake binaries on the Github Actions machines are (as of this writing) 3.12
543587 run : |
544- # run environment setup script if any
545- [ -n "${{ matrix.config.environment_script }}" ] && "${{ matrix.config.environment_script }}"
546-
547588 cmake $GITHUB_WORKSPACE \
548589 -DCMAKE_BUILD_TYPE=${{ matrix.config.buildtype }} \
549590 -DCMAKE_CXX_STANDARD=${{ matrix.config.cxxver }} \
@@ -552,15 +593,35 @@ jobs:
552593 -DCMAKE_EXE_LINKER_FLAGS=${{ matrix.config.exe_linker_flags }} \
553594 -DCMAKE_VERBOSE_MAKEFILE=ON
554595
596+ - name : Build (MSVC)
597+ if : (!contains(matrix.config.mingw, 'MINGW')) && startsWith(matrix.config.os, 'windows-') && ( matrix.config.cxx == 'cl' )
598+ working-directory : build
599+ shell : cmd
600+ run : |
601+ if not "${{ matrix.config.environment_script }}"=="" (
602+ call "${{ matrix.config.environment_script }}"
603+ )
604+ cmake --build . --config ${{ matrix.config.buildtype }}
605+
555606 - name : Build
556- if : (!contains(matrix.config.mingw, 'MINGW'))
607+ if : (!contains(matrix.config.mingw, 'MINGW')) && !(startsWith(matrix.config.os, 'windows-') && ( matrix.config.cxx == 'cl' ))
557608 working-directory : build
558609 shell : bash
559610 # Execute the build. You can specify a specific target with "--target <NAME>"
560611 run : cmake --build . --config ${{ matrix.config.buildtype }}
561612
613+ - name : Test (MSVC)
614+ if : (!contains(matrix.config.mingw, 'MINGW')) && startsWith(matrix.config.os, 'windows-') && ( matrix.config.cxx == 'cl' )
615+ working-directory : build
616+ shell : cmd
617+ run : |
618+ if not "${{ matrix.config.environment_script }}"=="" (
619+ call "${{ matrix.config.environment_script }}"
620+ )
621+ ctest --output-on-failure -C ${{ matrix.config.buildtype }}
622+
562623 - name : Test
563- if : (!contains(matrix.config.mingw, 'MINGW'))
624+ if : (!contains(matrix.config.mingw, 'MINGW')) && !(startsWith(matrix.config.os, 'windows-') && ( matrix.config.cxx == 'cl' ))
564625 working-directory : build
565626 shell : bash
566627 # Execute tests defined by the CMake configuration.
0 commit comments