From 0a6aed61e9a1c5bfeb7b348ec6fc2f71028bb406 Mon Sep 17 00:00:00 2001 From: Joachim Breitner Date: Wed, 29 Nov 2023 01:10:11 +0100 Subject: [PATCH] chore: CI: Create an all-builds-ok job (#2983) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit there is a little dance with `if: success()` because otherwise a failed `build` job would make this new job skipped, not failed, and I fear skipped means ok when it is a required job. So let’s make sure this job actually fails. --- .github/workflows/ci.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 111d9c8991..c7a36f75a3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -364,6 +364,21 @@ jobs: ./build/stage2/bin/lean ./build/stage2/lib/lean/libleanshared.so + # This job collects results from all the matrix jobs + # This can be made the “required” job, instead of listing each + # matrix job separately + all-done: + name: Build matrix complete + runs-on: ubuntu-latest + needs: build + if: ${{ always() }} + steps: + - if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') + uses: actions/github-script@v3 + with: + script: | + core.setFailed('Some jobs failed') + # This job creates releases from tags # (whether they are "unofficial" releases for experiments, or official releases when the tag is "v" followed by a semver string.) # We do not attempt to automatically construct a changelog here: