1
0
mirror of https://github.com/nlohmann/json synced 2024-11-25 13:20:05 +00:00

.github/workflows/windows.yml: Add support for Visual Studio 2022 (#3295)

* .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

* README.md: Add VS 2022 [skip ci]

The version and the build engine version (aka MSBuild version) were
taken from [1].

[1]: https://github.com/actions/virtual-environments/blob/win22/20220116.1/images/win/Windows2022-Readme.md
This commit is contained in:
Thomas Braun 2022-01-26 09:57:23 +01:00 committed by GitHub
parent b772649624
commit 4d4c273036
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 34 additions and 0 deletions

View File

@ -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:

View File

@ -1045,6 +1045,7 @@ Though it's 2022 already, the support for C++11 is still a bit sparse. Currently
- Microsoft Visual C++ 2015 / Build Tools 14.0.25123.0 (and possibly later)
- Microsoft Visual C++ 2017 / Build Tools 15.5.180.51428 (and possibly later)
- Microsoft Visual C++ 2019 / Build Tools 16.3.1+1def00d3d (and possibly later)
- Microsoft Visual C++ 2022 / Build Tools 19.30.30709.0 (and possibly later)
I would be happy to learn about other compilers/versions.
@ -1119,6 +1120,7 @@ The following compilers are currently used in continuous integration at [AppVeyo
| Visual Studio 15 2017 MSVC 19.16.27045.0 (Build Engine version 15.9.21+g9802d43bc3 for .NET Framework) | Windows-10.0.14393 | GitHub Actions |
| Visual Studio 16 2019 MSVC 19.28.29912.0 (Build Engine version 16.9.0+57a23d249 for .NET Framework) | Windows-10.0.17763 | GitHub Actions |
| Visual Studio 16 2019 MSVC 19.28.29912.0 (Build Engine version 16.9.0+57a23d249 for .NET Framework) | Windows-10.0.17763 | AppVeyor |
| Visual Studio 17 2022 MSVC 19.30.30709.0 (Build Engine version 17.0.31804.368 for .NET Framework) | Windows-10.0.20348 | GitHub Actions |
## Integration