Skip to content

ci: fix coverage profile collection and move benchmarks to PR checks - #41

Merged
sentomk merged 1 commit into
mainfrom
fix/coverage-and-bench-trigger
Jul 31, 2026
Merged

sentomk merged 1 commit into
mainfrom
fix/coverage-and-bench-trigger

Conversation

@sentomk

@sentomk sentomk commented Jul 31, 2026 •

Copy link
Copy Markdown
Owner

Summary

Coverage was reporting ~27% because gtest_discover_tests runs each
TEST() as a separate process (152 total), but LLVM_PROFILE_FILE was
never set. Every process wrote to the same default.profraw, each
overwriting the previous one -- only the last test case's data
survived. The benchmark job in ci.yml was also push-to-main only,
meaning a bench failure left main in a red state with no rollback.

Changes

  • ci.yml: set LLVM_PROFILE_FILE with %p-%m pattern so each test
    process writes its own profraw file. Removed the benchmark job.
  • ci-pr.yml: new benchmark job runs on PRs with continue-on-error,
    informational only, uploads artifacts, never blocks merge.
  • bench-publish.yml: new dedicated push-to-main workflow that
    generates charts and commits them to docs/assets/bench/.

Testing

CI on this PR verifies all three changes: coverage should jump from
~27% to 70%+, benchmark job runs as informational PR check, and
bench-publish triggers on next push to main.

Coverage fix: gtest_discover_tests runs each TEST() as a separate
process. Without LLVM_PROFILE_FILE, all 152 processes wrote to the
same default.profraw, each overwriting the previous one — only the
last test's coverage survived. Set LLVM_PROFILE_FILE=build/profile/
%p-%m.profraw so each process gets its own file.

Benchmark restructure: remove the benchmark job from ci.yml (which
runs on push to main, meaning a bench failure put main in a failed
state with no easy rollback). Instead:
- ci-pr.yml: new benchmark job runs on PRs (informational only,
  continue-on-error, artifacts only — never blocks merge)
- bench-publish.yml: dedicated push-to-main workflow that generates
  and commits charts to docs/assets/bench/
@sentomk
sentomk force-pushed the fix/coverage-and-bench-trigger branch from 7ebde55 to f47bac0 Compare July 31, 2026 04:18
@codecov

codecov Bot commented Jul 31, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@sentomk
sentomk merged commit 05a3fc9 into main Jul 31, 2026
22 of 23 checks passed
@sentomk
sentomk deleted the fix/coverage-and-bench-trigger branch July 31, 2026 04:30
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