Skip to content

Commit

Permalink
Update tests.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
alugowski authored Feb 7, 2024
1 parent d4b8c45 commit 432c93a
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ jobs:
version: ${{ matrix.llvm-version }}
env: true

- name: Setup Windows
if: runner.os == 'Windows'
run: choco install opencppcoverage

- name: Build and Test
run: |
pip install gcovr
Expand All @@ -76,17 +80,9 @@ jobs:
if [ -n '${{ matrix.gcov_executable }}' ]; then
gcovr --delete --root ../../ --print-summary --xml coverage.xml . --gcov-executable '${{ matrix.gcov_executable }}' --merge-mode-functions=separate --gcov-ignore-parse-errors=negative_hits.warn_once_per_file
fi
cd ../..
done
shell: bash

- name: Create code coverage report (Windows)
if: runner.os == 'Windows'
run: |
choco install opencppcoverage
for cppstd in ${{ matrix.cppstd }}; do
cd build-cpp${cppstd}/tests
OpenCppCoverage.exe --export_type cobertura:coverage.xml --cover_children -- ctest -C Debug
if [ '${{ runner.os }}' -eq 'Windows' ]; then
OpenCppCoverage.exe --export_type cobertura:coverage.xml --cover_children -- ctest -C Debug
fi
cd ../..
done
shell: bash
Expand Down

0 comments on commit 432c93a

Please sign in to comment.