🆕 [CI] Add C++ standards to the build matrix
Problem: - A variety of compilers are tested in CI, but they are all tested on the C++11 standard. This prevents CI from catching bugs that exist only on a particular version of the C++ standard. Solution: - Parameterize CI on C++ standards 11, 14, 17, and 20.
This commit is contained in:
parent
aa9b09a9e3
commit
1f6635edd0
13
.github/workflows/linux.yml
vendored
13
.github/workflows/linux.yml
vendored
@ -9,12 +9,22 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
cxx: [g++-4.8, g++-8, g++-10, clang++-9]
|
cxx: [g++-4.8, g++-8, g++-10, clang++-9]
|
||||||
build_type: [Debug, Release]
|
build_type: [Debug, Release]
|
||||||
|
standard: [11, 14, 17, 20]
|
||||||
include:
|
include:
|
||||||
- cxx: clang++-9
|
- cxx: clang++-9
|
||||||
build_type: Debug
|
build_type: Debug
|
||||||
fuzz: -DFMT_FUZZ=ON -DFMT_FUZZ_LINKMAIN=ON
|
fuzz: -DFMT_FUZZ=ON -DFMT_FUZZ_LINKMAIN=ON
|
||||||
- cxx: g++-4.8
|
- cxx: g++-4.8
|
||||||
install: sudo apt install g++-4.8
|
install: sudo apt install g++-4.8
|
||||||
|
exclude:
|
||||||
|
- cxx: g++-4.8
|
||||||
|
standard: 14
|
||||||
|
- cxx: g++-4.8
|
||||||
|
standard: 17
|
||||||
|
- cxx: g++-4.8
|
||||||
|
standard: 20
|
||||||
|
- cxx: g++-8
|
||||||
|
standard: 20
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
@ -30,7 +40,8 @@ jobs:
|
|||||||
CXX: ${{matrix.cxx}}
|
CXX: ${{matrix.cxx}}
|
||||||
run: |
|
run: |
|
||||||
cmake -DCMAKE_BUILD_TYPE=${{matrix.build_type}} ${{matrix.fuzz}} \
|
cmake -DCMAKE_BUILD_TYPE=${{matrix.build_type}} ${{matrix.fuzz}} \
|
||||||
-DFMT_DOC=OFF -DFMT_PEDANTIC=ON -DFMT_WERROR=ON $GITHUB_WORKSPACE
|
-DFMT_DOC=OFF -DFMT_PEDANTIC=ON -DFMT_WERROR=ON \
|
||||||
|
-DCMAKE_CXX_STANDARD=${{matrix.standard}} $GITHUB_WORKSPACE
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
working-directory: ${{runner.workspace}}/build
|
working-directory: ${{runner.workspace}}/build
|
||||||
|
|||||||
4
.github/workflows/macos.yml
vendored
4
.github/workflows/macos.yml
vendored
@ -7,6 +7,7 @@ jobs:
|
|||||||
runs-on: macos-10.15
|
runs-on: macos-10.15
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
|
standard: [11, 14, 17, 20]
|
||||||
build_type: [Debug, Release]
|
build_type: [Debug, Release]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
@ -19,7 +20,8 @@ jobs:
|
|||||||
working-directory: ${{runner.workspace}}/build
|
working-directory: ${{runner.workspace}}/build
|
||||||
run: |
|
run: |
|
||||||
cmake -DCMAKE_BUILD_TYPE=${{matrix.build_type}} \
|
cmake -DCMAKE_BUILD_TYPE=${{matrix.build_type}} \
|
||||||
-DFMT_DOC=OFF -DFMT_PEDANTIC=ON -DFMT_WERROR=ON $GITHUB_WORKSPACE
|
-DFMT_DOC=OFF -DFMT_PEDANTIC=ON -DFMT_WERROR=ON \
|
||||||
|
-DCMAKE_CXX_STANDARD=${{matrix.standard}} $GITHUB_WORKSPACE
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
working-directory: ${{runner.workspace}}/build
|
working-directory: ${{runner.workspace}}/build
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user