Skip to content

ci: merge coverage with grcov instead of lcov - #125

Merged
stewartadam merged 1 commit into
mainfrom
claude/project-thread-72ndgz-grcov
Nov 26, 2026
Merged

stewartadam merged 1 commit into
mainfrom
claude/project-thread-72ndgz-grcov

Conversation

@stewartadam

@stewartadam stewartadam commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Follow-up to #116 and #117 (issue #7).

What changed

  • coverage: merges the three lcov.info files and builds the HTML report with grcov 0.10.7 (MPL-2.0) instead of lcov/genhtml. Installing lcov from apt took about 45 s per run, mostly downloading 42 Perl dependencies from a slow mirror (28 s at 170 kB/s in the last main run). grcov is a single prebuilt binary, installed by taiki-e/install-action, which verifies the download's checksum.
  • grcov writes file paths relative to the checkout (--source-dir .), so the summary's awk no longer strips the workspace prefix. diff-cover handles the relative paths.
  • test-linux: installs cargo-llvm-cov 0.9.1 with install-action too, instead of cargo install (about 45 s).
  • actions.lock: adds taiki-e/install-action.

The badge data step is unchanged; grcov also writes a coverage.json into the HTML folder, which that step overwrites. The HTML report's function column overcounts, as genhtml's would have with function coverage on: the library is built separately for the unit tests and each integration test binary. The job summary and the badge use lines only.

Unchanged: the Docker image still builds cargo-llvm-cov with cargo install for the network test jobs; that is handled separately.

Testing

  • Locally, grcov's merge of lcov files from different test subsets gave the same totals as lcov's (2986 of 3617 lines), with relative paths, and diff-cover reads its output.
  • zizmor (offline) passes locally.

Generated by Claude Code

Installing lcov from apt took about 45 s per run, most of it
downloading its 42 Perl dependencies from a slow mirror. Merge the
three lcov files and build the HTML report with grcov instead, a
single prebuilt binary installed by taiki-e/install-action in a few
seconds. grcov also makes the file paths relative to the checkout, so
the summary no longer strips the workspace prefix.

test-linux installs cargo-llvm-cov the same way instead of building it
with `cargo install`, which took about 45 s.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KzaQVQ6BqbHfXjsr8G5rP3
@stewartadam stewartadam self-assigned this Nov 26, 2026
@stewartadam
stewartadam merged commit ac58e04 into main Nov 26, 2026
13 checks passed
@stewartadam
stewartadam deleted the claude/project-thread-72ndgz-grcov branch November 26, 2026 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants