From 0e9996dde044a44dc4bd51e95837ceea24e3c9e2 Mon Sep 17 00:00:00 2001 From: David Hummel <6109326+hummeltech@users.noreply.github.com> Date: Fri, 17 Mar 2023 10:51:15 -0700 Subject: [PATCH] Add build & test for CXX_STANDARD=17 to GitHub Actions --- .github/workflows/build_and_test.yml | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index a9e9b7bbd..d28a67069 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -25,7 +25,12 @@ jobs: - uses: pre-commit/action@v3.0.0 buildAndTest: - name: Build and Test + name: >- + Build & Test + (${{ matrix.os }}) + (C++ ${{ matrix.cxx-standard }}) + ${{ matrix.memory-mapped == 'OFF' && '(USE_MEMORY_MAPPED_FILE=OFF)' || '' }} + ${{ matrix.static-build == 'OFF' && '(BUILD_SHARED_LIBS=OFF)' || '' }} needs: checkSource strategy: fail-fast: false @@ -33,11 +38,20 @@ jobs: os: [macos-latest, windows-latest, ubuntu-latest] memory-mapped: ["OFF", "ON"] static-build: ["OFF", "ON"] + cxx-standard: [14] include: - os: ubuntu-latest mono: mono - os: macos-latest mono: mono + - os: macos-latest + cxx-standard: 17 + mono: mono + - os: ubuntu-latest + cxx-standard: 17 + mono: mono + - os: windows-latest + cxx-standard: 17 runs-on: ${{ matrix.os }} @@ -78,12 +92,18 @@ jobs: string: ${{ runner.os }} - name: set lower case runner os - shell: "bash" + shell: bash run: | echo "PRESET=${{ steps.lc_platform.outputs.lowercase }}-ci" >>${GITHUB_ENV} - name: Configure CMake - run: cmake -DUSE_MEMORY_MAPPED_FILE=${{ matrix.memory-mapped }} -DBUILD_SHARED_LIBS=${{ matrix.static-build }} --preset ${{ env.PRESET }} + shell: bash + run: | + cmake \ + -DBUILD_SHARED_LIBS:BOOL=${{ matrix.static-build || 'ON' }} \ + -DCMAKE_CXX_STANDARD=${{ matrix.cxx-standard || '14' }} \ + -DUSE_MEMORY_MAPPED_FILE:BOOL=${{ matrix.memory-mapped || 'ON' }} \ + --preset ${{ env.PRESET }} - name: Build run: cmake --build --preset ${{ env.PRESET }}