Skip to content

Commit

Permalink
Coverage collection setup after tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pzxmsry committed Jan 15, 2024
1 parent ab84600 commit dd792b5
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/cmake_ctest_multiplatform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,6 @@ jobs:
run: |
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
- name: Create gcov for clang script
working-directory: ${{ steps.strings.outputs.build-output-dir }}
run: echo '#!/bin/bash' >> gcov_for_clang.sh && echo "exec llvm-cov gcov \"\$@\"" >> gcov_for_clang.sh
if: ${{ matrix.os == 'ubuntu-latest' }}

- name: Install llvm-cov lcov
run: sudo apt update && sudo apt install llvm lcov
if: ${{ matrix.os == 'ubuntu-latest' }}

- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
Expand All @@ -99,6 +90,15 @@ jobs:
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: ctest --build-config ${{ matrix.build_type }}

- name: Create gcov for clang script
working-directory: ${{ steps.strings.outputs.build-output-dir }}
run: echo '#!/bin/bash' >> gcov_for_clang.sh && echo "exec llvm-cov gcov \"\$@\"" >> gcov_for_clang.sh
if: ${{ matrix.os == 'ubuntu-latest' }}

- name: Install llvm-cov lcov
run: sudo apt update && sudo apt install llvm lcov
if: ${{ matrix.os == 'ubuntu-latest' }}

- name: Gather coverage GCC
working-directory: ${{ steps.strings.outputs.build-output-dir }}
run: lcov --capture --directory . | sed s@^SF:%s/@SF:@ > lcov.info
Expand Down

0 comments on commit dd792b5

Please sign in to comment.