Skip to content

Commit 3e5bbdb

Browse files
committed
gh: run modules testsuite files in parallel on CI jobs
Use the -j option of script/mt on the test step of the Linux, macOS and Windows jobs, with as many jobs as processors available on the runner, to cut down the duration of these jobs. The MSYS2 job sets the MSYS environment variable to winsymlinks:native on this step, as symbolic links are created as copies of their target by default there, which does not suit the shard directories of a parallel run. Cygwin supports symbolic links by default, so its job needs no such setting. The log file of each shard is added to the artifact uploaded when a job fails, as the merged modules.log file does not hold the results of a shard that was stopped or that did not complete. The test step of the Cygwin and MSYS2 jobs is given a one hour timeout, so that a stalled run fails and provides these logs rather than waiting for the job timeout. Assisted-by: Claude:claude-fable-5-1 Signed-off-by: Xavier Delaruelle <xavier.delaruelle@cea.fr>
1 parent 8cf0768 commit 3e5bbdb

3 files changed

Lines changed: 42 additions & 12 deletions

File tree

‎.github/workflows/linux_tests.yaml‎

Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
run: |
5555
eval $EXTRA_SCRIPT_PRETEST
5656
make test-deps
57-
xvfb-run script/mt
57+
xvfb-run script/mt -j "$(nproc)"
5858
eval $EXTRA_SCRIPT_POSTTEST
5959
- name: Install Modules
6060
run: |
@@ -80,8 +80,10 @@ jobs:
8080
name: testsuite-logs-${{ github.job }}
8181
path: |
8282
modules.log
83+
.testshards/*/modules.log
8384
install.log
8485
retention-days: 5
86+
include-hidden-files: true
8587

8688
tcl85-nolibtclenvmodules:
8789
runs-on: ubuntu-22.04
@@ -142,7 +144,7 @@ jobs:
142144
run: |
143145
eval $EXTRA_SCRIPT_PRETEST
144146
make test-deps
145-
script/mt
147+
script/mt -j "$(nproc)"
146148
eval $EXTRA_SCRIPT_POSTTEST
147149
- name: Install Modules
148150
run: |
@@ -168,8 +170,10 @@ jobs:
168170
name: testsuite-logs-${{ github.job }}
169171
path: |
170172
modules.log
173+
.testshards/*/modules.log
171174
install.log
172175
retention-days: 5
176+
include-hidden-files: true
173177

174178
tcl85-2:
175179
runs-on: ubuntu-22.04
@@ -226,7 +230,7 @@ jobs:
226230
run: |
227231
eval $EXTRA_SCRIPT_PRETEST
228232
make test-deps
229-
script/mt
233+
script/mt -j "$(nproc)"
230234
eval $EXTRA_SCRIPT_POSTTEST
231235
- name: Install Modules
232236
run: |
@@ -252,8 +256,10 @@ jobs:
252256
name: testsuite-logs-${{ github.job }}
253257
path: |
254258
modules.log
259+
.testshards/*/modules.log
255260
install.log
256261
retention-days: 5
262+
include-hidden-files: true
257263

258264
tcl86:
259265
runs-on: ubuntu-22.04
@@ -295,7 +301,7 @@ jobs:
295301
set -e
296302
eval $EXTRA_SCRIPT_PRETEST
297303
make test-deps
298-
script/mt
304+
script/mt -j "$(nproc)"
299305
eval $EXTRA_SCRIPT_POSTTEST
300306
- name: Install Modules
301307
run: |
@@ -321,8 +327,10 @@ jobs:
321327
name: testsuite-logs-${{ github.job }}
322328
path: |
323329
modules.log
330+
.testshards/*/modules.log
324331
install.log
325332
retention-days: 5
333+
include-hidden-files: true
326334

327335
tcl85:
328336
runs-on: ubuntu-22.04
@@ -366,7 +374,7 @@ jobs:
366374
set -e
367375
eval $EXTRA_SCRIPT_PRETEST
368376
make test-deps
369-
script/mt
377+
script/mt -j "$(nproc)"
370378
eval $EXTRA_SCRIPT_POSTTEST
371379
- name: Install Modules
372380
run: |
@@ -392,8 +400,10 @@ jobs:
392400
name: testsuite-logs-${{ github.job }}
393401
path: |
394402
modules.log
403+
.testshards/*/modules.log
395404
install.log
396405
retention-days: 5
406+
include-hidden-files: true
397407

398408
tcl91:
399409
runs-on: ubuntu-24.04
@@ -453,7 +463,7 @@ jobs:
453463
run: |
454464
eval $EXTRA_SCRIPT_PRETEST
455465
make test-deps
456-
script/mt
466+
script/mt -j "$(nproc)"
457467
eval $EXTRA_SCRIPT_POSTTEST
458468
- name: Install Modules
459469
working-directory: modules-1.2.3+branch_name-91-g6dd3db49
@@ -473,8 +483,10 @@ jobs:
473483
name: testsuite-logs-${{ github.job }}
474484
path: |
475485
modules-1.2.3+branch_name-91-g6dd3db49/modules.log
486+
modules-1.2.3+branch_name-91-g6dd3db49/.testshards/*/modules.log
476487
modules-1.2.3+branch_name-91-g6dd3db49/install.log
477488
retention-days: 5
489+
include-hidden-files: true
478490

