Skip to content

Update CI workflow for C++ coverage generation and testing #571

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Dec 6, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 23 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,29 @@ jobs:
- name: Build package
run: |
python scripts/build/install.py


- name: Build C++ Code with Coverage
run: |
mkdir -p build
cd build
cmake -DCMAKE_CXX_FLAGS="--coverage" ..
Copy link
Member

Choose a reason for hiding this comment

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

This is not the right way. Nice attempt though.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed this part of the code for now sir ,will work on it after the current issue

make

- name: Run C++ Tests
run: |
cd build
./test_binary
# Capture and Generating Coverage Report with lcov
- name: Capture Coverage Data with lcov
run: |
cd build
lcov --capture --directory . --output-file coverage.info

- name: Generate HTML Coverage Report with genhtml
run: |
cd build
genhtml coverage.info --output-directory coverage_report

- name: Run tests
run: |
python -m pytest --doctest-modules --cov=./ --cov-report=xml -s
Expand Down
Loading