Skip to content

Commit 19700de

Browse files
authored
auto-cancel old PR builds (#464)
We are beginning to hit concurrency limits of GH actions if there are many pushes in a row since we do run quite a lot of jobs. This should automatically cancel the old jobs for a particular PR if there is a more recent push.
1 parent 486922d commit 19700de

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

.github/workflows/CI.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ on:
77
branches: [master]
88
tags: ["*"]
99
pull_request:
10+
concurrency:
11+
# Skip intermediate builds: always.
12+
# Cancel intermediate builds: only if it is a pull request build.
13+
group: ${{ github.ref }}
14+
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
1015
jobs:
1116
test:
1217
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }}

.github/workflows/IntegrationTest.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ on:
55
tags: [v*]
66
pull_request:
77

8+
concurrency:
9+
# Skip intermediate builds: always.
10+
# Cancel intermediate builds: only if it is a pull request build.
11+
group: ${{ github.ref }}
12+
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
13+
814
jobs:
915
test:
1016
name: ${{ matrix.package.repo }}

.github/workflows/JuliaNightly.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ on:
77
branches: [master]
88
tags: ["*"]
99
pull_request:
10+
concurrency:
11+
# Skip intermediate builds: always.
12+
# Cancel intermediate builds: only if it is a pull request build.
13+
group: ${{ github.ref }}
14+
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
1015
jobs:
1116
test:
1217
name: Julia Nightly - Ubuntu - x64

0 commit comments

Comments
 (0)