Skip to content

Commit 6cf8518

Browse files
authored
[ci] Specify limited concurrency for PR jobs (#31240)
There was a concurrency setting we hadn't enabled on jobs that are primarily triggered for PRs. This meant that every update to the PR would trigger new CI jobs without canceling any ones already in flight, which can greatly slow down CI due to the number of jobs that need to run. This PR adds concurrency [based on the workflow name and PR number or head ref.](https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/control-the-concurrency-of-workflows-and-jobs) --- [//]: # (BEGIN SAPLING FOOTER) Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/react/pull/31240). * __->__ #31240 * #31239
1 parent cbcc1d2 commit 6cf8518

5 files changed

Lines changed: 20 additions & 0 deletions

File tree

.github/workflows/compiler_playground.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ on:
88
- compiler/**
99
- .github/workflows/compiler-playground.yml
1010

11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref || github.run_id }}
13+
cancel-in-progress: true
14+
1115
env:
1216
TZ: /usr/share/zoneinfo/America/Los_Angeles
1317
# https://github.com/actions/cache/blob/main/tips-and-workarounds.md#cache-segment-restore-timeout

.github/workflows/compiler_rust.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ on:
1515
- compiler/Cargo.*
1616
- compiler/*.toml
1717

18+
concurrency:
19+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref || github.run_id }}
20+
cancel-in-progress: true
21+
1822
env:
1923
CARGO_TERM_COLOR: always
2024
RUSTFLAGS: -Dwarnings

.github/workflows/compiler_typescript.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ on:
88
- compiler/**
99
- .github/workflows/compiler_typescript.yml
1010

11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref || github.run_id }}
13+
cancel-in-progress: true
14+
1115
env:
1216
TZ: /usr/share/zoneinfo/America/Los_Angeles
1317
# https://github.com/actions/cache/blob/main/tips-and-workarounds.md#cache-segment-restore-timeout

.github/workflows/runtime_build_and_test.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ on:
77
paths-ignore:
88
- compiler/**
99

10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref || github.run_id }}
12+
cancel-in-progress: true
13+
1014
env:
1115
TZ: /usr/share/zoneinfo/America/Los_Angeles
1216
# https://github.com/actions/cache/blob/main/tips-and-workarounds.md#cache-segment-restore-timeout

.github/workflows/shared_lint.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ on:
55
branches: [main]
66
pull_request:
77

8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref || github.run_id }}
10+
cancel-in-progress: true
11+
812
env:
913
TZ: /usr/share/zoneinfo/America/Los_Angeles
1014
# https://github.com/actions/cache/blob/main/tips-and-workarounds.md#cache-segment-restore-timeout

0 commit comments

Comments
 (0)