btrfs-progs/.github/workflows/coverage.yml
David Sterba fb58bca82d btrfs-progs: ci: fix lcov warnings on unexecuted blocks
There's a report on the CI after base ubuntu image update:

geninfo: WARNING:
/home/runner/work/btrfs-progs/btrfs-progs/common/device-scan.c:429:
unexecuted block on non-branch line with non-zero hit count.  Use
"geninfo --rc geninfo_unexecuted_blocks=1 to set count to zero.
	(use "geninfo --ignore-errors gcov,gcov ..." to suppress this warning)

Signed-off-by: David Sterba <dsterba@suse.com>
2024-06-20 10:15:52 +09:30

65 lines
2.2 KiB
YAML

# Code coverage when running all the tests, lcov published as artifacts
name: Code coverage tests
run-name: Code coverage tests
on:
push:
branches:
- coverage-test
- master
jobs:
build:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- run: uname -a
- run: sudo modprobe btrfs
- run: sudo apt-get install -y pkg-config gcc liblzo2-dev libzstd-dev libblkid-dev uuid-dev zlib1g-dev libext2fs-dev e2fsprogs libudev-dev python3-sphinx libaio-dev liburing-dev attr jq lcov
- name: Configure
run: ./autogen.sh && ./configure --disable-documentation
- name: Make
run: make V=1 D=gcov
- name: Tests cli
run: sudo make D=gcov TEST_LOG=dump test-cli
- name: Tests mkfs
run: sudo make D=gcov TEST_LOG=dump test-mkfs
- name: Tests check
run: sudo make D=gcov TEST_LOG=dump test-check
- name: Tests check (lowmem)
run: sudo make D=gcov TEST_LOG=dump test-check-lowmem
- name: Tests misc
run: sudo make D=gcov TEST_LOG=dump test-misc
- name: Tests fuzz
run: sudo make D=gcov TEST_LOG=dump test-fuzz
- name: Tests convert
run: sudo make D=gcov TEST_LOG=dump test-convert
- name: Test internal APIs
run: make D=gcov test-api
- name: Libbtrfsutil test
run: make D=gcov test-libbtrfsutil
- name: Libbtrfs build test
run: make D=gcov library-test
- name: Tests hash (correctness)
run: make D=gcov hash-vectest && ./hash-vectest
- name: Generate lcov results
run: |
lcov -c -d . -o lcov-info
genhtml --rc geninfo_unexecuted_blocks=1 -o lcov-out lcov-info
- name: Save lcov results
uses: actions/upload-artifact@v4
with:
name: lcov-out
path: lcov-out
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ${{ github.workspace }}/lcov-info
- name: Save logs on failure
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: test-results
path: "tests/*-results.txt"
if-no-files-found: ignore