Skip to content

Commit 2418a20

Browse files
committed
Cancel running CI jobs when new changes are pushed to a PR
The `group` expression ensures that the cancel-in-progress behavior is to only cancel if a new commit is pushed to the PR for which the job is running, not other PRs. This is a fairly standard snippet, used also in CI jobs for NumPy and other projects.
1 parent 1d4ed20 commit 2418a20

File tree

6 files changed

+24
-0
lines changed

6 files changed

+24
-0
lines changed

.github/workflows/arm64_graviton.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ name: arm64 graviton cirun
22

33
on: [push, pull_request]
44

5+
concurrency:
6+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
7+
cancel-in-progress: true
8+
59
permissions:
610
contents: read # to fetch code (actions/checkout)
711

.github/workflows/c910v.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ name: c910v qemu test
22

33
on: [push, pull_request]
44

5+
concurrency:
6+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
7+
cancel-in-progress: true
8+
59
permissions:
610
contents: read # to fetch code (actions/checkout)
711

.github/workflows/dynamic_arch.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ name: continuous build
22

33
on: [push, pull_request]
44

5+
concurrency:
6+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
7+
cancel-in-progress: true
8+
59
permissions:
610
contents: read # to fetch code (actions/checkout)
711

.github/workflows/loongarch64.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ name: loongarch64 qemu test
22

33
on: [push, pull_request]
44

5+
concurrency:
6+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
7+
cancel-in-progress: true
8+
59
jobs:
610
TEST:
711
if: "github.repository == 'OpenMathLib/OpenBLAS'"

.github/workflows/mips64.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ name: mips64 qemu test
22

33
on: [push, pull_request]
44

5+
concurrency:
6+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
7+
cancel-in-progress: true
8+
59
permissions:
610
contents: read # to fetch code (actions/checkout)
711

.github/workflows/nightly-Homebrew-build.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ on:
1818

1919
name: Nightly-Homebrew-Build
2020

21+
concurrency:
22+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
23+
cancel-in-progress: true
24+
2125
permissions:
2226
contents: read # to fetch code (actions/checkout)
2327

0 commit comments

Comments
 (0)