Skip to content

CI: Report coverage and test results per library on Codecov - #1360

Open
ACSimon33 wants to merge 19 commits into
Reference-LAPACK:masterfrom
ACSimon33:ci_coverage_all_projects
Open

CI: Report coverage and test results per library on Codecov#1360
ACSimon33 wants to merge 19 commits into
Reference-LAPACK:masterfrom
ACSimon33:ci_coverage_all_projects

Conversation

@ACSimon33

@ACSimon33 ACSimon33 commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

Description

The Codecov report was a single number for the whole repository, built from a
coverage job that measured almost nothing, and the test results were not
reported at all.

  • Coverage per library. BLAS, CBLAS, LAPACK and LAPACKE are instrumented and uploaded separately, each from its own build directory, under a flag and a component of its own (codecov.yml). The test programs and tmglib are components too: a routine that never runs there is a test that was written and never reached. The README badge becomes one badge per library.
  • The coverage job now measures something. The instrumentation is applied through one lapack_add_coverage() helper instead of ad-hoc per-directory code, gcov runs with -b -c so branch coverage exists, and the job prints a per-component table and fails when a component measured nothing — an empty flag would otherwise disappear from the report silently.
  • Test results. The JUnit XML from lapack_testing.py is uploaded as a test-results report from every test job, so failures show up in the pull request comment (this is a preview feature on codecov.io and doesn't work reliably yet). Each <testsuite> gained assertions and time, and the BLAS, CBLAS and DMD drivers gained the Total time used footer the LAPACK drivers already printed, so that every test case is timed.

CODECOV_TOKEN has to be set as a secret of the codecov environment for the uploads to be attributed.

Copilot AI lite review requested due to automatic review settings August 7, 2026 22:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@ACSimon33 ACSimon33 changed the title CI: BLAS, CBLAS, and LAPACKE coverage- #1359 CI: BLAS, CBLAS, and LAPACKE coverage Aug 7, 2026
@ACSimon33
ACSimon33 marked this pull request as draft August 8, 2026 00:23
@codecov

codecov Bot commented Aug 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 69.01%. Comparing base (69992ad) to head (ef940c6).
⚠️ Report is 747 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           master    #1360       +/-   ##
===========================================
+ Coverage    0.00%   69.01%   +69.01%     
===========================================
  Files        1937     6122     +4185     
  Lines      190566   486111   +295545     
  Branches        0    23286    +23286     
===========================================
+ Hits            0   335510   +335510     
+ Misses     190566   150412    -40154     
- Partials        0      189      +189     
Components Coverage Δ
BLAS 97.94% <96.97%> (∅)
CBLAS 96.98% <ø> (∅)
LAPACK 82.37% <ø> (+82.37%) ⬆️
LAPACKE 0.10% <ø> (∅)
TMGLIB 55.72% <ø> (∅)
BLAS testing 88.33% <85.07%> (∅)
CBLAS testing 89.63% <ø> (∅)
LAPACK testing 82.35% <ø> (∅)
LAPACKE testing ∅ <ø> (∅)
Files with missing lines Coverage Δ
BLAS/TESTING/cblat1.f 88.77% <100.00%> (ø)
BLAS/TESTING/cblat2.f 85.45% <100.00%> (ø)
BLAS/TESTING/cblat3.f 90.97% <100.00%> (ø)
BLAS/TESTING/dblat1.f 90.84% <100.00%> (ø)
BLAS/TESTING/dblat2.f 85.37% <100.00%> (ø)
BLAS/TESTING/dblat3.f 89.44% <100.00%> (ø)
BLAS/TESTING/sblat1.f 91.96% <100.00%> (ø)
BLAS/TESTING/sblat2.f 85.37% <100.00%> (ø)
BLAS/TESTING/sblat3.f 89.45% <100.00%> (ø)
BLAS/TESTING/zblat1.f 88.77% <100.00%> (ø)
... and 18 more

... and 6059 files with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 51b3494...ef940c6. Read the comment docs.

@ACSimon33
ACSimon33 marked this pull request as ready for review August 8, 2026 16:00
ACSimon33 and others added 7 commits August 9, 2026 00:58
The coverage build measured only the libraries, so nothing showed which
parts of the testers themselves never run.  The test executables now get
the same instrumentation.

Their link calls move to the keyword signature of target_link_libraries,
which lapack_add_coverage already uses; CMake refuses to mix the two on
one target.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The matrix generators were the last uninstrumented sources: 74 files
that every LAPACK test calls to build its inputs, with no coverage of
their own.  They report 56% of lines.

Their reports and those of the LIN and EIG testers build under TESTING/
rather than SRC/, which no upload covered, so they need one of their
own.  It carries the existing lapack flag; the flags are unchanged.

codecov.yml gains a component for the generators and one per test
framework, so that a test written and never reached shows up as such
instead of being averaged into the library it exercises.  The LAPACKE
entry matches nothing until its test suite lands.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The single badge averaged everything together, so a drop in one library
was invisible unless it moved the whole.

The badges select components rather than flags.  A flag covers whatever
its upload contained, which since the test programs became instrumented
includes them; the components are scoped to the library sources alone.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@ACSimon33 ACSimon33 changed the title CI: BLAS, CBLAS, and LAPACKE coverage CI: Report coverage and test results per library on Codecov Aug 10, 2026
ACSimon33 and others added 2 commits August 10, 2026 19:12
The pin back to v5.5.5 was made while the test analytics reports were
not being displayed, on the suspicion that the action was at fault.  It
was not: the reports carried no JUnit timing fields at all, which is
what the parser was tripping over, and the run that first showed them
correctly had already been through CI on v5.5.5 without them.

So there is nothing to be gained from staying a major version behind.
v7.0.0 is the current release, and the workflow was written against it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Codecov's test results parser documents the fields it expects a report
to carry: name, tests, failures, errors and time on <testsuites>, those
plus skipped and timestamp on <testsuite>, and classname, name and time
on <testcase>.  Of those, timestamp was the only one the report did not
have.

A suite is stamped with the earliest start among its cases: the moment
this script launched the first driver under --run, and otherwise the
modification time of the oldest of their output files, which is when
the driver that wrote it finished.  That is a close enough stand-in for
when the suite ran, and it keeps the stamp of a report built from
output files honest rather than claiming the time of the analysis.

The synthetic suite that reports unrecognized .out files has no driver
behind it, so it is stamped with the report time and given a run time
of zero -- a true zero, unlike the unknown time of a case whose output
is missing, which continues to carry no time at all.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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