diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ff341bd5..d31b4b92 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -144,8 +144,12 @@ jobs: # make sure coverage is only enabled for Debug builds, since it sets -O0 to make sure coverage # has meaningful results - name: Configure CMake - run: | - cmake -S . -B ./build -G "${{matrix.generator}}" -DCMAKE_BUILD_TYPE:STRING=${{matrix.build_type}} -DENABLE_DEVELOPER_MODE:BOOL=${{matrix.developer_mode}} -DOPT_ENABLE_COVERAGE:BOOL=${{ matrix.build_type == 'Debug' }} -DGIT_SHA:STRING=${{ github.sha }} + run: > + cmake -S . -B ./build -G "${{matrix.generator}}" + -DCMAKE_BUILD_TYPE:STRING=${{matrix.build_type}} + -DENABLE_DEVELOPER_MODE:BOOL=${{matrix.developer_mode}} + -DOPT_ENABLE_COVERAGE:BOOL=${{ matrix.build_type == 'Debug' }} + -DGIT_SHA:STRING=${{ github.sha }} - name: Build # Execute the build. You can specify a specific target with "--target " @@ -157,15 +161,19 @@ jobs: working-directory: ./build # Execute tests defined by the CMake configuration. # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail - run: | + run: > ctest -C ${{matrix.build_type}} - gcovr -j ${{env.nproc}} --delete --root ../ --print-summary --xml-pretty --xml coverage.xml . --gcov-executable '${{ matrix.gcov_executable }}' + + gcovr -j ${{env.nproc}} --delete --root ../ --print-summary --xml-pretty + --xml coverage.xml . --gcov-executable '${{ matrix.gcov_executable }}' - name: Windows - Test and coverage if: runner.os == 'Windows' working-directory: ./build - run: | - OpenCppCoverage.exe --export_type cobertura:coverage.xml --cover_children -- ctest -C ${{matrix.build_type}} + run: > + OpenCppCoverage.exe + --export_type cobertura:coverage.xml + --cover_children -- ctest -C ${{matrix.build_type}} - name: CPack if: matrix.package_generator != '' diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 05955f2b..d0620b9d 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -90,8 +90,11 @@ jobs: # make sure coverage is only enabled for Debug builds, since it sets -O0 to make sure coverage # has meaningful results - name: Configure CMake - run: | - cmake -S . -B ./build -G "${{matrix.generator}}" -DCMAKE_BUILD_TYPE:STRING=${{matrix.build_type}} -DENABLE_DEVELOPER_MODE:BOOL=${{matrix.developer_mode}} -DOPT_ENABLE_COVERAGE:BOOL=${{ matrix.build_type == 'Debug' }} + run: > + cmake -S . -B ./build -G "${{matrix.generator}}" + -DCMAKE_BUILD_TYPE:STRING=${{matrix.build_type}} + -DENABLE_DEVELOPER_MODE:BOOL=${{matrix.developer_mode}} + -DOPT_ENABLE_COVERAGE:BOOL=${{ matrix.build_type == 'Debug' }} # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL