From 77002fb987cfcec3b431d97fc3638f08e764a97a Mon Sep 17 00:00:00 2001 From: Hans Kristian Rosbach Date: Sat, 7 Mar 2026 21:41:02 +0100 Subject: Add coveralls to pigz and make sure coveralls uploads are not finalized until all jobs are successful, as doing that blocks further uploads from retried builds. --- .github/workflows/cmake.yml | 25 +++++++------------------ .github/workflows/orchestrator.yml | 25 +++++++++++++++++++++++++ .github/workflows/pigz.yml | 14 +++++++++++++- 3 files changed, 45 insertions(+), 19 deletions(-) create mode 100644 .github/workflows/orchestrator.yml diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 28bcfa0b05..5eabd3230f 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -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 index 0000000000..44bea2a1e5 --- /dev/null +++ b/.github/workflows/orchestrator.yml @@ -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 }}" diff --git a/.github/workflows/pigz.yml b/.github/workflows/pigz.yml index 4c84479b1c..5335234c46 100644 --- a/.github/workflows/pigz.yml +++ b/.github/workflows/pigz.yml @@ -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() -- cgit 0.0.5-2-1-g0f52