Skip to content

Commit 792bbe6

Browse files
committed
optimize CI with concurrency groups
Signed-off-by: Connor Tsui <[email protected]>
1 parent ec5c119 commit 792bbe6

File tree

15 files changed

+96
-8
lines changed

15 files changed

+96
-8
lines changed

.github/workflows/bench-pr.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
name: PR Benchmarks
44

5+
concurrency:
6+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
7+
# TODO(connor): Do we actually want to cancel benchmarks if someone retriggers them?
8+
cancel-in-progress: true
9+
510
on:
611
pull_request:
712
types: [labeled, synchronize]

.github/workflows/ci.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,19 @@
11
name: CI
22

33
concurrency:
4-
group: ${{ github.workflow }}-${{ github.ref }}
4+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
55
cancel-in-progress: ${{ github.ref != 'refs/heads/develop' }}
66

7-
on: [push, pull_request, workflow_dispatch]
7+
on:
8+
push:
9+
branches: [develop]
10+
pull_request: { }
11+
workflow_dispatch: { }
12+
# TODO(connor): Maybe add these path filters.
13+
# paths-ignore:
14+
# - '**.md'
15+
# - 'docs/**'
16+
# - 'benchmarks-website/**'
817

918
permissions:
1019
actions: read

.github/workflows/claude.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
name: Claude Code
22

3+
concurrency:
4+
# We shouldn't have multiple instances of Claude running on the same PR.
5+
group: ${{ github.event.issue.number || github.event.pull_request.number }}
6+
cancel-in-progress: true
7+
38
on:
49
issue_comment:
510
types: [created]

.github/workflows/docs.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,18 @@
11
name: Vortex Docs
22

3+
concurrency:
4+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
5+
cancel-in-progress: true
6+
37
on:
48
push:
59
branches: [develop]
10+
# TODO(connor): Maybe add these path filters.
11+
# paths:
12+
# - 'docs/**'
13+
# - 'vortex-python/**'
14+
# - 'java/**'
15+
# - '**.rs'
616
workflow_dispatch: { }
717

818
permissions:

.github/workflows/fuzz.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
11
name: Fuzz
22

3+
# The group causes runs to queue instead of running in parallel.
4+
concurrency:
5+
group: fuzz
6+
# This ensures each run builds on the previous run's corpus discoveries rather than losing them to
7+
# failed compare-and-swap uploads.
8+
cancel-in-progress: false
9+
310
on:
411
schedule:
512
- cron: "0 */4 * * *" # every 4 hours
6-
workflow_dispatch:
13+
workflow_dispatch: { }
714

815
jobs:
916
io_fuzz:

.github/workflows/fuzzer-fix-automation.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
name: Fuzzer Fix Automation
22

3+
concurrency:
4+
group: fuzzer-fix-${{ inputs.issue_number || github.run_id }}
5+
cancel-in-progress: true
6+
37
on:
48
workflow_dispatch:
59
inputs:

.github/workflows/labels.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
name: PR Labels
22

3+
concurrency:
4+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
5+
cancel-in-progress: true
6+
37
on:
48
pull_request:
5-
types: [opened, reopened, synchronize, labeled, unlabeled] # Trigger on these PR activities
9+
# Trigger on these PR activities
10+
types: [opened, reopened, synchronize, labeled, unlabeled]
611

712
jobs:
813
check_changelog_label:

.github/workflows/minimize_fuzz_corpus.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
name: Minimize Fuzz Corpus
22

3+
# The group causes runs to queue instead of running in parallel.
4+
concurrency:
5+
group: minimize-corpus
6+
# This prevents one run from overwriting another's minimization work (no compare-and-swap used).
7+
cancel-in-progress: false
8+
39
on:
4-
workflow_dispatch:
10+
workflow_dispatch: { }
511

612
jobs:
713
io_fuzz_minimize:

.github/workflows/nightly-bench.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
name: Nightly Benchmarks
22

3+
# The group causes runs to queue instead of running in parallel.
4+
concurrency:
5+
group: nightly-bench
6+
# This queues manual triggers to run after scheduled benchmarks complete.
7+
cancel-in-progress: false
8+
39
on:
410
schedule:
511
- cron: "0 0 * * *" # daily
6-
workflow_dispatch:
12+
workflow_dispatch: { }
713

814
permissions:
915
id-token: write # enables AWS-GitHub OIDC

.github/workflows/package.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
name: Package
22

3+
concurrency:
4+
group: package-${{ inputs.version }}
5+
cancel-in-progress: true
6+
37
on:
48
workflow_dispatch:
59
inputs:

0 commit comments

Comments
 (0)