Skip to content

add core-dev coverage#160

Merged
webern merged 4 commits into
masterfrom
ci-cov
May 30, 2026
Merged

add core-dev coverage#160
webern merged 4 commits into
masterfrom
ci-cov

Conversation

@webern
Copy link
Copy Markdown
Owner

@webern webern commented May 30, 2026

Summary

Adds a containerized make coverage-core-dev target.

  • New MX_COVERAGE CMake option adds --coverage instrumentation.
  • make coverage-core-dev builds and runs the
    core roundtrip suite with gcovr filtered to src/private/mx/core/.
  • A Linux-only CI job runs in parallel with the existing jobs, posts the
    summary to the run's job summary, and uploads a self-contained HTML
    report as an artifact. Advisory only; it does not gate.

Implementation notes

To keep the other contexts small, the coverage build is invoked via the
Dockerfile.coverage symlink, which makes BuildKit select
Dockerfile.coverage.dockerignore (data corpus included).

Current result: 52.1% lines, 50.0% functions, 35.3% branches.

Directly related to #156 which is tracked by #58

webern added 3 commits May 30, 2026 12:21
Add an MX_COVERAGE CMake option and a `make coverage-core-dev`
target that builds the trimmed core-dev tree instrumented with
--coverage, runs the core roundtrip suite, and runs gcovr filtered
to src/private/mx/core/. It runs in the pinned Docker toolchain, so
local and CI results match with no host dependency beyond Docker.

A Linux-only CI job runs it in parallel with the existing jobs,
writes the summary to the run's job summary, and uploads a
self-contained HTML report as an artifact. It is advisory and does
not gate.

The coverage build is invoked via the Dockerfile.coverage symlink so
BuildKit selects Dockerfile.coverage.dockerignore, which includes the
data corpus the core roundtrip suite scans at runtime. The gate
targets keep the tiny .dockerignore and their small build context.

Refs #58, #156
Post the gcovr summary as a sticky pull-request comment (one comment,
updated in place) linking the HTML report artifact, so results are
visible inline on the PR instead of buried in the run's job summary.

gcovr now also writes a 3-line summary.txt; CI turns it into a Markdown
table reused by the job summary and the comment. The uploaded artifact
is the single self-contained index.html, stored uncompressed.
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 30, 2026

Core-dev coverage src/private/mx/core/

Metric Coverage Covered / Total
Lines 52.1% 17624 / 33846
Functions 50.0% 3798 / 7589
Branches 35.3% 12649 / 35846

Download HTML report - unzip and open index.html.

Commit daeefbbf0b8aef94ac1c0895a3a6e25dcdac80fc.

@webern webern changed the title Add core-dev code coverage to CI add core-dev coverage May 30, 2026
Use `gh pr comment` instead of a sticky comment so each push adds a
new comment, keeping a per-run coverage history on the PR. Drops the
third-party sticky-comment action.
@github-actions
Copy link
Copy Markdown

Core-dev coverage src/private/mx/core/

Metric Coverage Covered / Total
Lines 52.1% 17624 / 33846
Functions 50.0% 3798 / 7589
Branches 35.3% 12649 / 35846

Download HTML report - unzip and open index.html.

Commit 408f834a367d2db8db2bb856bca0cb5c7e448ec2.

@webern webern merged commit 52291e2 into master May 30, 2026
6 checks passed
@webern webern deleted the ci-cov branch May 30, 2026 11:43
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.

1 participant