Skip to content

Commit e9a44e4

Browse files
authored
ci: add concurrency control to workflows (#42)
2 parents f8a5baa + 44e6568 commit e9a44e4

File tree

6 files changed

+32
-3
lines changed

6 files changed

+32
-3
lines changed

.github/workflows/build.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
1+
name: Build
2+
13
on:
24
push:
35
pull_request:
46
merge_group:
57
schedule: # Trigger a job on default branch at 4AM PST everyday
68
- cron: "0 11 * * *"
79

8-
name: Build
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.event.compare || github.head_ref || github.ref }}
12+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
913

1014
env:
1115
RUSTFLAGS: >-

.github/workflows/cargo-audit.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
name: Cargo Audit
2+
23
on:
34
push:
45
paths:
@@ -9,6 +10,10 @@ on:
910
schedule: # Trigger a job on default branch at 4AM PST everyday
1011
- cron: 0 11 * * *
1112

13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.event.compare || github.head_ref || github.ref }}
15+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
16+
1217
jobs:
1318
cargo_audit:
1419
name: Cargo Audit

.github/workflows/code-formatting-check.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
name: Code Formatting Check
2+
23
on:
34
push:
45
pull_request:
56
merge_group:
67
schedule: # Trigger a job on default branch at 4AM PST everyday
78
- cron: 0 11 * * *
89

10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.event.compare || github.head_ref || github.ref }}
12+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
13+
914
jobs:
1015
cargo-fmt:
1116
name: .rs Formatting Check

.github/workflows/docs.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
1+
name: Docs
2+
13
on:
24
push:
35
pull_request:
46
merge_group:
57
schedule: # Trigger a job on default branch at 4AM PST everyday
68
- cron: "0 11 * * *"
79

8-
name: Docs
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.event.compare || github.head_ref || github.ref }}
12+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
913

1014
env:
1115
RUSTDOCFLAGS: -D warnings
@@ -15,6 +19,7 @@ jobs:
1519
name: Docs
1620
runs-on: windows-2025
1721
strategy:
22+
fail-fast: false # Allow all matrix variants to complete even if some fail
1823
matrix:
1924
wdk:
2025
- 10.0.22621 # NI WDK

.github/workflows/github-dependency-review.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
name: Dependency Review
2+
23
on:
34
push:
45
pull_request:
56
merge_group:
67

8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.event.compare || github.head_ref || github.ref }}
10+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
11+
712
jobs:
813
dependency-review:
914
name: Github Dependency Review

.github/workflows/lint.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
1+
name: Lint
2+
13
on:
24
push:
35
pull_request:
46
merge_group:
57
schedule: # Trigger a job on default branch at 4AM PST everyday
68
- cron: "0 11 * * *"
79

8-
name: Lint
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.event.compare || github.head_ref || github.ref }}
12+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
913

1014
jobs:
1115
clippy:
@@ -14,6 +18,7 @@ jobs:
1418
permissions:
1519
checks: write
1620
strategy:
21+
fail-fast: false # Allow all matrix variants to complete even if some fail
1722
matrix:
1823
wdk:
1924
- 10.0.22621 # NI WDK

0 commit comments

Comments
 (0)