ci: cancel superseded main runs; a scheduled full run saves the caches

Pushes to main cancel the Workspace run they supersede, as pull requests
already do; the newest push's run tests everything before it. On 16 Nov main
had 144 pushes, each a three-OS run that could not be cancelled, which is much
of what fills the org's macOS runners. Release tags, manual runs and a new
scheduled run every 6 hours keep a group of their own and always finish, and the
scheduled run saves the caches (the gate already saves on scheduled runs of the
default branch). scripts/test-workspace-concurrency.py checks the new policy.

The per-crate workflows, which no longer save caches, cancel superseded runs on
every branch, main included.
This commit is contained in:
aiongg committed 2026-11-17 19:09:20 +00:00
1 parent a1398a3b61
commit c0421c7fc6
23 files changed
+129 -112

No files matched your search

+4 -4
View File
@@ -12,10 +12,10 @@ permissions:
contents: read
concurrency:
# Pull requests share one group per branch, so a newer push cancels the older run. Every other
# run (main, manual) gets a group of its own, so it is neither cancelled nor replaced while queued.
group: ai-core-${{ github.event_name == 'pull_request' && github.ref || github.run_id }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
# One group per pull request and per branch: a newer push cancels the run it supersedes, on main
# too, since the newest run checks everything before it.
group: ai-core-${{ github.ref }}
cancel-in-progress: true
# fmt, clippy and the tests run in the Workspace gate on every OS; this checks what it does not.
jobs:
+4 -4
View File
@@ -12,10 +12,10 @@ permissions:
contents: read
concurrency:
# Pull requests share one group per branch, so a newer push cancels the older run. Every other
# run (main, manual) gets a group of its own, so it is neither cancelled nor replaced while queued.
group: atomic-${{ github.event_name == 'pull_request' && github.ref || github.run_id }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
# One group per pull request and per branch: a newer push cancels the run it supersedes, on main
# too, since the newest run checks everything before it.
group: atomic-${{ github.ref }}
cancel-in-progress: true
# fmt, clippy and the tests run in the Workspace gate on every OS; this runs what it does not.
jobs:
+4 -5
View File
@@ -17,11 +17,10 @@ env:
PROPTEST_CASES: "64"
concurrency:
# Pull requests share one group per branch, so a newer push cancels the older run. Every other
# run (main, manual) gets its own group: it is never cancelled or replaced while queued, so it
# always gets to save the cache.
group: shared-audio-${{ github.event_name == 'pull_request' && github.ref || github.run_id }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
# One group per pull request and per branch: a newer push cancels the run it supersedes, on main
# too, since the newest run checks everything before it.
group: shared-audio-${{ github.ref }}
cancel-in-progress: true
jobs:
lint:
+6
View File
@@ -11,6 +11,12 @@ on:
permissions:
contents: read
concurrency:
# One group per pull request and per branch: a newer push cancels the run it supersedes, on main
# too, since the newest run checks everything before it.
group: cms-${{ github.ref }}
cancel-in-progress: true
# clippy and the debug tests run in the Workspace gate; this runs the release build of the tests.
jobs:
cms:
+4 -5
View File
@@ -12,11 +12,10 @@ permissions:
contents: read
concurrency:
# Pull requests share one group per branch, so a newer push cancels the older run. Every other
# run (main, manual) gets its own group: it is never cancelled or replaced while queued, so it
# always gets to save the cache.
group: shared-crw-${{ github.event_name == 'pull_request' && github.ref || github.run_id }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
# One group per pull request and per branch: a newer push cancels the run it supersedes, on main
# too, since the newest run checks everything before it.
group: shared-crw-${{ github.ref }}
cancel-in-progress: true
# fmt, clippy and the tests run in the Workspace gate on every OS; this checks what it does not.
jobs:
+4 -4
View File
@@ -12,10 +12,10 @@ permissions:
contents: read
concurrency:
# Pull requests share one group per branch, so a newer push cancels the older run. Every other
# run (main, manual) gets a group of its own, so it is neither cancelled nor replaced while queued.
group: dialogs-${{ github.event_name == 'pull_request' && github.ref || github.run_id }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
# One group per pull request and per branch: a newer push cancels the run it supersedes, on main
# too, since the newest run checks everything before it.
group: dialogs-${{ github.ref }}
cancel-in-progress: true
jobs:
dialogs:
+4 -4
View File
@@ -12,10 +12,10 @@ permissions:
contents: read
concurrency:
# Pull requests share one group per branch, so a newer push cancels the older run. Every other
# run (main, manual) gets a group of its own, so it is neither cancelled nor replaced while queued.
group: doc-${{ github.event_name == 'pull_request' && github.ref || github.run_id }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
# One group per pull request and per branch: a newer push cancels the run it supersedes, on main
# too, since the newest run checks everything before it.
group: doc-${{ github.ref }}
cancel-in-progress: true
# fmt, clippy and the tests run in the Workspace gate on every OS; this checks what it does not.
jobs:
+4 -4
View File
@@ -12,10 +12,10 @@ permissions:
contents: read
concurrency:
# Pull requests share one group per branch, so a newer push cancels the older run. Every other
# run (main, manual) gets a group of its own, so it is neither cancelled nor replaced while queued.
group: ecproj-format-${{ github.event_name == 'pull_request' && github.ref || github.run_id }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
# One group per pull request and per branch: a newer push cancels the run it supersedes, on main
# too, since the newest run checks everything before it.
group: ecproj-format-${{ github.ref }}
cancel-in-progress: true
# fmt, clippy and the tests run in the Workspace gate on every OS; this checks what it does not.
jobs:
+4 -4
View File
@@ -12,10 +12,10 @@ permissions:
contents: read
concurrency:
# Pull requests share one group per branch, so a newer push cancels the older run. Every other
# run (main, manual) gets a group of its own, so it is neither cancelled nor replaced while queued.
group: font-store-${{ github.event_name == 'pull_request' && github.ref || github.run_id }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
# One group per pull request and per branch: a newer push cancels the run it supersedes, on main
# too, since the newest run checks everything before it.
group: font-store-${{ github.ref }}
cancel-in-progress: true
# fmt, clippy and the tests run in the Workspace gate on every OS; this checks what it does not.
jobs:
+4 -5
View File
@@ -42,11 +42,10 @@ permissions:
contents: read
concurrency:
# Pull requests share one group per branch, so a newer push cancels the older run. Every other
# run (main, manual) gets its own group: it is never cancelled or replaced while queued, so it
# always gets to save the cache.
group: shared-formats-${{ github.event_name == 'pull_request' && github.ref || github.run_id }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
# One group per pull request and per branch: a newer push cancels the run it supersedes, on main
# too, since the newest run checks everything before it.
group: shared-formats-${{ github.ref }}
cancel-in-progress: true
jobs:
check:
+4 -5
View File
@@ -12,11 +12,10 @@ permissions:
contents: read
concurrency:
# Pull requests share one group per branch, so a newer push cancels the older run. Every other
# run (main, manual) gets its own group: it is never cancelled or replaced while queued, so it
# always gets to save the cache.
group: shared-jpeg-${{ github.event_name == 'pull_request' && github.ref || github.run_id }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
# One group per pull request and per branch: a newer push cancels the run it supersedes, on main
# too, since the newest run checks everything before it.
group: shared-jpeg-${{ github.ref }}
cancel-in-progress: true
jobs:
check:
+4 -5
View File
@@ -12,11 +12,10 @@ permissions:
contents: read
concurrency:
# Pull requests share one group per branch, so a newer push cancels the older run. Every other
# run (main, manual) gets its own group: it is never cancelled or replaced while queued, so it
# always gets to save the cache.
group: keymap-${{ github.event_name == 'pull_request' && github.ref || github.run_id }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
# One group per pull request and per branch: a newer push cancels the run it supersedes, on main
# too, since the newest run checks everything before it.
group: keymap-${{ github.ref }}
cancel-in-progress: true
jobs:
linux:
+4 -5
View File
@@ -17,11 +17,10 @@ env:
PROPTEST_CASES: "64"
concurrency:
# Pull requests share one group per branch, so a newer push cancels the older run. Every other
# run (main, manual) gets its own group: it is never cancelled or replaced while queued, so it
# always gets to save the cache.
group: shared-media-${{ github.event_name == 'pull_request' && github.ref || github.run_id }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
# One group per pull request and per branch: a newer push cancels the run it supersedes, on main
# too, since the newest run checks everything before it.
group: shared-media-${{ github.ref }}
cancel-in-progress: true
jobs:
lint:
+4 -4
View File
@@ -12,10 +12,10 @@ permissions:
contents: read
concurrency:
# Pull requests share one group per branch, so a newer push cancels the older run. Every other
# run (main, manual) gets a group of its own, so it is neither cancelled nor replaced while queued.
group: pcraft-format-${{ github.event_name == 'pull_request' && github.ref || github.run_id }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
# One group per pull request and per branch: a newer push cancels the run it supersedes, on main
# too, since the newest run checks everything before it.
group: pcraft-format-${{ github.ref }}
cancel-in-progress: true
# fmt, clippy and the tests run in the Workspace gate on every OS, and its msrv job checks the
# workspace on 1.95; this checks the web build on 1.95.
+4 -5
View File
@@ -16,11 +16,10 @@ env:
PROPTEST_CASES: "64"
concurrency:
# Pull requests share one group per branch, so a newer push cancels the older run. Every other
# run (main, manual) gets its own group: it is never cancelled or replaced while queued, so it
# always gets to save the cache.
group: shared-pdf-${{ github.event_name == 'pull_request' && github.ref || github.run_id }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
# One group per pull request and per branch: a newer push cancels the run it supersedes, on main
# too, since the newest run checks everything before it.
group: shared-pdf-${{ github.ref }}
cancel-in-progress: true
jobs:
native:
+4 -5
View File
@@ -12,11 +12,10 @@ permissions:
contents: read
concurrency:
# Pull requests share one group per branch, so a newer push cancels the older run. Every other
# run (main, manual) gets its own group: it is never cancelled or replaced while queued, so it
# always gets to save the cache.
group: craft-proof-${{ github.event_name == 'pull_request' && github.ref || github.run_id }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
# One group per pull request and per branch: a newer push cancels the run it supersedes, on main
# too, since the newest run checks everything before it.
group: craft-proof-${{ github.ref }}
cancel-in-progress: true
jobs:
check:
+4 -4
View File
@@ -12,10 +12,10 @@ permissions:
contents: read
concurrency:
# Pull requests share one group per branch, so a newer push cancels the older run. Every other
# run (main, manual) gets a group of its own, so it is neither cancelled nor replaced while queued.
group: update-${{ github.event_name == 'pull_request' && github.ref || github.run_id }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
# One group per pull request and per branch: a newer push cancels the run it supersedes, on main
# too, since the newest run checks everything before it.
group: update-${{ github.ref }}
cancel-in-progress: true
# fmt, clippy and the tests with default and with all features run in the Workspace gate on every
# OS; this runs the egui feature alone.
+4 -4
View File
@@ -12,10 +12,10 @@ permissions:
contents: read
concurrency:
# Pull requests share one group per branch, so a newer push cancels the older run. Every other
# run (main, manual) gets a group of its own, so it is neither cancelled nor replaced while queued.
group: vectorcraft-format-${{ github.event_name == 'pull_request' && github.ref || github.run_id }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
# One group per pull request and per branch: a newer push cancels the run it supersedes, on main
# too, since the newest run checks everything before it.
group: vectorcraft-format-${{ github.ref }}
cancel-in-progress: true
# fmt, clippy and the tests run in the Workspace gate on every OS, and its msrv job checks the
# workspace on 1.95; this checks the web build on 1.95.
+4 -4
View File
@@ -12,10 +12,10 @@ permissions:
contents: read
concurrency:
# Pull requests share one group per branch, so a newer push cancels the older run. Every other
# run (main, manual) gets a group of its own, so it is neither cancelled nor replaced while queued.
group: web-api-${{ github.event_name == 'pull_request' && github.ref || github.run_id }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
# One group per pull request and per branch: a newer push cancels the run it supersedes, on main
# too, since the newest run checks everything before it.
group: web-api-${{ github.ref }}
cancel-in-progress: true
jobs:
web-api:
+4 -5
View File
@@ -12,11 +12,10 @@ permissions:
contents: read
concurrency:
# Pull requests share one group per branch, so a newer push cancels the older run. Every other
# run (main, manual) gets its own group: it is never cancelled or replaced while queued, so it
# always gets to save the cache.
group: shared-web-host-${{ github.event_name == 'pull_request' && github.ref || github.run_id }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
# One group per pull request and per branch: a newer push cancels the run it supersedes, on main
# too, since the newest run checks everything before it.
group: shared-web-host-${{ github.ref }}
cancel-in-progress: true
jobs:
check:
+4 -4
View File
@@ -12,10 +12,10 @@ permissions:
contents: read
concurrency:
# Pull requests share one group per branch, so a newer push cancels the older run. Every other
# run (main, manual) gets a group of its own, so it is neither cancelled nor replaced while queued.
group: window-${{ github.event_name == 'pull_request' && github.ref || github.run_id }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
# One group per pull request and per branch: a newer push cancels the run it supersedes, on main
# too, since the newest run checks everything before it.
group: window-${{ github.ref }}
cancel-in-progress: true
# fmt, clippy and the tests with default and with all features (egui and restore together) run in
# the Workspace gate on every OS; this runs each feature alone.
+10 -6
View File
@@ -6,17 +6,21 @@ on:
tags: ["v*"]
pull_request:
workflow_dispatch:
# A full run on main every 6 hours that is never cancelled, so the caches are saved while pushes
# to main cancel each other.
schedule:
- cron: "17 */6 * * *"
permissions:
contents: read
concurrency:
# Pull requests share one group per branch, so a newer push cancels the older run. Every other
# run (push to main, a release tag, a manual run) gets a group of its own: it is neither
# cancelled nor replaced while queued, so a main run always finishes and saves the dependency
# cache, and a release run is never cancelled.
group: workspace-${{ github.event_name == 'pull_request' && github.ref || github.run_id }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
# A pull request, and main, each have one group, so a newer push cancels the run it supersedes;
# the newest push's run still tests everything before it. Every other run (a release tag, a
# manual run, the scheduled run) gets a group of its own and is neither cancelled nor replaced
# while queued: a release run always finishes, and the scheduled run saves the caches.
group: workspace-${{ (github.event_name == 'pull_request' || github.event_name == 'push' && github.ref == 'refs/heads/main') && github.ref || github.run_id }}
cancel-in-progress: ${{ github.event_name == 'pull_request' || github.event_name == 'push' && github.ref == 'refs/heads/main' }}
jobs:
native: