Skip to content

Commit f59efca

Browse files
committed
Run every target from the one nightly instead of 13 unwatched crons
1 parent 4be2231 commit f59efca

13 files changed

Lines changed: 234 additions & 48 deletions

File tree

.github/workflows/android.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,22 @@ on:
77
- '.github/workflows/android.yml'
88
pull_request:
99
types: [opened, synchronize, reopened, ready_for_review]
10-
schedule:
11-
- cron: '45 6 * * *'
10+
# No cron: nightly.yml calls this, so the whole nightly is ONE run
11+
# and therefore one triage writer. See nightly.yml's header.
12+
workflow_call:
13+
inputs:
14+
caller_run_id:
15+
description: 'run id of the calling workflow; keeps a called run in its own concurrency group'
16+
type: string
17+
default: ''
1218
workflow_dispatch:
1319

20+
# github.workflow is the CALLER's name in a called workflow, so a plain group
21+
# collides with every sibling the nightly calls and they cancel each other.
22+
# inputs is null unless we were called, so key off that.
1423
concurrency:
15-
group: ${{ github.workflow }}-${{ github.ref }}
16-
cancel-in-progress: true
24+
group: ${{ inputs.caller_run_id && format('{0}-call-{1}', github.workflow, inputs.caller_run_id) || format('{0}-{1}', github.workflow, github.ref) }}
25+
cancel-in-progress: ${{ !inputs.caller_run_id }}
1726

1827
permissions:
1928
contents: read

.github/workflows/cmake.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,22 @@ on:
77
- '.github/workflows/cmake.yml'
88
pull_request:
99
types: [opened, synchronize, reopened, ready_for_review]
10-
schedule:
11-
- cron: '45 6 * * *'
10+
# No cron: nightly.yml calls this, so the whole nightly is ONE run
11+
# and therefore one triage writer. See nightly.yml's header.
12+
workflow_call:
13+
inputs:
14+
caller_run_id:
15+
description: 'run id of the calling workflow; keeps a called run in its own concurrency group'
16+
type: string
17+
default: ''
1218
workflow_dispatch:
1319

20+
# github.workflow is the CALLER's name in a called workflow, so a plain group
21+
# collides with every sibling the nightly calls and they cancel each other.
22+
# inputs is null unless we were called, so key off that.
1423
concurrency:
15-
group: ${{ github.workflow }}-${{ github.ref }}
16-
cancel-in-progress: true
24+
group: ${{ inputs.caller_run_id && format('{0}-call-{1}', github.workflow, inputs.caller_run_id) || format('{0}-{1}', github.workflow, github.ref) }}
25+
cancel-in-progress: ${{ !inputs.caller_run_id }}
1726

1827
permissions:
1928
contents: read

.github/workflows/csharp.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,22 @@ on:
77
- '.github/workflows/csharp.yml'
88
pull_request:
99
types: [opened, synchronize, reopened, ready_for_review]
10-
schedule:
11-
- cron: '45 6 * * *'
10+
# No cron: nightly.yml calls this, so the whole nightly is ONE run
11+
# and therefore one triage writer. See nightly.yml's header.
12+
workflow_call:
13+
inputs:
14+
caller_run_id:
15+
description: 'run id of the calling workflow; keeps a called run in its own concurrency group'
16+
type: string
17+
default: ''
1218
workflow_dispatch:
1319

20+
# github.workflow is the CALLER's name in a called workflow, so a plain group
21+
# collides with every sibling the nightly calls and they cancel each other.
22+
# inputs is null unless we were called, so key off that.
1423
concurrency:
15-
group: ${{ github.workflow }}-${{ github.ref }}
16-
cancel-in-progress: true
24+
group: ${{ inputs.caller_run_id && format('{0}-call-{1}', github.workflow, inputs.caller_run_id) || format('{0}-{1}', github.workflow, github.ref) }}
25+
cancel-in-progress: ${{ !inputs.caller_run_id }}
1726

1827
permissions:
1928
contents: read

.github/workflows/ebpf.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,22 @@ on:
77
- '.github/workflows/ebpf.yml'
88
pull_request:
99
types: [opened, synchronize, reopened, ready_for_review]
10-
schedule:
11-
- cron: '45 6 * * *'
10+
# No cron: nightly.yml calls this, so the whole nightly is ONE run
11+
# and therefore one triage writer. See nightly.yml's header.
12+
workflow_call:
13+
inputs:
14+
caller_run_id:
15+
description: 'run id of the calling workflow; keeps a called run in its own concurrency group'
16+
type: string
17+
default: ''
1218
workflow_dispatch:
1319

