Merge pull request #4442 from hummeltech/macOSLCOV

Address `lcov`/`geninfo` errors on macOS CI builds
This commit is contained in:
Artem Pavlenko 2024-04-19 08:57:01 +01:00 committed by GitHub
commit a8d1797bcf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -73,9 +73,12 @@ runs:
if: runner.os != 'Windows'
shell: "bash"
run: |
lcov --directory . --capture --output-file coverage.info
lcov --remove coverage.info '/usr/*' '*/vcpkg_installed/*' '/.cache/*' '*/test/*' --output-file coverage.info
lcov --list coverage.info
if [ "$RUNNER_OS" == "macOS" ]; then
LCOV_EXTRA_OPTIONS="--ignore-errors gcov --ignore-errors inconsistent --ignore-errors unused"
fi
lcov ${LCOV_EXTRA_OPTIONS:-} --directory . --capture --output-file coverage.info
lcov ${LCOV_EXTRA_OPTIONS:-} --remove coverage.info '/usr/*' '*/vcpkg_installed/*' '/.cache/*' '*/test/*' --output-file coverage.info
lcov ${LCOV_EXTRA_OPTIONS:-} --list coverage.info
- name: Upload coverage to Codecov (linux & macos)
if: runner.os != 'Windows'