From f193af10e91f5eb2730f071744666db0c15748bd Mon Sep 17 00:00:00 2001 From: Thomas Braun Date: Tue, 25 Jan 2022 15:04:13 +0100 Subject: [PATCH] .github/workflows/windows.yml: Add support for Visual Studio 2022 This is available in github actions since some time now [1]. [1]: https://github.com/actions/virtual-environments/issues/3949 --- .github/workflows/windows.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 597da4774..9d0989a51 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -95,6 +95,38 @@ jobs: - name: test run: cd build ; ctest -j 10 -C Release --output-on-failure + msvc2022: + runs-on: windows-2022 + strategy: + matrix: + build_type: [Debug, Release] + architecture: [Win32, x64] + + steps: + - uses: actions/checkout@v2 + - name: cmake + run: cmake -S . -B build -G "Visual Studio 17 2022" -A ${{ matrix.architecture }} -DJSON_BuildTests=On -DCMAKE_CXX_FLAGS="/W4 /WX" + if: matrix.build_type == 'Release' + - name: cmake + run: cmake -S . -B build -G "Visual Studio 17 2022" -A ${{ matrix.architecture }} -DJSON_BuildTests=On -DJSON_FastTests=ON -DCMAKE_CXX_FLAGS="/W4 /WX" + if: matrix.build_type == 'Debug' + - 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 + + msvc2022_latest: + runs-on: windows-2022 + + steps: + - uses: actions/checkout@v2 + - name: cmake + run: cmake -S . -B build -G "Visual Studio 17 2022" -DJSON_BuildTests=On -DCMAKE_CXX_FLAGS="/permissive- /std:c++latest /utf-8 /W4 /WX" + - name: build + run: cmake --build build --config Release --parallel 10 + - name: test + run: cd build ; ctest -j 10 -C Release --output-on-failure + clang: runs-on: windows-latest strategy: