From: Hans Kristian Rosbach Date: Wed, 21 Jan 2026 17:39:28 +0000 (+0100) Subject: Also upload coverage reports to coveralls.io X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=95b4bf6af4af07b2c43f1883b5d3fd2cca0de9c1;p=thirdparty%2Fzlib-ng.git Also upload coverage reports to coveralls.io --- diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 80661298b..31327a778 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -5,7 +5,9 @@ env: GTEST_COLOR: 1 concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true + # Don't abort on push to avoid incomplete coveralls uploads + cancel-in-progress: ${{ github.event_name != 'push' }} + jobs: cmake: name: ${{ matrix.name }} @@ -812,6 +814,7 @@ jobs: source ./venv/${{ runner.os == 'Windows' && 'Scripts' || 'bin' }}/activate python3 -u -m pip install gcovr python3 -m gcovr -j 3 --gcov-ignore-parse-errors --verbose \ + --exclude '(.*/|^)(_deps|benchmarks)/.*' \ --exclude-unreachable-branches \ --merge-mode-functions separate \ --merge-lines \ @@ -826,6 +829,16 @@ jobs: path: ${{ matrix.codecov }}.xml retention-days: 1 + - name: Upload job coverage report to coveralls + uses: coverallsapp/github-action@v2 + if: (matrix.codecov && !contains(matrix.os, 'z15') && (env.COVERALLS_REPO_TOKEN != '' || github.repository == 'zlib-ng/zlib-ng')) + with: + file: ${{ matrix.codecov }}.xml + flag-name: "${{ matrix.name }}-${{ github.event_name }}" + parallel: true + env: + COVERALLS_REPO_TOKEN: "${{ secrets.COVERALLS_REPO_TOKEN }}" + - name: Test benchmarks (crashtest only, no coverage data collection) if: contains(matrix.cmake-args, '-DWITH_BENCHMARKS=ON') run: ctest --verbose -C Release -R ^benchmark_zlib$ --output-on-failure --max-width 120 -j ${{ matrix.parallels-jobs || '3' }} @@ -867,15 +880,23 @@ jobs: - name: Display all coverage artifacts run: | ls -R *.xml - echo "CODECOV_REPORTS=`ls -p *.xml | grep -v / | tr '\n' ',' | sed 's/,$//g'`" >> $GITHUB_ENV + echo "COVERAGE_REPORTS=`ls -p *.xml | grep -v / | tr '\n' ',' | sed 's/,$//g'`" >> $GITHUB_ENV - - name: Upload reports + - name: Upload reports to codecov uses: codecov/codecov-action@v5 if: (env.CODECOV_TOKEN != '' || github.repository == 'zlib-ng/zlib-ng') with: - files: ${{ env.CODECOV_REPORTS }} - name: cmake-umbrella + files: ${{ env.COVERAGE_REPORTS }} + name: "cmake-umbrella-${{ github.event_name }}" verbose: true fail_ci_if_error: true env: CODECOV_TOKEN: "${{ secrets.CODECOV_TOKEN }}" + + - name: Upload to Coveralls - Final + uses: coverallsapp/github-action@v2 + if: (env.COVERALLS_REPO_TOKEN != '' || github.repository == 'zlib-ng/zlib-ng') + with: + parallel-finished: true + env: + COVERALLS_REPO_TOKEN: "${{ secrets.COVERALLS_REPO_TOKEN }}" diff --git a/.github/workflows/pigz.yml b/.github/workflows/pigz.yml index 3df8e51c2..0fadd8bd8 100644 --- a/.github/workflows/pigz.yml +++ b/.github/workflows/pigz.yml @@ -107,6 +107,7 @@ jobs: run: | python3 -u -m pip install gcovr python3 -m gcovr -j 3 --gcov-ignore-parse-errors --verbose \ + --exclude '(.*/|^)(_deps|benchmarks)/.*' \ --exclude-unreachable-branches \ --merge-mode-functions separate \ --merge-lines \ @@ -153,14 +154,14 @@ jobs: - name: Display all coverage artifacts run: | ls -R *.xml - echo "CODECOV_REPORTS=`ls -p *.xml | grep -v / | tr '\n' ',' | sed 's/,$//g'`" >> $GITHUB_ENV + echo "COVERAGE_REPORTS=`ls -p *.xml | grep -v / | tr '\n' ',' | sed 's/,$//g'`" >> $GITHUB_ENV - - name: Upload reports + - name: Upload reports to codecov uses: codecov/codecov-action@v5 if: (env.CODECOV_TOKEN != '' || github.repository == 'zlib-ng/zlib-ng') with: - files: ${{ env.CODECOV_REPORTS }} - name: pigz-umbrella + files: ${{ env.COVERAGE_REPORTS }} + name: "pigz-umbrella-${{ github.event_name }}" verbose: true fail_ci_if_error: true env: