diff --git a/.github/workflows/makefile.yml b/.github/workflows/makefile.yml index fa054241..d6585fa1 100644 --- a/.github/workflows/makefile.yml +++ b/.github/workflows/makefile.yml @@ -106,6 +106,12 @@ jobs: scripts/parse-coverage-output.py < coverage-output.txt )" + - name: Upload coverage report + uses: actions/upload-artifact@v3 + with: + name: coverage-report-detailed.zip + path: coverage-report-detailed/ + # Post an autogenerated comment on the Pull Request (in case the action is run # because of one). post-results-comment: diff --git a/.gitignore b/.gitignore index eba9ecb2..3bb24685 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /binaries-for-github-release/ /built_app_packages/ +/coverage-report-detailed/ diff --git a/coverage-report.sh b/coverage-report.sh index 380fe509..3d14e0c7 100755 --- a/coverage-report.sh +++ b/coverage-report.sh @@ -71,6 +71,13 @@ done # weirdness of llvm-cov's CLI). Trim the leading whitespace via one sed # invocation and replace inner spaces with the flag using the second one. llvm_cov_args=$(echo "${executables}" | sed 's/^ //g' | sed 's/ / -object /g') +# Create detailed coverage HTML page with per-line information. +llvm-cov show \ + -format=html \ + ${llvm_cov_args} \ + -instr-profile=env/coverage-artifacts/all.profdata \ + -ignore-filename-regex=${IGNORE_FILENAME_REGEX} \ + -output-dir=coverage-report-detailed/ # Print the coverage report table to stdout, so that the report can be parsed by # the next steps of the pipeline. (Everything above was logged to stderr.) llvm-cov report \