Skip to content

Commit c6d8c6b

Browse files
authored
Check if any required jobs failed (allow success or skipped) (#8495)
This allows doc only changes to PASS the CI by skipping jobs.
1 parent 48cbbcf commit c6d8c6b

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

.github/workflows/ci.yml

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -228,15 +228,21 @@ jobs:
228228
echo "Linux Release x64: ${{ needs.test-linux-release-gcc-x86_64.result }}"
229229
echo "Linux Debug x64: ${{ needs.test-linux-debug-gcc-x86_64.result }}"
230230
231-
# Check if all required jobs succeeded
232-
if [[ "${{ needs.test-windows-release-cl-x86_64-gpu.result }}" != "success" ]] || \
233-
[[ "${{ needs.test-windows-debug-cl-x86_64-gpu.result }}" != "success" ]] || \
234-
[[ "${{ needs.test-macos-release-clang-aarch64.result }}" != "success" ]] || \
235-
[[ "${{ needs.test-macos-debug-clang-aarch64.result }}" != "success" ]] || \
236-
[[ "${{ needs.test-linux-release-gcc-x86_64.result }}" != "success" ]] || \
237-
[[ "${{ needs.test-linux-debug-gcc-x86_64.result }}" != "success" ]]; then
231+
# Check if any required jobs failed (allow success or skipped)
232+
if [[ "${{ needs.test-windows-release-cl-x86_64-gpu.result }}" == "failure" ]] || \
233+
[[ "${{ needs.test-windows-debug-cl-x86_64-gpu.result }}" == "failure" ]] || \
234+
[[ "${{ needs.test-macos-release-clang-aarch64.result }}" == "failure" ]] || \
235+
[[ "${{ needs.test-macos-debug-clang-aarch64.result }}" == "failure" ]] || \
236+
[[ "${{ needs.test-linux-release-gcc-x86_64.result }}" == "failure" ]] || \
237+
[[ "${{ needs.test-linux-debug-gcc-x86_64.result }}" == "failure" ]] || \
238+
[[ "${{ needs.test-windows-release-cl-x86_64-gpu.result }}" == "cancelled" ]] || \
239+
[[ "${{ needs.test-windows-debug-cl-x86_64-gpu.result }}" == "cancelled" ]] || \
240+
[[ "${{ needs.test-macos-release-clang-aarch64.result }}" == "cancelled" ]] || \
241+
[[ "${{ needs.test-macos-debug-clang-aarch64.result }}" == "cancelled" ]] || \
242+
[[ "${{ needs.test-linux-release-gcc-x86_64.result }}" == "cancelled" ]] || \
243+
[[ "${{ needs.test-linux-debug-gcc-x86_64.result }}" == "cancelled" ]]; then
238244
echo "❌ One or more CI jobs failed or were cancelled"
239245
exit 1
240246
fi
241247
242-
echo "✅ All CI jobs passed successfully!"
248+
echo "✅ All CI jobs completed successfully (passed or skipped)!"

0 commit comments

Comments
 (0)