Skip to content

Commit eebd753

Browse files
sbryngelsonclaude
andcommitted
Move concurrency from workflow-level to per-job
Prevents rapid pushes from cancelling unrelated jobs. Each job type (github, self, bench) now has its own concurrency group keyed by ref and matrix params, so a new push only cancels stale instances of the same job — not all jobs across the workflow. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 50e43f5 commit eebd753

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

.github/workflows/test.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@ on:
66
pull_request:
77
workflow_dispatch:
88

9-
concurrency:
10-
group: ${{ github.workflow }}-${{ github.ref }}
11-
cancel-in-progress: true
12-
139
jobs:
1410
lint-gate:
1511
name: Lint Gate
@@ -68,6 +64,9 @@ jobs:
6864
name: Github
6965
if: needs.file-changes.outputs.checkall == 'true'
7066
needs: [lint-gate, file-changes]
67+
concurrency:
68+
group: github-${{ github.ref }}-${{ matrix.os }}-${{ matrix.mpi }}-${{ matrix.debug }}-${{ matrix.intel }}
69+
cancel-in-progress: true
7170
strategy:
7271
matrix:
7372
os: ['ubuntu', 'macos']
@@ -144,6 +143,9 @@ jobs:
144143
name: "${{ matrix.cluster_name }} (${{ matrix.device }}${{ matrix.interface != 'none' && format('-{0}', matrix.interface) || '' }})"
145144
if: github.repository == 'MFlowCode/MFC' && needs.file-changes.outputs.checkall == 'true'
146145
needs: [lint-gate, file-changes]
146+
concurrency:
147+
group: self-${{ github.ref }}-${{ matrix.cluster }}-${{ matrix.device }}-${{ matrix.interface }}
148+
cancel-in-progress: true
147149
continue-on-error: false
148150
timeout-minutes: 480
149151
strategy:
@@ -210,6 +212,9 @@ jobs:
210212
name: "Benchmark | ${{ matrix.name }} (${{ matrix.device }}${{ matrix.interface != 'none' && format('-{0}', matrix.interface) || '' }})"
211213
if: github.repository == 'MFlowCode/MFC' && needs.file-changes.outputs.checkall == 'true'
212214
needs: [lint-gate, file-changes]
215+
concurrency:
216+
group: bench-${{ github.ref }}-${{ matrix.cluster }}-${{ matrix.device }}-${{ matrix.interface }}
217+
cancel-in-progress: true
213218
continue-on-error: false
214219
timeout-minutes: 480
215220
strategy:

0 commit comments

Comments
 (0)