diff --git a/.github/workflows/codecov-ci.yml b/.github/workflows/codecov-ci.yml index 90a58fba4a9..5b1fba9333b 100644 --- a/.github/workflows/codecov-ci.yml +++ b/.github/workflows/codecov-ci.yml @@ -17,11 +17,12 @@ 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 diff --git a/util/codecov-ci.sh b/util/codecov-ci.sh index 5f737ba4297..a914a5a1373 100755 --- a/util/codecov-ci.sh +++ b/util/codecov-ci.sh @@ -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/*') @@ -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"