Skip to content

Commit

Permalink
Tracefile in sub-dir; update MacOS lcov flags
Browse files Browse the repository at this point in the history
  • Loading branch information
justsmth committed May 8, 2024
1 parent eaf8c54 commit b701736
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/codecov-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,13 @@ jobs:
sudo apt-get -y install lcov
- uses: actions/checkout@v4
- name: Run Code Coverage Build
run: ./util/codecov-ci.sh ${{ runner.temp }}/build
run: ./util/codecov-ci.sh ./build
- name: Upload code coverage report to Codecov
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: "${{ runner.temp }}/build/coverage-default.info,${{ runner.temp }}/build/coverage-no-asm.info"
files: "./build/coverage-default.info,./build/coverage-no-asm.info"
verbose: true
fail_ci_if_error: true
4 changes: 2 additions & 2 deletions util/codecov-ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ LCOV_PARAMS+=(--exclude '*/gtest_*')
LCOV_PARAMS+=(--exclude '*/wycheproof_*')
if [[ "$(uname -s)" == "Darwin" ]]; then
LCOV_PARAMS+=(--exclude '/Applications/*')
LCOV_IGNORE_ERRORS="inconsistent,inconsistent,gcov,gcov"
LCOV_IGNORE_ERRORS="inconsistent,inconsistent,gcov,gcov,range,unused,unused"
GENHTML_IGNORE_ERRORS="inconsistent,unmapped"
else
LCOV_PARAMS+=(--exclude '/usr/*')
Expand All @@ -58,7 +58,7 @@ function generate_coverage() {

# Build
cmake ${2} ${CMAKE_SETUP_PARAMS} -B "${BUILD_DIR}"
cmake --build "${BUILD_DIR}" --target all_tests -j
cmake --build "${BUILD_DIR}" --target all_tests --parallel

# Collect initial coverage data
lcov --capture "${LCOV_PARAMS[@]}" --initial --directory "${BUILD_DIR}" --output-file "${BUILD}/initial-${1}.info"
Expand Down

0 comments on commit b701736

Please sign in to comment.