scala / scala3

The Scala 3 compiler, also known as Dotty.
https://dotty.epfl.ch
Apache License 2.0
5.89k stars 1.06k forks source link

Cancel stale CI executions when CI is re-triggered in the same branch/PR #21974

Closed WojciechMazur closed 4 days ago

WojciechMazur commented 6 days ago

Cancels any in-progress runs within the same group identified by workflow name and GH reference (branch or tag) For example it would:

Motivated by a long CI queue (taking even up to 10h ) and limited amount of self-hosted runners. Currently merging PR to main triggers a new on-push CI run (taking ~1.5h) - merging multiple PR in a row schedules a separate CI run (that is probably never going to be investigated if it fails)

The second empty commit shows how cancelation is done. Previously triggered CI run is cancelled, any enqueued or currently executed jobs are stopped and annotated with message Canceling since a higher priority waiting request for 'Dotty-refs/pull/21974/merge' exists