Skip to content

Commit d58ed11

Browse files
authored
autocancel CI when new commit is made on a pull request (#24)
1 parent b1827e1 commit d58ed11

File tree

2 files changed

+31
-2
lines changed

2 files changed

+31
-2
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 & 2 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:
@@ -15,14 +23,27 @@ jobs:
1523
matrix:
1624
version:
1725
- '1'
18-
- '1.9'
26+
- '1.10'
1927
os:
2028
- ubuntu-latest
2129
threads:
2230
- '1'
23-
- '2'
31+
- '5'
2432
arch:
2533
- 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'
2647
steps:
2748
- uses: actions/checkout@v4
2849
- uses: julia-actions/setup-julia@v1

0 commit comments

Comments
 (0)