Skip to content

Commit 79b66b5

Browse files
authored
CI(workflows): Increase job timeouts and improve nightly workflow control (#2451)
## Changes - Timeout increase across tool workflows in multiple jobs from 15 to 25 minutes, as GH runner takes more and more time to update their dependencies. - Improved workflow steer by running them in [parallel](https://github.com/Open-CMSIS-Pack/devtools/actions/runs/24891315292) - Nightly workflow orchestration updates - If one workflow fails, the other workflow still runs - 0.1% threshold prevents flaky gate failures on non-functional changes - One publish results job for nightly ## Checklist <!-- Put an `x` in the boxes. All tasks must be completed and boxes checked before merging. --> - [x] 🤖 This change is covered by unit tests (if applicable). - [x] 🤹 Manual testing has been performed (if necessary). - [x] 🛡️ Security impacts have been considered (if relevant). - [x] 📖 Documentation updates are complete (if required). - [x] 🧠 Third-party dependencies and TPIP updated (if required).
1 parent 3b20142 commit 79b66b5

9 files changed

Lines changed: 101 additions & 40 deletions

File tree

.github/workflows/buildmgr.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ on:
3232
types: [ published ]
3333

3434
concurrency:
35-
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
35+
group: buildmgr-${{ github.ref }}-${{ github.event_name }}
3636
cancel-in-progress: true
3737

3838
permissions:
@@ -57,7 +57,7 @@ jobs:
5757
name: build (${{ matrix.runs_on }}, ${{ matrix.arch }})
5858
needs: [ setup, matrix_prep ]
5959
runs-on: ${{ matrix.runs_on }}
60-
timeout-minutes: 15
60+
timeout-minutes: 25
6161
strategy:
6262
fail-fast: true
6363
matrix: ${{ fromJson(needs.matrix_prep.outputs.matrix) }}
@@ -121,7 +121,7 @@ jobs:
121121
(github.event_name == 'release' && startsWith(github.ref, 'refs/tags/tools/buildmgr/')) ||
122122
((github.event.schedule != '') && (!github.event.repository.private))
123123
runs-on: ubuntu-22.04
124-
timeout-minutes: 15
124+
timeout-minutes: 25
125125
permissions:
126126
contents: write
127127
steps:
@@ -222,7 +222,7 @@ jobs:
222222
needs: [ setup, build, docs ]
223223
# Debian package generation in ubuntu 22.04 produces incompatible metadata
224224
runs-on: ubuntu-22.04
225-
timeout-minutes: 15
225+
timeout-minutes: 25
226226
permissions:
227227
contents: write
228228
steps:
@@ -344,7 +344,7 @@ jobs:
344344

345345
test:
346346
needs: [ setup, matrix_prep, create_installer ]
347-
timeout-minutes: 15
347+
timeout-minutes: 25
348348
runs-on: ${{ matrix.runs_on }}
349349
name: test (${{ matrix.runs_on }}, ${{ matrix.arch }})
350350
env:
@@ -512,7 +512,7 @@ jobs:
512512
GCC_TOOLCHAIN_10_3_1: ${{ github.workspace }}/${{ matrix.toolchain_root }}
513513
AC6_TOOLCHAIN_6_18_0: ${{ github.workspace }}/${{ matrix.toolchain_root }}
514514
runs-on: ubuntu-22.04
515-
timeout-minutes: 15
515+
timeout-minutes: 25
516516

517517
steps:
518518
- name: Harden Runner
@@ -630,7 +630,7 @@ jobs:
630630

631631
sanity-check-native:
632632
needs: [ matrix_prep, create_installer ]
633-
timeout-minutes: 15
633+
timeout-minutes: 25
634634
runs-on: ${{ matrix.runs_on }}
635635
name: sanity check native (${{ matrix.runs_on }}, ${{ matrix.arch }})
636636
env:
@@ -674,7 +674,7 @@ jobs:
674674
675675
sanity-check-docker:
676676
needs: create_installer
677-
timeout-minutes: 15
677+
timeout-minutes: 25
678678
runs-on: ubuntu-22.04
679679
container:
680680
image: ${{ matrix.image }}
@@ -720,6 +720,7 @@ jobs:
720720
721721
test-results-preparation:
722722
name: "Publish Tests Results"
723+
if: ${{ always() }}
723724
needs: [ test ]
724725
runs-on: ubuntu-22.04
725726
steps:

.github/workflows/nightly.yml

Lines changed: 53 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,33 +8,46 @@ on:
88
permissions:
99
contents: write
1010

11+
concurrency:
12+
group: nightly-${{ github.ref }}-${{ github.event_name }}
13+
cancel-in-progress: false
14+
1115
jobs:
1216
buildmgr:
1317
if: github.repository == 'Open-CMSIS-Pack/devtools'
1418
uses: ./.github/workflows/buildmgr.yml
1519
secrets: inherit
20+
1621
packchk:
17-
needs: [buildmgr]
22+
if: github.repository == 'Open-CMSIS-Pack/devtools'
1823
uses: ./.github/workflows/packchk.yml
1924
secrets: inherit
25+
2026
packgen:
21-
needs: [packchk]
27+
if: github.repository == 'Open-CMSIS-Pack/devtools'
2228
uses: ./.github/workflows/packgen.yml
2329
secrets: inherit
30+
2431
projmgr:
25-
needs: [packgen]
32+
if: github.repository == 'Open-CMSIS-Pack/devtools'
2633
uses: ./.github/workflows/projmgr.yml
2734
secrets: inherit
35+
2836
svdconv:
29-
needs: [projmgr]
37+
if: github.repository == 'Open-CMSIS-Pack/devtools'
3038
uses: ./.github/workflows/svdconv.yml
3139
secrets: inherit
40+
3241
test_libs:
33-
needs: [svdconv]
42+
if: github.repository == 'Open-CMSIS-Pack/devtools'
3443
uses: ./.github/workflows/test_libs.yml
44+
secrets: inherit
45+
3546
coverage:
47+
if: github.repository == 'Open-CMSIS-Pack/devtools'
3648
runs-on: ubuntu-22.04
3749
needs: [ buildmgr, packchk, packgen, projmgr, svdconv, test_libs ]
50+
3851
steps:
3952
- name: Harden Runner
4053
if: ${{ !github.event.repository.private }}
@@ -45,8 +58,7 @@ jobs:
4558
- name: Install dependencies
4659
run: |
4760
sudo apt-get update
48-
sudo apt-get install \
49-
lcov
61+
sudo apt-get install lcov
5062
5163
- name: Download coverage report
5264
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
@@ -57,7 +69,13 @@ jobs:
5769

5870
- name: Consolidate coverage data
5971
run: |
60-
lcov --rc lcov_branch_coverage=1 --add-tracefile coverage_packchk.info -a coverage_packgen.info -a coverage_projmgr.info -a coverage_buildmgr.info -a coverage_svdconv.info -o merged_coverage.info
72+
lcov --rc lcov_branch_coverage=1 \
73+
--add-tracefile coverage_packchk.info \
74+
-a coverage_packgen.info \
75+
-a coverage_projmgr.info \
76+
-a coverage_buildmgr.info \
77+
-a coverage_svdconv.info \
78+
-o merged_coverage.info
6179
working-directory: coverage/
6280

6381
- name: Archive merged coverage report
@@ -66,3 +84,30 @@ jobs:
6684
name: merged-coverage-report
6785
path: ./coverage/merged_coverage.info
6886
if-no-files-found: error
87+
88+
publish-test-results:
89+
if: always() && github.repository == 'Open-CMSIS-Pack/devtools'
90+
name: Publish Test Results
91+
runs-on: ubuntu-22.04
92+
needs: [ buildmgr, packchk, packgen, projmgr, svdconv, test_libs ]
93+
permissions:
94+
checks: write
95+
pull-requests: write
96+
steps:
97+
- name: Harden Runner
98+
if: ${{ !github.event.repository.private }}
99+
uses: step-security/harden-runner@6c3c2f2c1c457b00c10c4848d6f5491db3b629df # v2.18.0
100+
with:
101+
egress-policy: audit
102+
103+
- name: Download and Extract Artifacts
104+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
105+
with:
106+
path: artifacts
107+
108+
- name: Publish Test Results
109+
uses: EnricoMi/publish-unit-test-result-action@c950f6fb443cb5af20a377fd0dfaa78838901040 # v2.23.0
110+
with:
111+
commit: ${{ github.sha }}
112+
report_individual_runs: true
113+
files: "artifacts/**/*.xml"

.github/workflows/packchk.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ on:
3737
types: [published]
3838

3939
concurrency:
40-
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
40+
group: packchk-${{ github.ref }}-${{ github.event_name }}
4141
cancel-in-progress: true
4242

4343
permissions:
@@ -62,7 +62,7 @@ jobs:
6262
needs: [ setup, matrix_prep ]
6363
runs-on: ${{ matrix.runs_on }}
6464
name: build (${{ matrix.runs_on }}, ${{ matrix.arch }})
65-
timeout-minutes: 15
65+
timeout-minutes: 25
6666
strategy:
6767
fail-fast: true
6868
matrix: ${{ fromJson(needs.matrix_prep.outputs.matrix) }}
@@ -153,7 +153,7 @@ jobs:
153153
needs: [ setup, matrix_prep ]
154154
runs-on: ${{ matrix.runs_on }}
155155
name: test (${{ matrix.runs_on }}, ${{ matrix.arch }})
156-
timeout-minutes: 15
156+
timeout-minutes: 25
157157
strategy:
158158
fail-fast: false
159159
matrix: ${{ fromJson(needs.matrix_prep.outputs.matrix) }}
@@ -226,7 +226,7 @@ jobs:
226226
lcov_base: https://github.com/linux-test-project/lcov/releases/download/v1.15/
227227
lcov_installer: lcov-1.15.tar.gz
228228
runs-on: ubuntu-22.04
229-
timeout-minutes: 15
229+
timeout-minutes: 25
230230
steps:
231231
- name: Harden Runner
232232
if: ${{ !github.event.repository.private }}
@@ -337,7 +337,7 @@ jobs:
337337
startsWith(github.ref, 'refs/tags/tools/packchk/')
338338
needs: [ build, test, coverage ]
339339
runs-on: ubuntu-22.04
340-
timeout-minutes: 15
340+
timeout-minutes: 25
341341
permissions:
342342
contents: write
343343
steps:
@@ -369,6 +369,7 @@ jobs:
369369

370370
test-results-preparation:
371371
name: "Publish Tests Results"
372+
if: ${{ always() }}
372373
needs: [ test ]
373374
runs-on: ubuntu-22.04
374375
steps:

.github/workflows/packgen.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ on:
3232
types: [published]
3333

3434
concurrency:
35-
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
35+
group: packgen-${{ github.ref }}-${{ github.event_name }}
3636
cancel-in-progress: true
3737

3838
permissions:
@@ -57,7 +57,7 @@ jobs:
5757
needs: [ setup, matrix_prep ]
5858
runs-on: ${{ matrix.runs_on }}
5959
name: build (${{ matrix.runs_on }}, ${{ matrix.arch }})
60-
timeout-minutes: 15
60+
timeout-minutes: 25
6161
strategy:
6262
fail-fast: true
6363
matrix: ${{ fromJson(needs.matrix_prep.outputs.matrix) }}
@@ -119,7 +119,7 @@ jobs:
119119
startsWith(github.ref, 'refs/tags/tools/packgen/')
120120
needs: [ build, unittest ]
121121
runs-on: ubuntu-22.04
122-
timeout-minutes: 15
122+
timeout-minutes: 25
123123
permissions:
124124
contents: write
125125
steps:
@@ -187,7 +187,7 @@ jobs:
187187
needs: [ setup, matrix_prep ]
188188
name: unittest (${{ matrix.runs_on }}, ${{ matrix.arch }})
189189
runs-on: ${{ matrix.runs_on }}
190-
timeout-minutes: 15
190+
timeout-minutes: 25
191191
strategy:
192192
fail-fast: true
193193
matrix: ${{ fromJson(needs.matrix_prep.outputs.matrix) }}
@@ -237,7 +237,7 @@ jobs:
237237
lcov_base: https://github.com/linux-test-project/lcov/releases/download/v1.15/
238238
lcov_installer: lcov-1.15.tar.gz
239239
runs-on: ubuntu-22.04
240-
timeout-minutes: 15
240+
timeout-minutes: 25
241241
steps:
242242
- name: Harden Runner
243243
if: ${{ !github.event.repository.private }}
@@ -326,6 +326,7 @@ jobs:
326326

327327
test-results-preparation:
328328
name: "Publish Tests Results"
329+
if: ${{ always() }}
329330
needs: [ unittest ]
330331
runs-on: ubuntu-22.04
331332
steps:

.github/workflows/projmgr.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ on:
3636
types: [published]
3737

3838
concurrency:
39-
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
39+
group: projmgr-${{ github.ref }}-${{ github.event_name }}
4040
cancel-in-progress: true
4141

4242
permissions:
@@ -61,7 +61,7 @@ jobs:
6161
needs: [ setup, matrix_prep ]
6262
runs-on: ${{ matrix.runs_on }}
6363
name: build (${{ matrix.runs_on }},${{ matrix.arch }})
64-
timeout-minutes: 20
64+
timeout-minutes: 25
6565
strategy:
6666
# fail-fast: true
6767
matrix: ${{ fromJson(needs.matrix_prep.outputs.matrix) }}
@@ -139,7 +139,7 @@ jobs:
139139
needs: [ setup, matrix_prep ]
140140
name: build-swig (${{ matrix.runs_on }}, ${{ matrix.arch }})
141141
runs-on: ${{ matrix.runs_on }}
142-
timeout-minutes: 20
142+
timeout-minutes: 25
143143
strategy:
144144
# fail-fast: true
145145
matrix: ${{ fromJson(needs.matrix_prep.outputs.matrix) }}
@@ -208,7 +208,7 @@ jobs:
208208
startsWith(github.ref, 'refs/tags/tools/projmgr/')
209209
needs: [ build, build-swig, unittest, coverage ]
210210
runs-on: ubuntu-22.04
211-
timeout-minutes: 15
211+
timeout-minutes: 25
212212
permissions:
213213
contents: write
214214

@@ -369,7 +369,7 @@ jobs:
369369
needs: [ setup, matrix_prep ]
370370
name: unittest (${{ matrix.runs_on }}, ${{ matrix.arch }})
371371
runs-on: ${{ matrix.runs_on }}
372-
timeout-minutes: 15
372+
timeout-minutes: 25
373373
strategy:
374374
fail-fast: false
375375
matrix: ${{ fromJson(needs.matrix_prep.outputs.matrix) }}
@@ -429,7 +429,7 @@ jobs:
429429
lcov_base: https://github.com/linux-test-project/lcov/releases/download/v1.15/
430430
lcov_installer: lcov-1.15.tar.gz
431431
runs-on: ubuntu-22.04
432-
timeout-minutes: 15
432+
timeout-minutes: 25
433433
steps:
434434
- name: Harden Runner
435435
if: ${{ !github.event.repository.private }}
@@ -518,6 +518,7 @@ jobs:
518518

519519
test-results-preparation:
520520
name: "Publish Tests Results"
521+
if: ${{ always() }}
521522
needs: [ unittest ]
522523
runs-on: ubuntu-22.04
523524
steps:

0 commit comments

Comments
 (0)