diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a408a9d..ea824c9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,6 +12,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, windows-latest, macos-latest] + cxx_standard: [11, 17, 20] build: [static, shared] generator: ["Default Generator", "MinGW Makefiles"] exclude: @@ -23,7 +24,6 @@ jobs: generator: "MinGW Makefiles" env: YAML_BUILD_SHARED_LIBS: ${{ matrix.build == 'shared' && 'ON' || 'OFF' }} - YAML_CPP_BUILD_TESTS: 'ON' CMAKE_GENERATOR: >- ${{format(matrix.generator != 'Default Generator' && '-G "{0}"' || '', matrix.generator)}} runs-on: ${{ matrix.os }} @@ -33,16 +33,10 @@ jobs: - name: Get number of CPU cores uses: SimenB/github-actions-cpu-cores@v1 - - name: Build - shell: bash - run: | - cmake ${{ env.CMAKE_GENERATOR }} -S "${{ github.workspace }}" -B build -DYAML_BUILD_SHARED_LIBS=${{ env.YAML_BUILD_SHARED_LIBS }} - cd build && cmake --build . --parallel ${{ steps.cpu-cores.outputs.count }} - - name: Build Tests shell: bash run: | - cmake ${{ env.CMAKE_GENERATOR }} -S "${{ github.workspace }}" -B build -DYAML_BUILD_SHARED_LIBS=${{ env.YAML_BUILD_SHARED_LIBS }} -DYAML_CPP_BUILD_TESTS=${{ env.YAML_CPP_BUILD_TESTS }} + cmake ${{ env.CMAKE_GENERATOR }} -S "${{ github.workspace }}" -B build -DCMAKE_CXX_STANDARD=${{ matrix.cxx_standard }} -DYAML_BUILD_SHARED_LIBS=${{ env.YAML_BUILD_SHARED_LIBS }} -DYAML_CPP_BUILD_TESTS=ON cd build && cmake --build . --parallel ${{ steps.cpu-cores.outputs.count }} - name: Run Tests