20+
# github.workflow is the CALLER's name in a called workflow, so a plain group
21+
# collides with every sibling the nightly calls and they cancel each other.
22+
# inputs is null unless we were called, so key off that.
1423
concurrency:
15-
group: ${{ github.workflow }}-${{ github.ref }}
16-
cancel-in-progress: true
24+
group: ${{ inputs.caller_run_id && format('{0}-call-{1}', github.workflow, inputs.caller_run_id) || format('{0}-{1}', github.workflow, github.ref) }}
25+
cancel-in-progress: ${{ !inputs.caller_run_id }}
1726

1827
permissions:
1928
contents: read

.github/workflows/emulated.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,22 @@ on:
1414
- '.github/examples-manifest.yml'
1515
pull_request:
1616
types: [opened, synchronize, reopened, ready_for_review]
17-
schedule:
18-
- cron: '30 6 * * *'
17+
# No cron: nightly.yml calls this, so the whole nightly is ONE run
18+
# and therefore one triage writer. See nightly.yml's header.
19+
workflow_call:
20+
inputs:
21+
caller_run_id:
22+
description: 'run id of the calling workflow; keeps a called run in its own concurrency group'
23+
type: string
24+
default: ''
1925
workflow_dispatch:
2026

27+
# github.workflow is the CALLER's name in a called workflow, so a plain group
28+
# collides with every sibling the nightly calls and they cancel each other.
29+
# inputs is null unless we were called, so key off that.
2130
concurrency:
22-
group: ${{ github.workflow }}-${{ github.ref }}
23-
cancel-in-progress: true
31+
group: ${{ inputs.caller_run_id && format('{0}-call-{1}', github.workflow, inputs.caller_run_id) || format('{0}-{1}', github.workflow, github.ref) }}
32+
cancel-in-progress: ${{ !inputs.caller_run_id }}
2433

2534
permissions:
2635
contents: read

.github/workflows/esp32.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,22 @@ on:
77
- '.github/workflows/esp32.yml'
88
pull_request:
99
types: [opened, synchronize, reopened, ready_for_review]
10-
schedule:
11-
- cron: '45 6 * * *'
10+
# No cron: nightly.yml calls this, so the whole nightly is ONE run
11+
# and therefore one triage writer. See nightly.yml's header.
12+
workflow_call:
13+
inputs:
14+
caller_run_id:
15+
description: 'run id of the calling workflow; keeps a called run in its own concurrency group'
16+
type: string
17+
default: ''
1218
workflow_dispatch:
1319

20+
# github.workflow is the CALLER's name in a called workflow, so a plain group
21+
# collides with every sibling the nightly calls and they cancel each other.
22+
# inputs is null unless we were called, so key off that.
1423
concurrency:
15-
group: ${{ github.workflow }}-${{ github.ref }}
16-
cancel-in-progress: true
24+
group: ${{ inputs.caller_run_id && format('{0}-call-{1}', github.workflow, inputs.caller_run_id) || format('{0}-{1}', github.workflow, github.ref) }}
25+
cancel-in-progress: ${{ !inputs.caller_run_id }}
1726

1827
permissions:
1928
contents: read

.github/workflows/fullstack.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,22 @@ on:
77
- '.github/workflows/fullstack.yml'
88
pull_request:
99
types: [opened, synchronize, reopened, ready_for_review]
10-
schedule:
11-
- cron: '45 6 * * *'
10+
# No cron: nightly.yml calls this, so the whole nightly is ONE run
11+
# and therefore one triage writer. See nightly.yml's header.
12+
workflow_call:
13+
inputs:
14+
caller_run_id:
15+
description: 'run id of the calling workflow; keeps a called run in its own concurrency group'
16+
type: string
17+
default: ''
1218
workflow_dispatch:
1319

20+
# github.workflow is the CALLER's name in a called workflow, so a plain group
21+
# collides with every sibling the nightly calls and they cancel each other.
22+
# inputs is null unless we were called, so key off that.
1423
concurrency:
15-
group: ${{ github.workflow }}-${{ github.ref }}
16-
cancel-in-progress: true
24+
group: ${{ inputs.caller_run_id && format('{0}-call-{1}', github.workflow, inputs.caller_run_id) || format('{0}-{1}', github.workflow, github.ref) }}
25+
cancel-in-progress: ${{ !inputs.caller_run_id }}
1726

1827
permissions:
1928
contents: read

.github/workflows/java.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,22 @@ on:
77
- '.github/workflows/java.yml'
88
pull_request:
99
types: [opened, synchronize, reopened, ready_for_review]
10-
schedule:
11-
- cron: '45 6 * * *'
10+
# No cron: nightly.yml calls this, so the whole nightly is ONE run
11+
# and therefore one triage writer. See nightly.yml's header.
12+
workflow_call:
13+
inputs:
14+
caller_run_id:
15+
description: 'run id of the calling workflow; keeps a called run in its own concurrency group'
16+
type: string
17+
default: ''
1218
workflow_dispatch:
1319

