Skip to content

Conversation

@AdityaPandeyCN
Copy link

@AdityaPandeyCN AdityaPandeyCN commented Nov 1, 2025

This PR adds Code coverage and clang-tidy workflow to the project.
The changes made are:-

  1. Added Code Coverage Infrastructure
  • Created .codecov.yml configuration with 85% coverage target for new code
  • Added GitHub Actions coverage job that runs tests and generates coverage reports
  • Added ENABLE_COVERAGE CMake option
  1. Added Static Code Analysis
  • Created .github/workflows/clang-tidy-review-post.yml for automated code review
  • Configured clang-tidy to post review comments on PRs (max 10 comments)
  • Set up CI to fail on clang-tidy warnings
  1. Fixed Build Dependencies
  • Created generate_sam.cxx to separate SAM file generation from benchmark code
  • Refactored sam_generator library to be available for tests without benchmark dependency
  • Updated CMake to include benchmark directory when tests OR benchmarks are enabled
  • Resolved circular dependency that prevented tests from building independently
  1. CMake Improvements
  • Added coverage build configuration with gcovr and lcov
  • Created make coverage target for local coverage generation
  • Fixed conditional compilation of test utilities

clang tidy post

Signed-off-by: AdityaPandeyCN <adityapand3y666@gmail.com>
Signed-off-by: AdityaPandeyCN <adityapand3y666@gmail.com>
@AdityaPandeyCN AdityaPandeyCN marked this pull request as draft November 1, 2025 04:52
Signed-off-by: AdityaPandeyCN <adityapand3y666@gmail.com>
@codecov-commenter
Copy link

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered ☂️

@AdityaPandeyCN AdityaPandeyCN marked this pull request as ready for review November 1, 2025 16:35
@AdityaPandeyCN
Copy link
Author

The chromosome test is flaky passes locally but sometimes fails here

Signed-off-by: AdityaPandeyCN <adityapand3y666@gmail.com>

update cmake

Signed-off-by: AdityaPandeyCN <adityapand3y666@gmail.com>

clang changes

Signed-off-by: AdityaPandeyCN <adityapand3y666@gmail.com>
Signed-off-by: AdityaPandeyCN <adityapand3y666@gmail.com>

clang changes

Signed-off-by: AdityaPandeyCN <adityapand3y666@gmail.com>
Signed-off-by: AdityaPandeyCN <adityapand3y666@gmail.com>
Signed-off-by: AdityaPandeyCN <adityapand3y666@gmail.com>
Signed-off-by: AdityaPandeyCN <adityapand3y666@gmail.com>
@AdityaPandeyCN AdityaPandeyCN marked this pull request as ready for review November 2, 2025 03:36
@vgvassilev
Copy link

The chromosome test is flaky passes locally but sometimes fails here

That’s an indicator of a problem. Can you run with valgrind?

@AdityaPandeyCN
Copy link
Author

It was a race condition I have fixed it using global mutex.

Copy link

@vgvassilev vgvassilev left a comment

Choose a reason for hiding this comment

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

Lgtm!

@vgvassilev vgvassilev merged commit 129231a into compiler-research:develop Nov 2, 2025
4 checks passed
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.

3 participants