Skip to content

Commit

Permalink
Build with C++17 and C++20 via GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
tbeu committed Mar 20, 2024
1 parent f3dd894 commit f94e637
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ defaults:

jobs:
build:
name: ${{ matrix.toolchain }}
name: ${{ matrix.toolchain }} (C++${{ matrix.cppstandard }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
Expand All @@ -21,6 +21,9 @@ jobs:
- macos-clang
- windows-msvc
- windows-mingw
cppstandard:
- 17
- 20
configuration:
- Debug
include:
Expand All @@ -42,11 +45,11 @@ jobs:
- name: Configure (${{ matrix.configuration }})
run: |
if [ "${{ matrix.compiler }}" == "msvc" ]; then
cmake -S . -B build -DBUILD_TESTS=ON
cmake -S . -B build -DBUILD_TESTS=ON -DCMAKE_CXX_STANDARD=${{ matrix.cppstandard }}
elif [ "${{ matrix.compiler }}" == "mingw" ]; then
cmake -S . -B build -DCMAKE_BUILD_TYPE=${{ matrix.configuration }} -DBUILD_TESTS=ON -G "MinGW Makefiles"
cmake -S . -B build -DCMAKE_BUILD_TYPE=${{ matrix.configuration }} -DBUILD_TESTS=ON -DCMAKE_CXX_STANDARD=${{ matrix.cppstandard }} -G "MinGW Makefiles"
else
cmake -S . -B build -DCMAKE_BUILD_TYPE=${{ matrix.configuration }} -DBUILD_TESTS=ON
cmake -S . -B build -DCMAKE_BUILD_TYPE=${{ matrix.configuration }} -DBUILD_TESTS=ON -DCMAKE_CXX_STANDARD=${{ matrix.cppstandard }}
fi
- name: Build with ${{ matrix.compiler }}
run: |
Expand Down

0 comments on commit f94e637

Please sign in to comment.