]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Add coveralls to pigz and make sure coveralls uploads are not finalized until
authorHans Kristian Rosbach <hk-git@circlestorm.org>
Sat, 7 Mar 2026 20:41:02 +0000 (21:41 +0100)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Sun, 8 Mar 2026 17:39:20 +0000 (18:39 +0100)
all jobs are successful, as doing that blocks further uploads from retried builds.

.github/workflows/cmake.yml
.github/workflows/orchestrator.yml [new file with mode: 0644]
.github/workflows/pigz.yml

index 28bcfa0b0553256ad6768bb44150571f7e575c48..5eabd3230f7130d4e19bc4b0e232a2670a3495de 100644 (file)
@@ -1,5 +1,5 @@
 name: CMake
-on: [push, pull_request, workflow_dispatch]
+on: [workflow_call, workflow_dispatch]
 env:
   TERM: xterm-256color
   GTEST_COLOR: 1
@@ -899,13 +899,16 @@ jobs:
 
     - name: Upload job coverage report to coveralls
       uses: coverallsapp/github-action@v2
-      if: (matrix.coverage && !contains(matrix.os, 'z15') && (env.COVERALLS_REPO_TOKEN != '' || github.repository == 'zlib-ng/zlib-ng'))
+      env:
+        COVERALLS_REPO_TOKEN: "${{ secrets.COVERALLS_REPO_TOKEN }}"
+      if: |
+        matrix.codecov
+        && !contains(matrix.os, 'z15')
+        && (env.COVERALLS_REPO_TOKEN != '' || github.repository == 'zlib-ng/zlib-ng')
       with:
         file: ${{ matrix.coverage }}.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')
@@ -929,17 +932,3 @@ jobs:
           **/Testing/Temporary/*
           ${{ matrix.coverage }}.xml
         retention-days: 30
-
-  coverage:
-    name: Upload Coverage Reports
-    runs-on: ubuntu-latest
-    needs: cmake
-    if: cancelled() == false
-    steps:
-    - 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/orchestrator.yml b/.github/workflows/orchestrator.yml
new file mode 100644 (file)
index 0000000..44bea2a
--- /dev/null
@@ -0,0 +1,25 @@
+name: Orchestrator
+on: [push, pull_request]
+
+jobs:
+  cmake:
+    uses: ./.github/workflows/cmake.yml
+    secrets: inherit
+
+  pigz:
+    uses: ./.github/workflows/pigz.yml
+    secrets: inherit
+
+  # This job only starts if ALL reusable workflows above succeed
+  final-upload:
+    needs: [cmake, pigz]
+    runs-on: ubuntu-slim
+    if: success()
+    steps:
+      - name: Coveralls - Finalize
+        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 4c84479b1c51aae3dd76eafd1f89e7d41cc2b176..5335234c461f45e19a6dd34c85f6ead9ebfab5ba 100644 (file)
@@ -1,5 +1,5 @@
 name: Pigz
-on: [push, pull_request, workflow_dispatch]
+on: [workflow_call, workflow_dispatch]
 concurrency:
   group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
   cancel-in-progress: true
@@ -115,6 +115,18 @@ jobs:
           --root . \
           --xml --output ${{ matrix.coverage }}.xml
 
+    - name: Upload job coverage report to coveralls
+      uses: coverallsapp/github-action@v2
+      env:
+        COVERALLS_REPO_TOKEN: "${{ secrets.COVERALLS_REPO_TOKEN }}"
+      if: |
+        matrix.codecov
+        && (env.COVERALLS_REPO_TOKEN != '' || github.repository == 'zlib-ng/zlib-ng')
+      with:
+        file: ${{ matrix.codecov }}.xml
+        flag-name: "${{ matrix.name }}-${{ github.event_name }}"
+        parallel: true
+
     - name: Upload build errors
       uses: actions/upload-artifact@v7
       if: failure()