Skip to content

Commit ec5035b

Browse files
committed
build all code with all available C++ standards in CI
1 parent 43f68be commit ec5035b

File tree

2 files changed

+32
-5
lines changed

2 files changed

+32
-5
lines changed

.github/workflows/CI-unixish.yml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,15 +71,26 @@ jobs:
7171
run: |
7272
make -j$(nproc) selfcheck
7373
74-
- name: make testrunner (c++17)
74+
- name: make (c++14)
7575
run: |
7676
make clean
77-
make -j$(nproc) testrunner CXXOPTS="-std=c++17"
77+
make -j$(nproc) CXXOPTS="-Werror -std=c++14"
7878
79-
- name: make testrunner (c++20)
79+
- name: make (c++17)
8080
run: |
8181
make clean
82-
make -j$(nproc) testrunner CXXOPTS="-std=c++20"
82+
make -j$(nproc) CXXOPTS="-Werror -std=c++17"
83+
84+
- name: make (c++20)
85+
run: |
86+
make clean
87+
make -j$(nproc) CXXOPTS="-Werror -std=c++20"
88+
89+
- name: make (c++23)
90+
run: |
91+
make clean
92+
# ubuntu-22.04 and macos-14 do not support c++23 yet
93+
make -j$(nproc) CXXOPTS="-Werror -std=c++2b"
8394
8495
- name: Run CMake
8596
run: |

.github/workflows/CI-windows.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,20 @@ jobs:
6363
run: |
6464
set SIMPLECPP_EXE_PATH=.\${{ matrix.config }}\simplecpp.exe
6565
python -m pytest integration_test.py -vv || exit /b !errorlevel!
66-
66+
67+
- name: Run CMake (c++17)
68+
run: |
69+
cmake -S . -B build.cxx17 -G "Visual Studio 17 2022" -A x64 -Werror=dev --warn-uninitialized -DCMAKE_CXX_STANDARD=20 -DCMAKE_COMPILE_WARNING_AS_ERROR=On || exit /b !errorlevel!
70+
71+
- name: Build (c++17)
72+
run: |
73+
msbuild -m build.cxx17\simplecpp.sln /p:Configuration=${{ matrix.config }} /p:Platform=x64 || exit /b !errorlevel!
74+
75+
- name: Run CMake (c++20)
76+
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!
78+
79+
- name: Build (c++20)
80+
run: |
81+
msbuild -m build.cxx20\simplecpp.sln /p:Configuration=${{ matrix.config }} /p:Platform=x64 || exit /b !errorlevel!
82+

0 commit comments

Comments
 (0)