Skip to content

Commit b2b0295

Browse files
committed
CI: build for multiple standards (C++98, C++11 and C++20)
Should reproduce the problem reported in #68
1 parent e632140 commit b2b0295

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

.build/build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ cd "$(dirname "$0")"/..
44

55
mkdir -p build
66
cd build
7-
cmake ..
7+
cmake .. ${@:+"$@"}
88
cmake --build .

.github/workflows/build.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,22 @@ on:
99
jobs:
1010
linux:
1111
runs-on: ubuntu-latest
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
cpp-standard:
16+
- 98
17+
- 11
18+
- 20
1219
steps:
1320
- uses: actions/checkout@v4
1421
- name: restore
1522
run: |
1623
sudo apt-get install -y libgtest-dev
1724
- name: build
18-
run: .build/build
25+
env:
26+
CPP_STANDARD: ${{ matrix.cpp-standard }}
27+
run: .build/build -DCMAKE_CXX_STANDARD="$CPP_STANDARD" -DCMAKE_CXX_STANDARD_REQUIRED=ON -DCMAKE_CXX_EXTENSIONS=OFF
1928
- name: unittest
2029
run: .build/run-unittest
2130

0 commit comments

Comments
 (0)