From 3ef2e8e3dae696455ef4b493dcddf4d0b4058b7c Mon Sep 17 00:00:00 2001 From: David Hummel <6109326+hummeltech@users.noreply.github.com> Date: Wed, 17 Apr 2024 14:41:49 -0700 Subject: [PATCH] Address lcov/geninfo error on macOS --- .github/actions/run_tests/action.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/actions/run_tests/action.yml b/.github/actions/run_tests/action.yml index 25d8b3b98..87d13e962 100644 --- a/.github/actions/run_tests/action.yml +++ b/.github/actions/run_tests/action.yml @@ -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'