Skip to content

Commit e1a2b5b

Browse files
committed
Fix CodeCov
1 parent 2da0295 commit e1a2b5b

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

.github/workflows/c-cpp.yml

+8-8
Original file line numberDiff line numberDiff line change
@@ -16,31 +16,31 @@ jobs:
1616
- name: Install dependencies
1717
run: |
1818
sudo apt-get update
19-
sudo apt-get install -y build-essential cmake
20-
sudo apt-get install -y libgtest-dev googletest lcov
19+
sudo apt-get install -y build-essential cmake lcov
20+
sudo apt-get install -y libgtest-dev googletest
2121
22-
- name: Configure CMake with Coverage
22+
- name: Configure CMake
2323
run: |
2424
cmake -B build -DCMAKE_BUILD_TYPE=Debug \
2525
-DCMAKE_CXX_FLAGS="-fprofile-arcs -ftest-coverage"
2626
2727
- name: Build
28-
run: cmake --build build
28+
run: cmake --build build --clean-first
2929

3030
- name: Run Tests
3131
working-directory: ./build
3232
run: ./ConcurrentHashMapTest
3333

3434
- name: Generate Coverage Report
3535
run: |
36-
lcov --capture --directory ./build --output-file coverage.info
36+
lcov --capture --directory ./build --output-file coverage.info \
37+
--rc geninfo_unexecuted_blocks=1 \
38+
--ignore-errors mismatch
3739
lcov --remove coverage.info '/usr/*' '*/test/*' --output-file coverage.info
3840
lcov --list coverage.info
3941
4042
- name: Upload to Codecov
4143
uses: codecov/codecov-action@v5
4244
with:
4345
token: ${{ secrets.CODECOV_TOKEN }}
44-
file: coverage.info
45-
flags: cpp
46-
name: Codecov-CPP
46+
file: coverage.info

0 commit comments

Comments
 (0)