@@ -52,13 +52,20 @@ jobs:
52
52
- uses : actions/checkout@v4
53
53
with :
54
54
submodules : ' true'
55
- - run : ./.github/scripts/install_dependencies.sh
55
+
56
+ - name : Get number of CPU cores
57
+ uses : SimenB/github-actions-cpu-cores@v2
58
+ id : cpu-cores
59
+
60
+ - name : Install dependencies
61
+ run : ./.github/scripts/install_dependencies.sh
56
62
57
63
-
uses :
hendrikmuhs/[email protected]
58
64
59
65
- name : Test
60
66
env :
61
67
BUILD_TYPE : ${{ matrix.build_type }}
68
+ NUM_PROC : ${{ steps.cpu-cores.outputs.count }}
62
69
run : |
63
70
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
64
71
./.github/scripts/build.sh VERBOSE=${{ matrix.verbose }}
80
87
with :
81
88
python-version : 3.10.10
82
89
- uses : actions/checkout@v4
83
- - run : ./.github/scripts/install_dependencies.sh
90
+
91
+ - name : Install dependencies
92
+ run : ./.github/scripts/install_dependencies.sh
84
93
85
94
- name : Test
86
95
run : ./dev/${{ matrix.script }}
@@ -97,11 +106,18 @@ jobs:
97
106
- uses : actions/checkout@v4
98
107
with :
99
108
submodules : ' true'
100
- - run : ./.github/scripts/install_dependencies.sh
109
+
110
+ - name : Get number of CPU cores
111
+ uses : SimenB/github-actions-cpu-cores@v2
112
+ id : cpu-cores
113
+
114
+ - name : Install dependencies
115
+ run : ./.github/scripts/install_dependencies.sh
101
116
102
117
- name : Test
103
118
env :
104
119
CMAKE_PARAMS : " -DVTR_ASSERT_LEVEL=3 -DWITH_BLIFEXPLORER=on"
120
+ NUM_PROC : ${{ steps.cpu-cores.outputs.count }}
105
121
run : ./.github/scripts/unittest.sh
106
122
107
123
@@ -116,7 +132,13 @@ jobs:
116
132
- uses : actions/checkout@v4
117
133
with :
118
134
submodules : ' true'
119
- - run : ./.github/scripts/install_dependencies.sh
135
+
136
+ - name : Get number of CPU cores
137
+ uses : SimenB/github-actions-cpu-cores@v2
138
+ id : cpu-cores
139
+
140
+ - name : Install dependencies
141
+ run : ./.github/scripts/install_dependencies.sh
120
142
121
143
-
uses :
hendrikmuhs/[email protected]
122
144
@@ -125,6 +147,7 @@ jobs:
125
147
# In order to get compilation warnings produced per source file, we must do a non-IPO build
126
148
# We also turn warnings into errors for this target by doing a strict compile
127
149
CMAKE_PARAMS : " -DVTR_ASSERT_LEVEL=3 -DWITH_BLIFEXPLORER=on -DVTR_ENABLE_STRICT_COMPILE=on -DVTR_IPO_BUILD=off"
150
+ NUM_PROC : ${{ steps.cpu-cores.outputs.count }}
128
151
run : |
129
152
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
130
153
./.github/scripts/build.sh
@@ -201,17 +224,24 @@ jobs:
201
224
- uses : actions/checkout@v4
202
225
with :
203
226
submodules : ' true'
204
- - run : ./.github/scripts/install_dependencies.sh
227
+
228
+ - name : Get number of CPU cores
229
+ uses : SimenB/github-actions-cpu-cores@v2
230
+ id : cpu-cores
231
+
232
+ - name : Install dependencies
233
+ run : ./.github/scripts/install_dependencies.sh
205
234
206
235
-
uses :
hendrikmuhs/[email protected]
207
236
208
237
- name : Test
209
238
env :
210
239
CMAKE_PARAMS : ${{ matrix.params }}
240
+ NUM_PROC : ${{ steps.cpu-cores.outputs.count }}
211
241
run : |
212
242
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
213
243
./.github/scripts/build.sh
214
- ./run_reg_test.py ${{ matrix.suite }} -show_failures -j2
244
+ ./run_reg_test.py ${{ matrix.suite }} -show_failures -j${{ steps.cpu-cores.outputs.count}}
215
245
216
246
- name : Upload regression run files
217
247
if : ${{ !cancelled() }}
@@ -259,7 +289,12 @@ jobs:
259
289
with :
260
290
submodules : ' true'
261
291
262
- - run : ./.github/scripts/install_dependencies.sh
292
+ - name : Get number of CPU cores
293
+ uses : SimenB/github-actions-cpu-cores@v2
294
+ id : cpu-cores
295
+
296
+ - name : Install dependencies
297
+ run : ./.github/scripts/install_dependencies.sh
263
298
264
299
-
uses :
hendrikmuhs/[email protected]
265
300
@@ -273,12 +308,13 @@ jobs:
273
308
# depends on LLVM and all CI tests where VTR_ENABLE_SANITIZE is enabled fail. For a temporary
274
309
# fix, we manually reduce the entropy. This quick fix should be removed in the future
275
310
# when github deploys a more stable Ubuntu image.
311
+ NUM_PROC : ${{ steps.cpu-cores.outputs.count }}
276
312
run : |
277
313
sudo sysctl -w vm.mmap_rnd_bits=28
278
314
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
279
315
./.github/scripts/build.sh
280
316
# We skip QoR since we are only checking for errors in sanitizer runs
281
- ./run_reg_test.py ${{ matrix.suite }} -show_failures -j2 -skip_qor
317
+ ./run_reg_test.py ${{ matrix.suite }} -show_failures -j${{ steps.cpu-cores.outputs.count }} -skip_qor
282
318
283
319
284
320
Parmys :
@@ -292,18 +328,25 @@ jobs:
292
328
- uses : actions/checkout@v4
293
329
with :
294
330
submodules : ' true'
295
- - run : ./.github/scripts/install_dependencies.sh
331
+
332
+ - name : Get number of CPU cores
333
+ uses : SimenB/github-actions-cpu-cores@v2
334
+ id : cpu-cores
335
+
336
+ - name : Install dependencies
337
+ run : ./.github/scripts/install_dependencies.sh
296
338
297
339
-
uses :
hendrikmuhs/[email protected]
298
340
299
341
- name : Test
300
342
env :
301
343
CMAKE_PARAMS : ' -DVTR_IPO_BUILD=off'
302
344
BUILD_TYPE : debug
345
+ NUM_PROC : ${{ steps.cpu-cores.outputs.count }}
303
346
run : |
304
347
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
305
348
./.github/scripts/build.sh
306
- ./run_reg_test.py parmys_reg_basic -show_failures -j2
349
+ ./run_reg_test.py parmys_reg_basic -show_failures -j${{ steps.cpu-cores.outputs.count }}
307
350
308
351
309
352
ODINII :
@@ -317,19 +360,26 @@ jobs:
317
360
- uses : actions/checkout@v4
318
361
with :
319
362
submodules : ' true'
320
- - run : ./.github/scripts/install_dependencies.sh
363
+
364
+ - name : Get number of CPU cores
365
+ uses : SimenB/github-actions-cpu-cores@v2
366
+ id : cpu-cores
367
+
368
+ - name : Install dependencies
369
+ run : ./.github/scripts/install_dependencies.sh
321
370
322
371
-
uses :
hendrikmuhs/[email protected]
323
372
324
373
- name : Test
325
374
env :
326
375
CMAKE_PARAMS : ' -DVTR_ASSERT_LEVEL=3 -DVTR_ENABLE_SANITIZE=on -DVTR_IPO_BUILD=off -DWITH_BLIFEXPLORER=on -DWITH_PARMYS=OFF -DWITH_ODIN=on'
327
376
BUILD_TYPE : debug
377
+ NUM_PROC : ${{ steps.cpu-cores.outputs.count }}
328
378
run : |
329
379
sudo sysctl -w vm.mmap_rnd_bits=28
330
380
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
331
381
./.github/scripts/build.sh
332
- ./run_reg_test.py odin_reg_basic -show_failures -j2
382
+ ./run_reg_test.py odin_reg_basic -show_failures -j${{ steps.cpu-cores.outputs.count }}
333
383
334
384
335
385
VQM2BLIF :
@@ -343,13 +393,20 @@ jobs:
343
393
- uses : actions/checkout@v4
344
394
with :
345
395
submodules : ' true'
346
- - run : ./.github/scripts/install_dependencies.sh
396
+
397
+ - name : Get number of CPU cores
398
+ uses : SimenB/github-actions-cpu-cores@v2
399
+ id : cpu-cores
400
+
401
+ - name : Install dependencies
402
+ run : ./.github/scripts/install_dependencies.sh
347
403
348
404
-
uses :
hendrikmuhs/[email protected]
349
405
350
406
- name : Test
351
407
env :
352
408
BUILD_TYPE : release
409
+ NUM_PROC : ${{ steps.cpu-cores.outputs.count }}
353
410
run : |
354
411
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
355
412
./.github/scripts/build.sh
@@ -378,7 +435,13 @@ jobs:
378
435
- uses : actions/checkout@v4
379
436
with :
380
437
submodules : ' true'
381
- - run : ./.github/scripts/install_dependencies.sh
438
+
439
+ - name : Get number of CPU cores
440
+ uses : SimenB/github-actions-cpu-cores@v2
441
+ id : cpu-cores
442
+
443
+ - name : Install dependencies
444
+ run : ./.github/scripts/install_dependencies.sh
382
445
383
446
-
uses :
hendrikmuhs/[email protected]
384
447
@@ -387,6 +450,7 @@ jobs:
387
450
CMAKE_PARAMS : " -DVTR_ASSERT_LEVEL=3 -DWITH_BLIFEXPLORER=on -DWITH_ODIN=on"
388
451
MATRIX_EVAL : ${{ matrix.eval }}
389
452
BUILD_TYPE : release
453
+ NUM_PROC : ${{ steps.cpu-cores.outputs.count }}
390
454
run : |
391
455
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
392
456
./.github/scripts/build.sh
@@ -413,13 +477,20 @@ jobs:
413
477
- uses : actions/checkout@v4
414
478
with :
415
479
submodules : ' true'
416
- - run : ./.github/scripts/install_dependencies.sh
480
+
481
+ - name : Get number of CPU cores
482
+ uses : SimenB/github-actions-cpu-cores@v2
483
+ id : cpu-cores
484
+
485
+ - name : Install dependencies
486
+ run : ./.github/scripts/install_dependencies.sh
417
487
418
488
-
uses :
hendrikmuhs/[email protected]
419
489
420
490
- name : Test
421
491
env :
422
492
CMAKE_PARAMS : ' -DVTR_ASSERT_LEVEL=3 -DWITH_BLIFEXPLORER=on'
493
+ NUM_PROC : ${{ steps.cpu-cores.outputs.count }}
423
494
_COVERITY_URL : ' https://scan.coverity.com/download/linux64'
424
495
_COVERITY_MD5 : ' d0d7d7df9d6609e578f85096a755fb8f'
425
496
run : |
0 commit comments