mirror of
https://github.com/mhx/dwarfs.git
synced 2025-08-04 10:16:34 -04:00
chore: include test binaries in coverage analysis
This commit is contained in:
parent
310c8b6fad
commit
3eb6b22090
@ -105,7 +105,7 @@ if [[ "-$BUILD_TYPE-" == *-coverage-* ]]; then
|
|||||||
rm -rf /tmp-runner/coverage
|
rm -rf /tmp-runner/coverage
|
||||||
mkdir -p /tmp-runner/coverage
|
mkdir -p /tmp-runner/coverage
|
||||||
llvm-profdata-17 merge -sparse profile/* -o dwarfs.profdata
|
llvm-profdata-17 merge -sparse profile/* -o dwarfs.profdata
|
||||||
for binary in mkdwarfs dwarfs dwarfsck dwarfsextract; do
|
for binary in mkdwarfs dwarfs dwarfsck dwarfsextract *_test; do
|
||||||
llvm-cov-17 show -instr-profile=dwarfs.profdata $binary >/tmp-runner/coverage/$binary.txt
|
llvm-cov-17 show -instr-profile=dwarfs.profdata $binary >/tmp-runner/coverage/$binary.txt
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
9
.github/workflows/build.yml
vendored
9
.github/workflows/build.yml
vendored
@ -132,10 +132,17 @@ jobs:
|
|||||||
--env GITHUB_RUN_ATTEMPT \
|
--env GITHUB_RUN_ATTEMPT \
|
||||||
dwarfs-linux-build
|
dwarfs-linux-build
|
||||||
|
|
||||||
|
- name: List Coverage Files
|
||||||
|
id: coverage-files
|
||||||
|
if: matrix.build_type == 'clang-coverage-ninja'
|
||||||
|
run: |
|
||||||
|
files=$(find ${{ runner.temp }}/coverage -type f | paste -d, -s)
|
||||||
|
echo "list=$files" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
- name: Upload Coverage Data
|
- name: Upload Coverage Data
|
||||||
if: matrix.build_type == 'clang-coverage-ninja'
|
if: matrix.build_type == 'clang-coverage-ninja'
|
||||||
uses: codecov/codecov-action@v3
|
uses: codecov/codecov-action@v3
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.CODECOV_TOKEN }}
|
token: ${{ secrets.CODECOV_TOKEN }}
|
||||||
directory: ${{ runner.temp }}/coverage
|
files: ${{ steps.coverage-files.outputs.list }}
|
||||||
fail_ci_if_error: true
|
fail_ci_if_error: true
|
||||||
|
Loading…
x
Reference in New Issue
Block a user