479491
tcl90:
480492
runs-on: ubuntu-22.04
@@ -513,7 +525,7 @@ jobs:
513525
- name: Test Modules build
514526
run: |
515527
make test-deps
516-
script/mt
528+
script/mt -j "$(nproc)"
517529
- name: Install Modules
518530
run: |
519531
make install
@@ -538,8 +550,10 @@ jobs:
538550
name: testsuite-logs-${{ github.job }}
539551
path: |
540552
modules.log
553+
.testshards/*/modules.log
541554
install.log
542555
retention-days: 5
556+
include-hidden-files: true
543557

544558
el8:
545559
runs-on: ubuntu-latest
@@ -585,7 +599,7 @@ jobs:
585599
- name: Test Modules build
586600
run: |
587601
make test-deps
588-
xvfb-run script/mt
602+
xvfb-run script/mt -j "$(nproc)"
589603
- name: Install Modules
590604
run: |
591605
make install
@@ -604,8 +618,10 @@ jobs:
604618
name: testsuite-logs-${{ github.job }}
605619
path: |
606620
/__w/modules/modules/modules.log
621+
/__w/modules/modules/.testshards/*/modules.log
607622
/__w/modules/modules/install.log
608623
retention-days: 5
624+
include-hidden-files: true
609625

610626
el9:
611627
runs-on: ubuntu-latest
@@ -640,7 +656,7 @@ jobs:
640656
- name: Test Modules build
641657
run: |
642658
make test-deps
643-
script/mt
659+
script/mt -j "$(nproc)"
644660
- name: Install Modules
645661
run: |
646662
make install
@@ -659,5 +675,7 @@ jobs:
659675
name: testsuite-logs-${{ github.job }}
660676
path: |
661677
/__w/modules/modules/modules.log
678+
/__w/modules/modules/.testshards/*/modules.log
662679
/__w/modules/modules/install.log
663680
retention-days: 5
681+
include-hidden-files: true

‎.github/workflows/macos_tests.yaml‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
done
5050
eval $EXTRA_SCRIPT_PRETEST
5151
make test-deps
52-
script/mt
52+
script/mt -j "$(sysctl -n hw.ncpu)"
5353
eval $EXTRA_SCRIPT_POSTTEST
5454
- name: Install Modules
5555
run: |
@@ -75,5 +75,7 @@ jobs:
7575
name: testsuite-logs-${{ github.job }}
7676
path: |
7777
modules.log
78+
.testshards/*/modules.log
7879
install.log
7980
retention-days: 5
81+
include-hidden-files: true

‎.github/workflows/windows_tests.yaml‎

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,9 @@ jobs:
169169
run: |
170170
bash -lc 'cd $(cygpath -u "$GITHUB_WORKSPACE") && ./configure && make'
171171
- name: Test Modules build
172+
timeout-minutes: 60
172173
run: |
173-
bash -lc 'cd $(cygpath -u "$GITHUB_WORKSPACE") && script/mt'
174+
bash -lc 'cd $(cygpath -u "$GITHUB_WORKSPACE") && script/mt -j "$(nproc)"'
174175
- name: Install Modules
175176
run: |
176177
bash -lc 'cd $(cygpath -u "$GITHUB_WORKSPACE") && make install'
@@ -186,8 +187,10 @@ jobs:
186187
name: testsuite-logs-${{ github.job }}
187188
path: |
188189
modules.log
190+
.testshards/*/modules.log
189191
install.log
190192
retention-days: 5
193+
include-hidden-files: true
191194

192195
msys:
193196
runs-on: windows-2022
@@ -215,8 +218,13 @@ jobs:
215218
make
216219
- name: Test Modules build
217220
shell: msys2 {0}
221+
timeout-minutes: 60
222+
# symbolic links are created as copies by default on MSYS2, which is
223+
# unfit for the shard directories of a parallel run
224+
env:
225+
MSYS: winsymlinks:native
218226
run: |
219-
script/mt
227+
script/mt -j "$(nproc)"
220228
- name: Install Modules
221229
shell: msys2 {0}
222230
run: |
@@ -235,5 +243,7 @@ jobs:
235243
name: testsuite-logs-${{ github.job }}
236244
path: |
237245
modules.log
246+
.testshards/*/modules.log
238247
install.log
239248
retention-days: 5
249+
include-hidden-files: true

0 commit comments

Comments
 (0)