From 83e1e8815ecd660885d23bf14de0ce70b1e70273 Mon Sep 17 00:00:00 2001 From: Max Gekk Date: Sun, 22 Nov 2026 17:47:46 +0100 Subject: [PATCH 1/2] [VFDLIBM] Cancel a pull request's superseded CI and dry-run runs Generated-by: Claude Code (Opus 5.5) --- .github/workflows/ci.yml | 8 ++++++++ .github/workflows/release.yml | 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 665ac8d..bc8d98a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,6 +7,14 @@ on: # release.yml calls these jobs as its gates, since a tag does not start this workflow. workflow_call: +# A push to a pull request cancels that pull request's run still going, whose head is no longer +# the one to merge. Any other run is a group of its own (its run id), so a run on main and the +# jobs release.yml calls always finish. When release.yml calls this workflow, github.workflow is +# the caller's name, so its group never meets this workflow's own run of the same pull request. +concurrency: + group: ci-${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.ref || github.run_id }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + jobs: build: name: build (${{ matrix.name }}) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8a0331f..3dc1d7a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -53,9 +53,10 @@ on: permissions: contents: read +# A tag's run is never cancelled; a push to a pull request cancels that pull request's older run. concurrency: group: release-${{ github.ref }} - cancel-in-progress: false + cancel-in-progress: ${{ github.event_name == 'pull_request' }} jobs: version: From 3cc52eed5c22ed8056d84e5e0a02eef404a90318 Mon Sep 17 00:00:00 2001 From: Max Gekk Date: Sun, 22 Nov 2026 17:49:02 +0100 Subject: [PATCH 2/2] [VFDLIBM] State the re-run and dispatch cases of the concurrency groups Generated-by: Claude Code (Opus 5.5) --- .github/workflows/ci.yml | 8 +++++--- .github/workflows/release.yml | 4 +++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bc8d98a..8b87df6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,9 +8,11 @@ on: workflow_call: # A push to a pull request cancels that pull request's run still going, whose head is no longer -# the one to merge. Any other run is a group of its own (its run id), so a run on main and the -# jobs release.yml calls always finish. When release.yml calls this workflow, github.workflow is -# the caller's name, so its group never meets this workflow's own run of the same pull request. +# the one to merge. Every run of one pull request shares the group, so a re-run of an older run +# cancels the current head's run too: re-run only the newest. Any other run is a group of its own +# (its run id), so a run on main and the jobs release.yml calls always finish; release.yml calls +# this workflow only off pull requests. github.workflow is the caller's name in a call, which +# would keep a future caller's pull request apart from this workflow's own. concurrency: group: ci-${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.ref || github.run_id }} cancel-in-progress: ${{ github.event_name == 'pull_request' }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3dc1d7a..7554936 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -53,7 +53,9 @@ on: permissions: contents: read -# A tag's run is never cancelled; a push to a pull request cancels that pull request's older run. +# A push to a pull request cancels that pull request's older run (re-run only the newest, since a +# re-run cancels the head's run too). A tag's or a dispatch's run is never cancelled while it +# runs, though a newer run on the same ref replaces one still pending. concurrency: group: release-${{ github.ref }} cancel-in-progress: ${{ github.event_name == 'pull_request' }}