Compare commits

..

10 Commits

Author SHA1 Message Date
hashlag
0c3ce4af8d Merge branch 'lcov-report-ci'
All checks were successful
Chaos Ci / test-and-benchmark (push) Successful in 2m24s
Add coverage report generation to the CI workflow.
2026-01-28 23:15:42 +03:00
hashlag
01d7d19ee6 Remove lcov --ignore-errors flag.
All checks were successful
Chaos Ci / test-and-benchmark (push) Successful in 2m28s
2026-01-28 23:06:47 +03:00
hashlag
612b11b02f Run lcov with proper --exclude flags to eliminate unwanted coverage data generation
All checks were successful
Chaos Ci / test-and-benchmark (push) Successful in 2m30s
2026-01-28 22:59:55 +03:00
hashlag
15bb663281 Revert "Run lcov with --no-external flag set"
Library headers are considered externals in this case.

This reverts commit 9a764c06db.
2026-01-28 22:51:38 +03:00
hashlag
9a764c06db Run lcov with --no-external flag set
All checks were successful
Chaos Ci / test-and-benchmark (push) Successful in 2m32s
2026-01-28 22:45:09 +03:00
hashlag
b02685d29f Give the upload-artifact step a proper name
All checks were successful
Chaos Ci / test-and-benchmark (push) Successful in 2m26s
2026-01-28 02:25:44 +03:00
hashlag
1a999a7dd3 Downgrade to actions/upload-artifact@v3
All checks were successful
Chaos Ci / test-and-benchmark (push) Successful in 2m37s
2026-01-28 02:18:02 +03:00
hashlag
18bcd87f81 Ignore lcov mismatch errors
Some checks failed
Chaos Ci / test-and-benchmark (push) Failing after 2m23s
2026-01-28 02:11:07 +03:00
hashlag
07663decf9 ChaosCi: Report coverage via lcov + genhtml
Some checks failed
Chaos Ci / test-and-benchmark (push) Failing after 2m31s
2026-01-28 02:05:36 +03:00
hashlag
2a5a2c96b5 ChaosTests: Build with --coverage in Debug 2026-01-28 02:04:17 +03:00
2 changed files with 20 additions and 2 deletions

View File

@@ -15,7 +15,7 @@ jobs:
- name: Install - name: Install
run: | run: |
sudo apt-get update sudo apt-get update
sudo apt-get install -y build-essential cmake valgrind sudo apt-get install -y build-essential cmake valgrind lcov
- name: Configure and build [Debug] - name: Configure and build [Debug]
run: | run: |
@@ -34,3 +34,16 @@ jobs:
- name: Run benchmarks - name: Run benchmarks
run: ./build-release/ChaosBenches/ChaosBenches run: ./build-release/ChaosBenches/ChaosBenches
- name: Process coverage data
run: |
lcov --exclude '*/usr/*' --exclude '*/_deps/*' --exclude '*/ChaosTests/*' -c -d build-debug/ -o lcovout
genhtml lcovout -o coverage-report
- name: Upload coverage report
uses: actions/upload-artifact@v3
with:
name: CoverageReport
path: coverage-report/
if-no-files-found: error
include-hidden-files: true

View File

@@ -26,6 +26,11 @@ target_include_directories(ChaosTests PRIVATE
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/Chaos> $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/Chaos>
) )
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
target_compile_options(ChaosTests PRIVATE --coverage)
target_link_options(ChaosTests PRIVATE --coverage)
endif()
include(GoogleTest) include(GoogleTest)
gtest_discover_tests(ChaosTests) gtest_discover_tests(ChaosTests)