]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Also upload coverage reports to coveralls.io
authorHans Kristian Rosbach <hk-git@circlestorm.org>
Wed, 21 Jan 2026 17:39:28 +0000 (18:39 +0100)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Thu, 22 Jan 2026 19:10:41 +0000 (20:10 +0100)
.github/workflows/cmake.yml
.github/workflows/pigz.yml

index 80661298bc82a3002beae41bb6956b9d15851363..31327a778eb8d0e292abc6ed5bfa9c2d2703887b 100644 (file)
@@ -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 }}"
index 3df8e51c2d163386289b44ce67a4f107653a740d..0fadd8bd8741fa167aca7deffeaf5d2392b8dc70 100644 (file)
@@ -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: