about summary refs log tree commit diff
diff options
context:
space:
mode:
authorTrevor Gross <tmgross@umich.edu>2025-04-18 03:22:13 +0000
committerTrevor Gross <t.gross35@gmail.com>2025-04-17 22:57:24 -0500
commit014c3e4ccbb8afc3740acf5658c07e5783e3d848 (patch)
tree23249116eebbf82d017f5285fe32a1c8de1715ab
parenta15c8c9a3d51cc917c09ba4be59f27ac17dd8664 (diff)
downloadrust-014c3e4ccbb8afc3740acf5658c07e5783e3d848.tar.gz
rust-014c3e4ccbb8afc3740acf5658c07e5783e3d848.zip
ci: Cancel jobs when a new push happens
Jobs should just cancel automatically, it isn't ideal that extensive
jobs can continue running for multiple hours after code has been
updated. Use a solution from [1] to do this.

[1]: https://stackoverflow.com/a/72408109/5380651
-rw-r--r--library/compiler-builtins/libm/.github/workflows/main.yaml5
1 files changed, 5 insertions, 0 deletions
diff --git a/library/compiler-builtins/libm/.github/workflows/main.yaml b/library/compiler-builtins/libm/.github/workflows/main.yaml
index e86f936f74f..93c56c9d40f 100644
--- a/library/compiler-builtins/libm/.github/workflows/main.yaml
+++ b/library/compiler-builtins/libm/.github/workflows/main.yaml
@@ -5,6 +5,11 @@ on:
       - master
   pull_request:
 
+concurrency:
+  # Make sure that new pushes cancel running jobs
+  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
+  cancel-in-progress: true
+
 env:
   CARGO_TERM_COLOR: always
   RUSTDOCFLAGS: -Dwarnings