👷 add more MSVC images

Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
Niels Lohmann
2026-06-30 07:33:56 +02:00
parent 21500de668
commit 3d644aef09
2 changed files with 62 additions and 2 deletions
+60
View File
@@ -70,6 +70,66 @@ jobs:
- name: Test
run: cd build ; ctest -j 10 -C ${{ matrix.build_type }} --output-on-failure
# Visual Studio 2026 (v145 toolset) on the windows-2025 image. The "Visual Studio
# 18 2026" generator requires CMake 4.2+, so a recent CMake is fetched explicitly.
msvc-vs2026:
strategy:
matrix:
build_type: [Debug, Release]
architecture: [Win32, x64]
std_version: [default, latest]
runs-on: windows-2025
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Get latest CMake and ninja
uses: lukka/get-cmake@f5b8fbb4d77cec1acc5a5f9f0df4beffaf5d98d9 # v4.3.4
- name: Set extra CXX_FLAGS for latest std_version
run: |
if [ "${{ matrix.std_version }}" = "latest" ]; then
echo "flags=/permissive- /std:c++latest /utf-8 /W4 /WX" >> $GITHUB_ENV
else
echo "flags=/W4 /WX" >> $GITHUB_ENV
fi
shell: bash
- name: Run CMake (Release)
run: cmake -S . -B build -G "Visual Studio 18 2026" -A ${{ matrix.architecture }} -DJSON_BuildTests=On -DCMAKE_CXX_FLAGS="$env:flags"
if: matrix.build_type == 'Release'
shell: pwsh
- name: Run CMake (Debug)
run: cmake -S . -B build -G "Visual Studio 18 2026" -A ${{ matrix.architecture }} -DJSON_BuildTests=On -DJSON_FastTests=ON -DCMAKE_CXX_FLAGS="$env:flags"
if: matrix.build_type == 'Debug'
shell: pwsh
- name: Build
run: cmake --build build --config ${{ matrix.build_type }} --parallel 10
- name: Test
run: cd build ; ctest -j 10 -C ${{ matrix.build_type }} --output-on-failure
# Native ARM64 Windows runner with the MSVC ARM64 toolset. The windows-11-arm
# label is only available for public repositories.
msvc-arm64:
strategy:
matrix:
build_type: [Debug, Release]
runs-on: windows-11-arm
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Run CMake (Release)
run: cmake -S . -B build -G "Visual Studio 17 2022" -A ARM64 -DJSON_BuildTests=On -DCMAKE_CXX_FLAGS="/W4 /WX"
if: matrix.build_type == 'Release'
shell: pwsh
- name: Run CMake (Debug)
run: cmake -S . -B build -G "Visual Studio 17 2022" -A ARM64 -DJSON_BuildTests=On -DJSON_FastTests=ON -DCMAKE_CXX_FLAGS="/W4 /WX"
if: matrix.build_type == 'Debug'
shell: pwsh
- name: Build
run: cmake --build build --config ${{ matrix.build_type }} --parallel 10
- name: Test
run: cd build ; ctest -j 10 -C ${{ matrix.build_type }} --output-on-failure
clang:
runs-on: windows-2022
strategy: