Skip to content

Commit 0069d53

Browse files
committed
ci: add all-checks-passed umbrella jobs and smart path filtering
Add all-checks-passed umbrella job to each workflow for use as a required status check in branch protection (auto-merge gate). Scope test-examples.yml PR trigger to examples/runtimes/host paths so docs-only or unrelated changes skip the heavy build+test matrix. Signed-off-by: danbugs <danilochiarlone@gmail.com>
1 parent f4ab6d5 commit 0069d53

3 files changed

Lines changed: 50 additions & 0 deletions

File tree

.github/workflows/benchmarks.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -444,3 +444,18 @@ jobs:
444444
Write-Host "| Disk usage | ${diskMiB} MiB |"
445445
Write-Host ""
446446
Write-Host "::notice::snapshot: apparent=${apparentMiB}MiB disk=${diskMiB}MiB"
447+
448+
all-checks-passed:
449+
if: always()
450+
needs: [build-image, bench-linux, bench-windows]
451+
runs-on: ubuntu-latest
452+
steps:
453+
- run: |
454+
results=("${{ needs.build-image.result }}" "${{ needs.bench-linux.result }}" "${{ needs.bench-windows.result }}")
455+
for r in "${results[@]}"; do
456+
if [[ "$r" != "success" && "$r" != "skipped" ]]; then
457+
echo "Job failed with result: $r"
458+
exit 1
459+
fi
460+
done
461+
echo "All checks passed"

.github/workflows/host-checks.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,3 +71,18 @@ jobs:
7171
# skip themselves if /dev/kvm isn't available.
7272
RUST_BACKTRACE: '1'
7373
run: cargo test --all-targets --locked
74+
75+
all-checks-passed:
76+
if: always()
77+
needs: [checks]
78+
runs-on: ubuntu-latest
79+
steps:
80+
- run: |
81+
results=("${{ needs.checks.result }}")
82+
for r in "${results[@]}"; do
83+
if [[ "$r" != "success" && "$r" != "skipped" ]]; then
84+
echo "Job failed with result: $r"
85+
exit 1
86+
fi
87+
done
88+
echo "All checks passed"

.github/workflows/test-examples.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ on:
44
workflow_dispatch:
55
pull_request:
66
branches: [main]
7+
paths:
8+
- 'examples/**'
9+
- 'runtimes/**'
10+
- 'host/**'
11+
- '.github/workflows/test-examples.yml'
712
push:
813
branches: [main]
914
paths:
@@ -738,3 +743,18 @@ jobs:
738743
Write-Error "FAIL: expected >=5 pandas_ok lines, got $hits"
739744
exit 1
740745
}
746+
747+
all-checks-passed:
748+
if: always()
749+
needs: [build-example, runtime-test, package-images-for-windows, runtime-test-windows, pyhl-snapshot-test]
750+
runs-on: ubuntu-latest
751+
steps:
752+
- run: |
753+
results=("${{ needs.build-example.result }}" "${{ needs.runtime-test.result }}" "${{ needs.package-images-for-windows.result }}" "${{ needs.runtime-test-windows.result }}" "${{ needs.pyhl-snapshot-test.result }}")
754+
for r in "${results[@]}"; do
755+
if [[ "$r" != "success" && "$r" != "skipped" ]]; then
756+
echo "Job failed with result: $r"
757+
exit 1
758+
fi
759+
done
760+
echo "All checks passed"

0 commit comments

Comments
 (0)