mirror of
https://github.com/jbeder/yaml-cpp.git
synced 2025-09-09 12:41:17 +00:00
Make sure tests are run in CI (#1170)
* Test(CMake) set NAME and COMMAND in add_test * (CMake) add enable_testing() * (CMake) move cmake_dependent_option up, before using them * (CMake) use YAML_CPP_MAIN_PROJECT in cmake_dependent_option * (CMake) log values regarding tests * (CMake) always find CTest, but don't enable tests * (CMAKE)(temp) fix logging * (actions) set YAML_CPP_BUILD_TESTS for tests * (actions) provide YAML_CPP_BUILD_TESTS to ctest * (actions) set -DYAML_CPP_BUILD_TESTS at build * (actions) don't fail false * (actions) build tests in Test step * (actions) run tests verbose * (CMake) remove temp logging * (actions) split building from running tests * (actions) ctest Debug * (actions) ctest Debug * Remove enable_testing
This commit is contained in:

committed by
GitHub

parent
d7f672d141
commit
3ff7ab07ac
15
.github/workflows/build.yml
vendored
15
.github/workflows/build.yml
vendored
@@ -9,6 +9,7 @@ permissions: read-all
|
||||
jobs:
|
||||
cmake-build:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||
build: [static, shared]
|
||||
@@ -22,6 +23,7 @@ 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 }}
|
||||
@@ -36,10 +38,17 @@ jobs:
|
||||
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: Test
|
||||
|
||||
- name: Build Tests
|
||||
shell: bash
|
||||
run: cd build && ctest --output-on-failure
|
||||
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 }}
|
||||
cd build && cmake --build . --parallel ${{ steps.cpu-cores.outputs.count }}
|
||||
|
||||
- name: Run Tests
|
||||
shell: bash
|
||||
run: |
|
||||
cd build && ctest -C Debug --output-on-failure --verbose
|
||||
|
||||
bazel-build:
|
||||
strategy:
|
||||
|
Reference in New Issue
Block a user