Compare commits
2 Commits
d0e7d2b0ec
...
07663decf9
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
07663decf9 | ||
|
|
2a5a2c96b5 |
@@ -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,14 @@ jobs:
|
|||||||
|
|
||||||
- name: Run benchmarks
|
- name: Run benchmarks
|
||||||
run: ./build-release/ChaosBenches/ChaosBenches
|
run: ./build-release/ChaosBenches/ChaosBenches
|
||||||
|
|
||||||
|
- name: Process coverage data
|
||||||
|
run: |
|
||||||
|
lcov --ignore-errors inconsistent -c -d build-debug/ -o lcovout
|
||||||
|
genhtml lcovout -o coverage-report
|
||||||
|
|
||||||
|
- uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: CoverageReport
|
||||||
|
path: coverage-report/
|
||||||
|
if-no-files-found: error
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user