Skip to content

Commit 0bac8c7

Browse files
authored
autocancel CI when new commit is made on a pull request (#133)
1 parent dc12196 commit 0bac8c7

File tree

2 files changed

+31
-5
lines changed

2 files changed

+31
-5
lines changed

.github/workflows/ci-julia-nightly.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ on:
44
branches: [master, main]
55
tags: ["*"]
66
pull_request:
7+
8+
concurrency:
9+
# group by workflow and ref; the last slightly strange component ensures that for pull
10+
# requests, we limit to 1 concurrent job, but for the master branch we don't
11+
group: ${{ github.workflow }}-${{ github.ref }}-${{ (github.ref != 'refs/heads/master' && github.ref != 'refs/heads/main') || github.run_number }}
12+
# Cancel intermediate builds, but only if it is a pull request build.
13+
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
14+
715
env:
816
PYTHON: ~
917
jobs:

.github/workflows/ci.yml

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ on:
44
branches: [master, main]
55
tags: ["*"]
66
pull_request:
7+
8+
concurrency:
9+
# group by workflow and ref; the last slightly strange component ensures that for pull
10+
# requests, we limit to 1 concurrent job, but for the master branch we don't
11+
group: ${{ github.workflow }}-${{ github.ref }}-${{ (github.ref != 'refs/heads/master' && github.ref != 'refs/heads/main') || github.run_number }}
12+
# Cancel intermediate builds, but only if it is a pull request build.
13+
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
14+
715
env:
816
PYTHON: ~
917
jobs:
@@ -14,18 +22,28 @@ jobs:
1422
fail-fast: false
1523
matrix:
1624
version:
17-
- '1.6'
18-
- '1.7'
19-
- '1.8'
20-
- '1.9'
21-
- '1.10'
2225
- '1'
26+
- '1.10'
2327
os:
2428
- ubuntu-latest
2529
threads:
2630
- '1'
31+
- '5'
2732
arch:
2833
- x64
34+
include:
35+
- arch: aarch64
36+
os: macos-latest
37+
version: '1'
38+
threads: '1'
39+
- arch: x64
40+
os: macos-latest
41+
version: '1'
42+
threads: '1'
43+
- arch: x64
44+
os: windows-latest
45+
version: '1'
46+
threads: '1'
2947
steps:
3048
- uses: actions/checkout@v4
3149
- uses: julia-actions/setup-julia@v1

0 commit comments

Comments
 (0)