Skip to content

ci: report C++ line coverage from the Metal test run (re-land of #25) - #28

Merged
Gajesh2007 merged 2 commits into
mainfrom
ci/coverage-on-main
Oct 2, 2026
Merged

Gajesh2007 merged 2 commits into
mainfrom
ci/coverage-on-main

Conversation

@davidtai

Copy link
Copy Markdown

Proposed changes

PR #25 added the C++ coverage report to the Fork Tests job, but it was merged into the ci/fork-tests branch after #22 had already merged that branch into main. So its change never reached main. This PR re-lands the same two commits on main, rebased, with no other change.

The step builds with clang instrumentation, merges the profiles from the C++ test binary and the Python tests with llvm-profdata, runs llvm-cov report, writes the TOTAL line to the job summary and uploads the full report. It measures instrumented host code. Metal shaders are outside the denominator. There is no threshold; the target of 80% is reported, not enforced.

Test plan

CONTRIBUTING checklist

  • Formatting: the Check Lint job on this head.
  • Tests: this PR adds no library code; the workflow run is the test.
  • Benchmarks: not applicable, no library code changes.

Dependencies

None. #22, #23 and #24 are on main.

🤖 Generated with Claude Code

davidtai and others added 2 commits September 28, 2026 19:53
Build with clang coverage instrumentation through CFLAGS and CXXFLAGS.
Both builds in build-macos run cmake from scratch and read them. The
test step writes one profile for each process and instrumented binary.

After the tests, merge the profiles and report line coverage for the C++
test binary and the installed Python extension and libraries. Write the
totals to the job summary and upload the full report as an artifact.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The first report counted the generated sources in the two build
folders and the headers of the uv Python. Ignore every path under a
build folder and the uv Python folder, so that the totals count only
the mlx sources.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@Gajesh2007
Gajesh2007 merged commit 58c6f0c into main Oct 2, 2026
11 checks passed
@davidtai
davidtai deleted the ci/coverage-on-main branch October 4, 2026 22:00
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