Repository navigation
ci: report C++ line coverage from the Metal test run (re-land of #25) - #28
Merged
Merged
Conversation
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>
This was referenced Sep 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed changes
PR #25 added the C++ coverage report to the Fork Tests job, but it was merged into the
ci/fork-testsbranch after #22 had already merged that branch intomain. So its change never reachedmain. This PR re-lands the same two commits onmain, 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, runsllvm-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
check_forkdiff.py --upstream-ref refs/remotes/upstream/mainpasses.main, the C++ and Python tests run to the end, so the coverage number includes the Python share for the first time.CONTRIBUTING checklist
Check Lintjob on this head.Dependencies
None. #22, #23 and #24 are on
main.🤖 Generated with Claude Code