20+
# github.workflow is the CALLER's name in a called workflow, so a plain group
21+
# collides with every sibling the nightly calls and they cancel each other.
22+
# inputs is null unless we were called, so key off that.
1423
concurrency:
15-
group: ${{ github.workflow }}-${{ github.ref }}
16-
cancel-in-progress: true
24+
group: ${{ inputs.caller_run_id && format('{0}-call-{1}', github.workflow, inputs.caller_run_id) || format('{0}-{1}', github.workflow, github.ref) }}
25+
cancel-in-progress: ${{ !inputs.caller_run_id }}
1726

1827
permissions:
1928
contents: read

.github/workflows/nightly.yml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,88 @@ jobs:
4545
refs: ${{ inputs.wolfssl_refs || '' }}
4646
stable_count: 2
4747

48+
# Every target the repo has, in ONE run. They used to carry their own crons,
49+
# which meant 13 runs a night and therefore 13 triage writers racing on the
50+
# same issue bodies -- and 12 of them were never triaged at all.
51+
#
52+
# The job name here is the triage unit: it prefixes every job the called
53+
# workflow produces ("esp32 / Build / ..."), and becomes the ci:<name> label.
4854
host:
4955
name: Host
5056
needs: [refs]
5157
uses: ./.github/workflows/examples.yml
5258
with:
5359
wolfssl_refs: ${{ needs.refs.outputs.refs }}
5460
caller_run_id: ${{ github.run_id }}
61+
62+
esp32:
63+
needs: [refs]
64+
uses: ./.github/workflows/esp32.yml
65+
with:
66+
caller_run_id: ${{ github.run_id }}
67+
68+
android:
69+
needs: [refs]
70+
uses: ./.github/workflows/android.yml
71+
with:
72+
caller_run_id: ${{ github.run_id }}
73+
74+
rt1060:
75+
needs: [refs]
76+
uses: ./.github/workflows/rt1060.yml
77+
with:
78+
caller_run_id: ${{ github.run_id }}
79+
80+
uefi:
81+
needs: [refs]
82+
uses: ./.github/workflows/uefi.yml
83+
with:
84+
caller_run_id: ${{ github.run_id }}
85+
86+
puf:
87+
needs: [refs]
88+
uses: ./.github/workflows/puf.yml
89+
with:
90+
caller_run_id: ${{ github.run_id }}
91+
92+
rpi-pico:
93+
needs: [refs]
94+
uses: ./.github/workflows/rpi-pico.yml
95+
with:
96+
caller_run_id: ${{ github.run_id }}
97+
98+
ebpf:
99+
needs: [refs]
100+
uses: ./.github/workflows/ebpf.yml
101+
with:
102+
caller_run_id: ${{ github.run_id }}
103+
104+
fullstack:
105+
needs: [refs]
106+
uses: ./.github/workflows/fullstack.yml
107+
with:
108+
caller_run_id: ${{ github.run_id }}
109+
110+
java:
111+
needs: [refs]
112+
uses: ./.github/workflows/java.yml
113+
with:
114+
caller_run_id: ${{ github.run_id }}
115+
116+
cmake:
117+
needs: [refs]
118+
uses: ./.github/workflows/cmake.yml
119+
with:
120+
caller_run_id: ${{ github.run_id }}
121+
122+
csharp:
123+
needs: [refs]
124+
uses: ./.github/workflows/csharp.yml
125+
with:
126+
caller_run_id: ${{ github.run_id }}
127+
128+
emulated:
129+
needs: [refs]
130+
uses: ./.github/workflows/emulated.yml
131+
with:
132+
caller_run_id: ${{ github.run_id }}

.github/workflows/puf.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,22 @@ on:
77
- '.github/workflows/puf.yml'
88
pull_request:
99
types: [opened, synchronize, reopened, ready_for_review]
10-
schedule:
11-
- cron: '45 6 * * *'
10+
# No cron: nightly.yml calls this, so the whole nightly is ONE run
11+
# and therefore one triage writer. See nightly.yml's header.
12+
workflow_call:
13+
inputs:
14+
caller_run_id:
15+
description: 'run id of the calling workflow; keeps a called run in its own concurrency group'
16+
type: string
17+
default: ''
1218
workflow_dispatch:
1319

20+
# github.workflow is the CALLER's name in a called workflow, so a plain group
21+
# collides with every sibling the nightly calls and they cancel each other.
22+
# inputs is null unless we were called, so key off that.
1423
concurrency:
15-
group: ${{ github.workflow }}-${{ github.ref }}
16-
cancel-in-progress: true
24+
group: ${{ inputs.caller_run_id && format('{0}-call-{1}', github.workflow, inputs.caller_run_id) || format('{0}-{1}', github.workflow, github.ref) }}
25+
cancel-in-progress: ${{ !inputs.caller_run_id }}
1726

1827
permissions:
1928
contents: read

0 commit comments

Comments
 (0)