Skip to content

Commit 8c699a1

Browse files
committed
CI: update concurrency of jobs to allow concurrent main and stable- builds
1 parent ec9e000 commit 8c699a1

6 files changed

Lines changed: 30 additions & 12 deletions

File tree

.github/workflows/config_options.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,11 @@ on:
1111
- cron: 30 3 * * *
1212

1313
concurrency:
14-
group: ${{ github.workflow }}-${{ github.ref }}
15-
cancel-in-progress: true
14+
# Group by workflow and ref; the last component ensures that for pull requests
15+
# we limit to one concurrent job, but for the default/stable branch we don't
16+
group: ${{ github.workflow }}-${{ github.ref }}-${{ (github.ref != github.event.repository.default_branch && !startsWith(github.ref, 'refs/heads/stable-')) || github.run_number }}
17+
# Only cancel intermediate pull request builds
18+
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
1619

1720
jobs:
1821
with-external-planarity-bliss:

.github/workflows/lint.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,11 @@ on:
1111
- cron: 30 3 * * *
1212

1313
concurrency:
14-
group: ${{ github.workflow }}-${{ github.ref }}
15-
cancel-in-progress: true
14+
# Group by workflow and ref; the last component ensures that for pull requests
15+
# we limit to one concurrent job, but for the default/stable branch we don't
16+
group: ${{ github.workflow }}-${{ github.ref }}-${{ (github.ref != github.event.repository.default_branch && !startsWith(github.ref, 'refs/heads/stable-')) || github.run_number }}
17+
# Only cancel intermediate pull request builds
18+
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
1619

1720
jobs:
1821
lint:

.github/workflows/manual.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,11 @@ on:
1111
- cron: "20 3 * * *"
1212

1313
concurrency:
14-
group: ${{ github.workflow }}-${{ github.ref }}
15-
cancel-in-progress: true
14+
# Group by workflow and ref; the last component ensures that for pull requests
15+
# we limit to one concurrent job, but for the default/stable branch we don't
16+
group: ${{ github.workflow }}-${{ github.ref }}-${{ (github.ref != github.event.repository.default_branch && !startsWith(github.ref, 'refs/heads/stable-')) || github.run_number }}
17+
# Only cancel intermediate pull request builds
18+
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
1619

1720
jobs:
1821
manual:

.github/workflows/os.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,11 @@ env:
1414
DIGRAPHS_LIB: digraphs-lib-0.7
1515

1616
concurrency:
17-
group: ${{ github.workflow }}-${{ github.ref }}
18-
cancel-in-progress: true
17+
# Group by workflow and ref; the last component ensures that for pull requests
18+
# we limit to one concurrent job, but for the default/stable branch we don't
19+
group: ${{ github.workflow }}-${{ github.ref }}-${{ (github.ref != github.event.repository.default_branch && !startsWith(github.ref, 'refs/heads/stable-')) || github.run_number }}
20+
# Only cancel intermediate pull request builds
21+
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
1922

2023
jobs:
2124
test:

.github/workflows/ubuntu.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,11 @@ env:
1414
DIGRAPHS_LIB: digraphs-lib-0.7
1515

1616
concurrency:
17-
group: ${{ github.workflow }}-${{ github.ref }}
18-
cancel-in-progress: true
17+
# Group by workflow and ref; the last component ensures that for pull requests
18+
# we limit to one concurrent job, but for the default/stable branch we don't
19+
group: ${{ github.workflow }}-${{ github.ref }}-${{ (github.ref != github.event.repository.default_branch && !startsWith(github.ref, 'refs/heads/stable-')) || github.run_number }}
20+
# Only cancel intermediate pull request builds
21+
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
1922

2023
jobs:
2124
test-unix:

.github/workflows/valgrind.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,11 @@ env:
1515
NO_COVERAGE: true
1616

1717
concurrency:
18-
group: ${{ github.workflow }}-${{ github.ref }}
19-
cancel-in-progress: true
18+
# Group by workflow and ref; the last component ensures that for pull requests
19+
# we limit to one concurrent job, but for the default/stable branch we don't
20+
group: ${{ github.workflow }}-${{ github.ref }}-${{ (github.ref != github.event.repository.default_branch && !startsWith(github.ref, 'refs/heads/stable-')) || github.run_number }}
21+
# Only cancel intermediate pull request builds
22+
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
2023

2124
jobs:
2225
test-valgrind:

0 commit comments

Comments
 (0)