Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
jngrad committed Oct 31, 2022
1 parent ad2596a commit 7a27d2d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion maintainer/CI/build_cmake.sh
Original file line number Diff line number Diff line change
Expand Up @@ -352,8 +352,10 @@ if [ "${with_coverage}" = true ] || [ "${with_coverage_python}" = true ]; then
shasum -a 256 -c codecov.SHA256SUM
chmod +x codecov

codecov_opts=""
if [ "${with_coverage}" = true ]; then
echo "Running lcov and gcov..."
codecov_opts="${codecov_opts} --gcov"
lcov --gcov-tool "${GCOV:-gcov}" -q --directory . --ignore-errors graph --capture --output-file coverage.info # capture coverage info
lcov --gcov-tool "${GCOV:-gcov}" -q --remove coverage.info '/usr/*' --output-file coverage.info # filter out system
lcov --gcov-tool "${GCOV:-gcov}" -q --remove coverage.info '*/doc/*' --output-file coverage.info # filter out docs
Expand All @@ -366,7 +368,7 @@ if [ "${with_coverage}" = true ] || [ "${with_coverage_python}" = true ]; then
echo "Uploading to Codecov..."
for codecov_trial in 1 2 3; do
codecov_errno="0"
./codecov --gcov -t ${CODECOV_TOKEN} --nonZero || codecov_errno="${?}"
./codecov ${codecov_opts} -t "${CODECOV_TOKEN}" --nonZero || codecov_errno="${?}"
if [ ! "${codecov_errno}" = "0" ]; then
echo "Codecov did not upload coverage reports (return code: ${codecov_errno})" >&2
echo "That was attempt ${codecov_trial}/3"
Expand Down

0 comments on commit 7a27d2d

Please sign in to comment.