Skip to content

Commit a7d4e61

Browse files
committed
CI-windows.yml: removed explicit usage of Visual Studio CMake generators
1 parent 24f2851 commit a7d4e61

1 file changed

Lines changed: 15 additions & 8 deletions

File tree

.github/workflows/CI-windows.yml

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,21 @@ permissions:
1212
defaults:
1313
run:
1414
shell: cmd
15-
15+
1616
jobs:
1717

1818
build:
1919
strategy:
2020
matrix:
2121
os: [windows-2022, windows-2025, windows-11-arm]
2222
config: [Release, Debug]
23+
include:
24+
- os: windows-2022
25+
sln: sln
26+
- os: windows-2025
27+
sln: slnx
28+
- os: windows-11-arm
29+
sln: sln
2330
fail-fast: false
2431

2532
runs-on: ${{ matrix.os }}
@@ -45,12 +52,12 @@ jobs:
4552
4653
- name: Run CMake
4754
run: |
48-
cmake -G "Visual Studio 17 2022" -A x64 -Werror=dev --warn-uninitialized -DCMAKE_COMPILE_WARNING_AS_ERROR=On . || exit /b !errorlevel!
55+
cmake -A x64 -Werror=dev --warn-uninitialized -DCMAKE_COMPILE_WARNING_AS_ERROR=On . || exit /b !errorlevel!
4956
5057
- name: Build
5158
run: |
52-
msbuild -m simplecpp.sln /p:Configuration=${{ matrix.config }} /p:Platform=x64 || exit /b !errorlevel!
53-
59+
msbuild -m simplecpp.${{ matrix.sln }} /p:Configuration=${{ matrix.config }} /p:Platform=x64 || exit /b !errorlevel!
60+
5461
- name: Test
5562
run: |
5663
.\${{ matrix.config }}\testrunner.exe || exit /b !errorlevel!
@@ -66,17 +73,17 @@ jobs:
6673
6774
- name: Run CMake (c++17)
6875
run: |
69-
cmake -S . -B build.cxx17 -G "Visual Studio 17 2022" -A x64 -Werror=dev --warn-uninitialized -DCMAKE_CXX_STANDARD=17 -DCMAKE_COMPILE_WARNING_AS_ERROR=On || exit /b !errorlevel!
76+
cmake -S . -B build.cxx17 -A x64 -Werror=dev --warn-uninitialized -DCMAKE_CXX_STANDARD=17 -DCMAKE_COMPILE_WARNING_AS_ERROR=On || exit /b !errorlevel!
7077
7178
- name: Build (c++17)
7279
run: |
73-
msbuild -m build.cxx17\simplecpp.sln /p:Configuration=${{ matrix.config }} /p:Platform=x64 || exit /b !errorlevel!
80+
msbuild -m build.cxx17\simplecpp.${{ matrix.sln }} /p:Configuration=${{ matrix.config }} /p:Platform=x64 || exit /b !errorlevel!
7481
7582
- name: Run CMake (c++20)
7683
run: |
77-
cmake -S . -B build.cxx20 -G "Visual Studio 17 2022" -A x64 -Werror=dev --warn-uninitialized -DCMAKE_CXX_STANDARD=20 -DCMAKE_COMPILE_WARNING_AS_ERROR=On || exit /b !errorlevel!
84+
cmake -S . -B build.cxx20 -A x64 -Werror=dev --warn-uninitialized -DCMAKE_CXX_STANDARD=20 -DCMAKE_COMPILE_WARNING_AS_ERROR=On || exit /b !errorlevel!
7885
7986
- name: Build (c++20)
8087
run: |
81-
msbuild -m build.cxx20\simplecpp.sln /p:Configuration=${{ matrix.config }} /p:Platform=x64 || exit /b !errorlevel!
88+
msbuild -m build.cxx20\simplecpp.${{ matrix.sln }} /p:Configuration=${{ matrix.config }} /p:Platform=x64 || exit /b !errorlevel!
8289

0 commit comments

Comments
 (0)