99 # Simple tests on Linux; except the ParFORM case, they probably pass unless
1010 # the committer has forgotten running "make check".
1111 check :
12- name : Test (${{ matrix.test }}) for ${{ matrix.bin }}
12+ name : Test (${{ matrix.test }}) for ${{ matrix.bin }}${{ matrix.nthreads && format(' -w{0}', matrix.nthreads) || '' }}
1313 runs-on : ubuntu-20.04
1414 strategy :
1515 fail-fast : false
1616 matrix :
1717 include :
18- - {bin: form, test: default, timeout: 10}
19- - {bin: tform, test: default, timeout: 10}
18+ - {bin: form, test: default}
19+ - {bin: tform, test: default}
20+ - {bin: tform, test: default, nthreads: 2}
2021 - {bin: parform, test: default, timeout: 15}
21- - {bin: form, test: checkpoint, timeout: 10 }
22- - {bin: tform, test: checkpoint, timeout: 10 }
22+ - {bin: form, test: checkpoint}
23+ - {bin: tform, test: checkpoint}
2324 - {bin: form, test: forcer, timeout: 60}
2425 - {bin: tform, test: forcer, timeout: 60}
25- - {bin: tform, test: multithreaded, timeout: 10}
26+ - {bin: tform, test: forcer, nthreads: 2, timeout: 60}
27+ - {bin: tform, test: multithreaded}
2628 steps :
2729 - name : Checkout repository
2830 uses : actions/checkout@v4
@@ -81,20 +83,15 @@ jobs:
8183 esac
8284
8385 - name : Test
84- run : |
85- testset=''
86- if [ "${{ matrix.test }}" != "default" ]; then
87- testset='-C ${{ matrix.test }}'
88- fi
89- ./check/check.rb ./sources/${{ matrix.bin }} --stat $testset --timeout ${{ matrix.timeout }}
86+ run : ./check/check.rb ./sources/${{ matrix.bin }} --stat ${{ matrix.nthreads && format('-w{0}', matrix.nthreads) || '' }} ${{ matrix.timeout && format('--timeout {0}', matrix.timeout) || '' }} ${{ matrix.test != 'default' && format('-C {0}', matrix.test) || '' }}
9087 env :
9188 FORMPATH : ${{ github.workspace }}/formlib
9289
9390 # Check memory errors (e.g., uninitialized values and memory leaks)
9491 # thoroughly by using Valgrind on Linux. To maximize the use of concurrent
9592 # jobs, we divide the tests into smaller parts.
9693 valgrind-check :
97- name : Valgrind check for ${{ matrix.bin }} (${{ matrix.group }})
94+ name : Valgrind check for ${{ matrix.bin }}${{ matrix.nthreads && format(' -w{0}', matrix.nthreads) || '' }} (${{ matrix.group }})
9895 runs-on : ubuntu-20.04
9996 strategy :
10097 fail-fast : false
@@ -115,6 +112,16 @@ jobs:
115112 - {bin: tvorm, group: 8/10}
116113 - {bin: tvorm, group: 9/10}
117114 - {bin: tvorm, group: 10/10}
115+ - {bin: tvorm, nthreads: 2, group: 1/10}
116+ - {bin: tvorm, nthreads: 2, group: 2/10}
117+ - {bin: tvorm, nthreads: 2, group: 3/10}
118+ - {bin: tvorm, nthreads: 2, group: 4/10}
119+ - {bin: tvorm, nthreads: 2, group: 5/10}
120+ - {bin: tvorm, nthreads: 2, group: 6/10}
121+ - {bin: tvorm, nthreads: 2, group: 7/10}
122+ - {bin: tvorm, nthreads: 2, group: 8/10}
123+ - {bin: tvorm, nthreads: 2, group: 9/10}
124+ - {bin: tvorm, nthreads: 2, group: 10/10}
118125 - {bin: parvorm, group: 1/10}
119126 - {bin: parvorm, group: 2/10}
120127 - {bin: parvorm, group: 3/10}
@@ -168,17 +175,21 @@ jobs:
168175 run : make -C sources -j 4 ${{ matrix.bin }}
169176
170177 - name : Test
171- run : ./check/check.rb valgrind ./sources/${{ matrix.bin }} --stat -g ${{ matrix.group }} --retries 5
178+ run : ./check/check.rb valgrind ./sources/${{ matrix.bin }} --stat -g ${{ matrix.group }} --retries 5 ${{ matrix.nthreads && format('-w{0}', matrix.nthreads) || '' }}
172179
173180 # Generate LCOV coverage data to be posted to coveralls.io. Note that
174181 # we measure code coverage only for tests checked with Valgrind.
175182 coverage :
176- name : Code coverage for ${{ matrix.bin }}
183+ name : Code coverage for ${{ matrix.bin }}${{ matrix.nthreads && format(' -w{0}', matrix.nthreads) || '' }}
177184 runs-on : ubuntu-20.04
178185 strategy :
179186 fail-fast : false
180187 matrix :
181- bin : [vorm, tvorm, parvorm]
188+ include :
189+ - {bin: vorm}
190+ - {bin: tvorm}
191+ - {bin: tvorm, nthreads: 2}
192+ - {bin: parvorm}
182193 steps :
183194 - name : Checkout repository
184195 uses : actions/checkout@v4
@@ -219,7 +230,7 @@ jobs:
219230 run : make -C sources -j 4 ${{ matrix.bin }}
220231
221232 - name : Test
222- run : ./check/check.rb ./sources/${{ matrix.bin }} --stat --timeout 30
233+ run : ./check/check.rb ./sources/${{ matrix.bin }} --stat --timeout 30 ${{ matrix.nthreads && format('-w{0}', matrix.nthreads) || '' }}
223234
224235 - name : Generate LCOV coverage data
225236 run : |
@@ -229,7 +240,7 @@ jobs:
229240 - name : Coveralls Parallel
230241 uses : coverallsapp/github-action@v2
231242 with :
232- flag-name : ${{ matrix.bin }}
243+ flag-name : ${{ matrix.bin }}${{ matrix.nthreads && format(' -w{0}', matrix.nthreads) || '' }}
233244 parallel : true
234245
235246 # Post LCOV coverage data to coveralls.io.
@@ -244,13 +255,17 @@ jobs:
244255
245256 # Tests with a 32-bit container.
246257 check-i386 :
258+ name : 32-bit container check for ${{ matrix.bin }}${{ matrix.nthreads && format(' -w{0}', matrix.nthreads) || '' }}
247259 runs-on : ubuntu-latest
248260 container :
249261 image : i386/debian:11.5
250262 strategy :
251263 fail-fast : false
252264 matrix :
253- bin : [form, tform]
265+ include :
266+ - {bin: form}
267+ - {bin: tform}
268+ - {bin: tform, nthreads: 2}
254269 steps :
255270 # We have to use v1.
256271 # See https://github.com/actions/checkout/issues/334
@@ -277,4 +292,4 @@ jobs:
277292 run : make -C sources -j 4 ${{ matrix.bin }}
278293
279294 - name : Test
280- run : ./check/check.rb ./sources/${{ matrix.bin }} --stat --wordsize 2
295+ run : ./check/check.rb ./sources/${{ matrix.bin }} --stat --wordsize 2 ${{ matrix.nthreads && format('-w{0}', matrix.nthreads) || '' }}
0 commit comments