From f8d06236a0b99eaee9f76888dfd5c93001e6b217 Mon Sep 17 00:00:00 2001 From: Steve Gerbino Date: Sat, 17 Oct 2026 05:30:56 +0200 Subject: [PATCH] ci: render macOS and Windows coverage with gcovr's boost theme 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. --- .github/workflows/code-coverage.yml | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/code-coverage.yml b/.github/workflows/code-coverage.yml index 8d60317f0..5ec923562 100644 --- a/.github/workflows/code-coverage.yml +++ b/.github/workflows/code-coverage.yml @@ -279,13 +279,14 @@ jobs: ln -sfn "boost-root/libs/${module}/include" include 2>/dev/null || true ln -sfn "boost-root/libs/${module}/src" src 2>/dev/null || true - # Second pass: generate nested HTML from fixed JSON with custom templates + # Second pass: generate nested HTML from fixed JSON with gcovr's boost theme gcovr \ -a gcovr/coverage-fixed.json \ --merge-mode-functions separate \ --sort uncovered-percent \ --html-nested \ - --html-template-dir=ci-automation/gcovr-templates/html \ + --html-theme=boost.green \ + --no-html-self-contained \ --html-title "${module}" \ --merge-lines \ --exclude-unreachable-branches \ @@ -297,8 +298,8 @@ jobs: --html --output gcovr/index.html \ --json-summary-pretty --json-summary gcovr/summary.json - - name: Generate sidebar navigation - run: python3 ci-automation/scripts/gcovr_build_tree.py gcovr + # The theme's stylesheet references these fonts but gcovr does not emit them + cp ci-automation/gcovr-templates/html/*.woff2 gcovr/ - name: Generate badges run: python3 ci-automation/scripts/generate_badges.py gcovr --json gcovr/summary.json @@ -507,13 +508,14 @@ jobs: ln -sfn "boost-root/libs/${module}/include" include 2>/dev/null || true ln -sfn "boost-root/libs/${module}/src" src 2>/dev/null || true - # Second pass: generate nested HTML from fixed JSON with custom templates + # Second pass: generate nested HTML from fixed JSON with gcovr's boost theme gcovr \ -a gcovr/coverage-fixed.json \ --merge-mode-functions separate \ --sort uncovered-percent \ --html-nested \ - --html-template-dir=ci-automation/gcovr-templates/html \ + --html-theme=boost.green \ + --no-html-self-contained \ --html-title "${module}" \ --merge-lines \ --exclude-unreachable-branches \ @@ -525,8 +527,8 @@ jobs: --html --output gcovr/index.html \ --json-summary-pretty --json-summary gcovr/summary.json - - name: Generate sidebar navigation - run: python3 ci-automation/scripts/gcovr_build_tree.py gcovr + # The theme's stylesheet references these fonts but gcovr does not emit them + cp ci-automation/gcovr-templates/html/*.woff2 gcovr/ - name: Generate badges run: python3 ci-automation/scripts/generate_badges.py gcovr --json gcovr/summary.json