Skip to content

ci: render macOS and Windows coverage with gcovr's boost theme - #397

Merged
sgerbino merged 1 commit into
cppalliance:developfrom
sgerbino:pr/coverage-boost-theme
Oct 17, 2026
Merged

sgerbino merged 1 commit into
cppalliance:developfrom
sgerbino:pr/coverage-boost-theme

Conversation

@sgerbino

Copy link
Copy Markdown
Collaborator

Coverage on develop has been broken since gcovr 8.7 was released on 2026-10-16. The macOS and Windows jobs install gcovr without a version pin. They render with the ci-automation template copy (--html-template-dir=ci-automation/gcovr-templates/html). gcovr 8.7 now raises an error for any undefined template variable. The template copy leaves parent_link (directory navigation) and html_filename (functions page) undefined, so the report step fails:

jinja2.exceptions.UndefinedError: 'parent_link' is undefined

Those templates have been upstreamed into gcovr as the built-in boost theme. The Linux job already renders with it through lcov-jenkins-gcc-13.sh, which is why Linux still passed.

This switches macOS and Windows to the same rendering as Linux:

  • Replace --html-template-dir with --html-theme=boost.green --no-html-self-contained.
  • Remove the gcovr_build_tree.py step. gcovr now puts the sidebar tree in index.js.
  • Copy the Monaspace fonts into the output. The theme's stylesheet references them, but gcovr doesn't write them out.

Tested with a manual run on a fork: https://github.com/sgerbino/corosio/actions/runs/38999085340. All three coverage jobs pass, and the macOS and Windows artifacts have the same layout as Linux. That run's Deploy job failed only because the test branch name contains a slash. The deploy job only creates develop/ and master/, so the copy into pr/coverage-boost-theme/ had no parent folder. A run on develop writes to develop/, which the job creates.

gcovr 8.7 renders templates with StrictUndefined, which breaks the
ci-automation template copy on variables it leaves undefined. Use the
built-in boost.green theme the Linux job already uses; it embeds the
sidebar tree, so gcovr_build_tree.py is no longer needed.
@cppalliance-bot

Copy link
Copy Markdown

An automated preview of the documentation is available at https://397.corosio.prtest3.cppalliance.org/index.html

If more commits are pushed to the pull request, the docs will rebuild at the same URL.

2026-10-17 03:54:39 UTC

@cppalliance-bot

Copy link
Copy Markdown

GCOVR code coverage report https://397.corosio.prtest3.cppalliance.org/gcovr/index.html
LCOV code coverage report https://397.corosio.prtest3.cppalliance.org/genhtml/index.html
Coverage Diff Report https://397.corosio.prtest3.cppalliance.org/diff-report/index.html

Build time: 2026-10-17 04:11:00 UTC

@sgerbino
sgerbino merged commit 280074a into cppalliance:develop Oct 17, 2026
42 checks passed
@sgerbino
sgerbino deleted the pr/coverage-boost-theme branch October 17, 2026 11:49
@github-project-automation github-project-automation Bot moved this from Backlog to Done in Beast2 Oct 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants