Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -156,3 +156,50 @@ jobs:
path: /tmp/calibration
if-no-files-found: error
retention-days: 30
# The account ruleset "Branch-Floor" requires a status check named exactly
# `CI/gate`. The check context is this job's `name:`, so it stays a fixed
# string. It waits for every other job in this workflow and runs even when
# one fails, is skipped or is cancelled. No job here is skipped by design, so
# every one must be `success`; a skipped, cancelled, failed, missing or
# unknown result fails the gate. For the matrix jobs (test, oracle) the
# result is the aggregate over every matrix leg. Only `run:` shell is used.
ci-status:
name: CI/gate
runs-on: ubuntu-24.04
timeout-minutes: 5
permissions: {}
needs: [test, proofs, oracle]
if: always()
steps:
- name: Require every job to succeed
env:
NEEDS_JSON: ${{ toJSON(needs) }}
run: |
set -euo pipefail
summary="${GITHUB_STEP_SUMMARY:-/dev/null}"
jobs=(test proofs oracle)
failures=0
{
echo '### CI/gate'
echo
echo 'Each result below is the aggregate result of that job; for the matrix jobs (test, oracle) it covers every matrix leg.'
echo
echo '| job | result | verdict |'
echo '| --- | --- | --- |'
} >> "$summary"
for job in "${jobs[@]}"; do
actual="$(jq -r --arg j "$job" '.[$j].result // "missing"' <<< "$NEEDS_JSON")"
verdict=ok
if [[ "$actual" != success ]]; then
verdict=FAIL
failures=$((failures + 1))
echo "::error::$job result is '$actual', expected 'success'"
fi
printf '%-8s %-10s %s\n' "$job" "$actual" "$verdict"
echo "| $job | $actual | $verdict |" >> "$summary"
done
if [[ "$failures" -ne 0 ]]; then
echo "CI/gate FAILED: $failures of ${#jobs[@]} jobs did not succeed." | tee -a "$summary"
exit 1
fi
echo "CI/gate passed: all ${#jobs[@]} jobs succeeded." | tee -a "$summary"
Loading