Thanks to visit codestin.com
Credit goes to github.com

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
26 changes: 25 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -202,4 +202,28 @@ jobs:
- doc
steps:
- name: Exit
run: exit 0
run: |
# if any dependencies were cancelled, that's a failure
#
# see https://docs.github.com/en/actions/reference/workflows-and-actions/expressions#always
# and https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/troubleshooting-required-status-checks#handling-skipped-but-required-checks
# for why this cannot be encoded in the job-level `if:` field
#
# TL; DR: `$REASONS`
#
# The intersection of skipped-as-success and required status checks
Comment on lines +205 to +214

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah yes, I feel every proper GHA-based status check workflow needs a comment expressing the dismay and astonishment that came from this discovery. See also: https://github.com/NVIDIA/cccl/blob/main/.github/workflows/ci-workflow-pull-request.yml#L259-L263

🙂

# creates a scenario where if you DON'T `always()` run this job, the
# status check UI will block merging and if you DO `always()` run and
# a dependency is _cancelled_ (due to a critical failure, which is
# somehow not considered a failure ¯\_(ツ)_/¯) then the critically
# failing job(s) will timeout causing a cancellation here and the
# build to succeed which we don't want (originally this was just
# 'exit 0')
if ${{ needs.test-linux-64.result == 'cancelled' ||
needs.test-linux-aarch64.result == 'cancelled' ||
needs.test-windows.result == 'cancelled' ||
needs.doc.result == 'cancelled' }}; then
exit 1
else
exit 0
fi
Loading