Skip to content

Commit

Permalink
codecov options
Browse files Browse the repository at this point in the history
  • Loading branch information
jngrad authored Oct 27, 2022
1 parent 03cfc2b commit a0d52f7
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,7 +352,9 @@ if [ "${with_coverage}" = true ] || [ "${with_coverage_python}" = true ]; then
shasum -a 256 -c codecov.SHA256SUM
chmod +x codecov

codecov_options=""
if [ "${with_coverage}" = true ]; then
codecov_options="--gcov"
echo "Running lcov and 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
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_options} -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 a0d52f7

Please sign in to comment.