From 64112e683f3b1d1b11ed8d773b7b9d8b17613446 Mon Sep 17 00:00:00 2001 From: Andrew Hopkins Date: Thu, 25 Apr 2024 17:53:45 -0700 Subject: [PATCH 1/3] Migrate to v4 of the codecov/codecov-action action --- .github/workflows/codecov-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/codecov-ci.yml b/.github/workflows/codecov-ci.yml index 08dd6afa5b..88eb891443 100644 --- a/.github/workflows/codecov-ci.yml +++ b/.github/workflows/codecov-ci.yml @@ -19,7 +19,7 @@ jobs: - name: Run Code Coverage Build run: ./util/codecov-ci.sh ${{ runner.temp }}/build - name: Upload code coverage report to Codecov - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 with: token: ${{ secrets.CODECOV_TOKEN }} files: "${{ runner.temp }}/build/coverage-default.info,${{ runner.temp }}/build/coverage-no-asm.info" From eaf8c54c01d8a022c8b6ec23963a6409a0cc9369 Mon Sep 17 00:00:00 2001 From: Andrew Hopkins Date: Thu, 25 Apr 2024 18:33:25 -0700 Subject: [PATCH 2/3] Turn on verbose codecov logging and run the build with multiple threads --- .github/workflows/codecov-ci.yml | 2 ++ util/codecov-ci.sh | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/codecov-ci.yml b/.github/workflows/codecov-ci.yml index 88eb891443..7437055250 100644 --- a/.github/workflows/codecov-ci.yml +++ b/.github/workflows/codecov-ci.yml @@ -23,3 +23,5 @@ jobs: with: token: ${{ secrets.CODECOV_TOKEN }} files: "${{ runner.temp }}/build/coverage-default.info,${{ runner.temp }}/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 547821bf81..5f737ba429 100755 --- a/util/codecov-ci.sh +++ b/util/codecov-ci.sh @@ -58,7 +58,7 @@ function generate_coverage() { # Build cmake ${2} ${CMAKE_SETUP_PARAMS} -B "${BUILD_DIR}" - cmake --build "${BUILD_DIR}" --target all_tests + cmake --build "${BUILD_DIR}" --target all_tests -j # Collect initial coverage data lcov --capture "${LCOV_PARAMS[@]}" --initial --directory "${BUILD_DIR}" --output-file "${BUILD}/initial-${1}.info" From b701736e0f153f9f687cf6fa890b7bdbc4e004e4 Mon Sep 17 00:00:00 2001 From: Justin Smith Date: Wed, 8 May 2024 09:12:16 -0400 Subject: [PATCH 3/3] Tracefile in sub-dir; update MacOS lcov flags --- .github/workflows/codecov-ci.yml | 6 ++++-- util/codecov-ci.sh | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/codecov-ci.yml b/.github/workflows/codecov-ci.yml index 7437055250..79b27774d3 100644 --- a/.github/workflows/codecov-ci.yml +++ b/.github/workflows/codecov-ci.yml @@ -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 diff --git a/util/codecov-ci.sh b/util/codecov-ci.sh index 5f737ba429..a914a5a137 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"