@@ -282,9 +282,9 @@ jobs:
282
282
strategy :
283
283
fail-fast : false
284
284
matrix :
285
- project : ${{ fromJson( needs.benchmark-projects-list.outputs.projects )}}
285
+ include : ${{ fromJson( needs.benchmark-projects-list.outputs.projects )}}
286
286
287
- name : External repo compilation and execution reports - ${{ matrix.project. repo }}/${{ matrix.project .path }}
287
+ name : External repo compilation and execution reports - ${{ matrix.repo }}/${{ matrix.path }}
288
288
steps :
289
289
- uses : actions/checkout@v4
290
290
with :
@@ -302,32 +302,77 @@ jobs:
302
302
- name : Checkout
303
303
uses : actions/checkout@v4
304
304
with :
305
- repository : ${{ matrix.project. repo }}
305
+ repository : ${{ matrix.repo }}
306
306
path : test-repo
307
- ref : ${{ matrix.project. ref }}
307
+ ref : ${{ matrix.ref }}
308
308
309
309
- name : Fetch noir dependencies
310
- working-directory : ./test-repo/${{ matrix.project. path }}
310
+ working-directory : ./test-repo/${{ matrix.path }}
311
311
run : |
312
312
# We run `nargo check` to pre-fetch any dependencies so we don't measure the time to download these
313
313
# when benchmarking.
314
314
nargo check
315
315
316
316
- name : Generate compilation report
317
- working-directory : ./test-repo/${{ matrix.project.path }}
317
+ id : compilation_report
318
+ working-directory : ./test-repo/${{ matrix.path }}
318
319
run : |
319
320
mv /home/runner/work/noir/noir/scripts/test_programs/compilation_report.sh ./compilation_report.sh
320
321
touch parse_time.sh
321
322
chmod +x parse_time.sh
322
323
cp /home/runner/work/noir/noir/scripts/test_programs/parse_time.sh ./parse_time.sh
323
- ./compilation_report.sh 1 ${{ matrix.project.num_runs }}
324
+ ./compilation_report.sh 1 ${{ matrix.num_runs }}
325
+
326
+ PACKAGE_NAME=${{ matrix.path }}
327
+ PACKAGE_NAME=$(basename $PACKAGE_NAME)
328
+ REPORT_NAME=compilation_report_$PACKAGE_NAME.json
329
+ REPORT_PATH=$(pwd)/$REPORT_NAME
330
+ mv ./compilation_report.json $REPORT_PATH
331
+
332
+ echo "report_name=$REPORT_NAME" >> $GITHUB_OUTPUT
333
+ echo "report_path=$REPORT_PATH" >> $GITHUB_OUTPUT
324
334
env :
325
- FLAGS : ${{ matrix.project.flags }}
335
+ FLAGS : ${{ matrix.flags }}
336
+
337
+ - name : Upload compilation report
338
+ uses : actions/upload-artifact@v4
339
+ with :
340
+ name : ${{ steps.compilation_report.outputs.report_name }}
341
+ path : ${{ steps.compilation_report.outputs.report_path }}
342
+ retention-days : 3
343
+ overwrite : true
326
344
345
+ - name : Generate execution report
346
+ id : execution_report
347
+ working-directory : ./test-repo/${{ matrix.path }}
348
+ if : ${{ !matrix.cannot_execute }}
349
+ run : |
350
+ mv /home/runner/work/noir/noir/scripts/test_programs/execution_report.sh ./execution_report.sh
351
+ mv /home/runner/work/noir/noir/scripts/test_programs/parse_time.sh ./parse_time.sh
352
+ ./execution_report.sh 1 ${{ matrix.num_runs }}
353
+
354
+ PACKAGE_NAME=${{ matrix.path }}
355
+ PACKAGE_NAME=$(basename $PACKAGE_NAME)
356
+ REPORT_NAME=execution_report_$PACKAGE_NAME.json
357
+ REPORT_PATH=$(pwd)/$REPORT_NAME
358
+ mv ./execution_report.json $REPORT_PATH
359
+
360
+ echo "report_name=$REPORT_NAME" >> $GITHUB_OUTPUT
361
+ echo "report_path=$REPORT_PATH" >> $GITHUB_OUTPUT
362
+
363
+ - name : Upload execution report
364
+ if : ${{ !matrix.cannot_execute }}
365
+ uses : actions/upload-artifact@v4
366
+ with :
367
+ name : ${{ steps.execution_report.outputs.report_name }}
368
+ path : ${{ steps.execution_report.outputs.report_path }}
369
+ retention-days : 3
370
+ overwrite : true
371
+
327
372
- name : Check compilation time limit
328
373
run : |
329
- TIME=$(jq '.[0].value' ./test-repo/ ${{ matrix.project.path }}/compilation_report.json )
330
- TIME_LIMIT=${{ matrix.project. compilation-timeout }}
374
+ TIME=$(jq '.[0].value' ${{ steps.compilation_report.outputs.report_path }})
375
+ TIME_LIMIT=${{ matrix.compilation-timeout }}
331
376
if awk 'BEGIN{exit !(ARGV[1]>ARGV[2])}' "$TIME" "$TIME_LIMIT"; then
332
377
# Don't bump this timeout without understanding why this has happened and confirming that you're not the cause.
333
378
echo "Failing due to compilation exceeding timeout..."
@@ -336,19 +381,11 @@ jobs:
336
381
exit 1
337
382
fi
338
383
339
- - name : Generate execution report
340
- working-directory : ./test-repo/${{ matrix.project.path }}
341
- if : ${{ !matrix.project.cannot_execute }}
342
- run : |
343
- mv /home/runner/work/noir/noir/scripts/test_programs/execution_report.sh ./execution_report.sh
344
- mv /home/runner/work/noir/noir/scripts/test_programs/parse_time.sh ./parse_time.sh
345
- ./execution_report.sh 1 ${{ matrix.project.num_runs }}
346
-
347
384
- name : Check execution time limit
348
- if : ${{ !matrix.project. cannot_execute }}
385
+ if : ${{ !matrix.cannot_execute }}
349
386
run : |
350
- TIME=$(jq '.[0].value' ./test-repo/ ${{ matrix.project.path }}/execution_report.json )
351
- TIME_LIMIT=${{ matrix.project. execution-timeout }}
387
+ TIME=$(jq '.[0].value' ${{ steps.execution_report.outputs.report_path }})
388
+ TIME_LIMIT=${{ matrix.execution-timeout }}
352
389
if awk 'BEGIN{exit !(ARGV[1]>ARGV[2])}' "$TIME" "$TIME_LIMIT"; then
353
390
# Don't bump this timeout without understanding why this has happened and confirming that you're not the cause.
354
391
echo "Failing due to execution exceeding timeout..."
@@ -357,41 +394,6 @@ jobs:
357
394
exit 1
358
395
fi
359
396
360
- - name : Move compilation report
361
- id : compilation_report
362
- shell : bash
363
- run : |
364
- PACKAGE_NAME=${{ matrix.project.path }}
365
- PACKAGE_NAME=$(basename $PACKAGE_NAME)
366
- mv ./test-repo/${{ matrix.project.path }}/compilation_report.json ./compilation_report_$PACKAGE_NAME.json
367
- echo "compilation_report_name=$PACKAGE_NAME" >> $GITHUB_OUTPUT
368
-
369
- - name : Move execution report
370
- id : execution_report
371
- shell : bash
372
- if : ${{ !matrix.project.cannot_execute }}
373
- run : |
374
- PACKAGE_NAME=${{ matrix.project.path }}
375
- PACKAGE_NAME=$(basename $PACKAGE_NAME)
376
- mv ./test-repo/${{ matrix.project.path }}/execution_report.json ./execution_report_$PACKAGE_NAME.json
377
- echo "execution_report_name=$PACKAGE_NAME" >> $GITHUB_OUTPUT
378
-
379
- - name : Upload compilation report
380
- uses : actions/upload-artifact@v4
381
- with :
382
- name : compilation_report_${{ steps.compilation_report.outputs.compilation_report_name }}
383
- path : compilation_report_${{ steps.compilation_report.outputs.compilation_report_name }}.json
384
- retention-days : 3
385
- overwrite : true
386
-
387
- - name : Upload execution report
388
- uses : actions/upload-artifact@v4
389
- with :
390
- name : execution_report_${{ steps.execution_report.outputs.execution_report_name }}
391
- path : execution_report_${{ steps.execution_report.outputs.execution_report_name }}.json
392
- retention-days : 3
393
- overwrite : true
394
-
395
397
external_repo_memory_report :
396
398
needs : [build-nargo, benchmark-projects-list]
397
399
runs-on : ubuntu-22.04
@@ -423,19 +425,61 @@ jobs:
423
425
ref : ${{ matrix.ref }}
424
426
425
427
- name : Generate compilation memory report
428
+ id : compilation_report
426
429
working-directory : ./test-repo/${{ matrix.path }}
427
430
run : |
428
431
mv /home/runner/work/noir/noir/scripts/test_programs/memory_report.sh ./memory_report.sh
429
432
mv /home/runner/work/noir/noir/scripts/test_programs/parse_memory.sh ./parse_memory.sh
430
433
./memory_report.sh 1
434
+
431
435
# Rename the memory report as the execution report is about to write to the same file
432
- cp memory_report.json compilation_memory_report.json
436
+ PACKAGE_NAME=${{ matrix.path }}
437
+ PACKAGE_NAME=$(basename $PACKAGE_NAME)
438
+ REPORT_NAME=compilation_mem_report_$PACKAGE_NAME.json
439
+ REPORT_PATH=$(pwd)/$REPORT_NAME
440
+ mv ./memory_report.json $REPORT_PATH
441
+
442
+ echo "report_name=$REPORT_NAME" >> $GITHUB_OUTPUT
443
+ echo "report_path=$REPORT_PATH" >> $GITHUB_OUTPUT
433
444
env :
434
445
FLAGS : ${{ matrix.flags }}
435
446
447
+ - name : Upload compilation memory report
448
+ uses : actions/upload-artifact@v4
449
+ with :
450
+ name : ${{ steps.compilation_report.outputs.report_name }}
451
+ path : ${{ steps.compilation_report.outputs.report_path }}
452
+ retention-days : 3
453
+ overwrite : true
454
+
455
+ - name : Generate execution memory report
456
+ id : execution_report
457
+ working-directory : ./test-repo/${{ matrix.path }}
458
+ if : ${{ !matrix.cannot_execute }}
459
+ run : |
460
+ ./memory_report.sh 1 1
461
+
462
+ PACKAGE_NAME=${{ matrix.path }}
463
+ PACKAGE_NAME=$(basename $PACKAGE_NAME)
464
+ REPORT_NAME=execution_mem_report_$PACKAGE_NAME.json
465
+ REPORT_PATH=$(pwd)/$REPORT_NAME
466
+ mv ./memory_report.json $REPORT_PATH
467
+
468
+ echo "report_name=$REPORT_NAME" >> $GITHUB_OUTPUT
469
+ echo "report_path=$REPORT_PATH" >> $GITHUB_OUTPUT
470
+
471
+ - name : Upload execution memory report
472
+ if : ${{ !matrix.cannot_execute }}
473
+ uses : actions/upload-artifact@v4
474
+ with :
475
+ name : ${{ steps.execution_report.outputs.report_name }}
476
+ path : ${{ steps.execution_report.outputs.report_path }}
477
+ retention-days : 3
478
+ overwrite : true
479
+
436
480
- name : Check compilation memory limit
437
481
run : |
438
- MEMORY=$(jq '.[0].value' ./test-repo/ ${{ matrix.path }}/compilation_memory_report.json )
482
+ MEMORY=$(jq '.[0].value' ${{ steps.compilation_report.outputs.report_path }})
439
483
MEMORY_LIMIT=${{ matrix.compilation-memory-limit }}
440
484
if awk 'BEGIN{exit !(ARGV[1]>ARGV[2])}' "$MEMORY" "$MEMORY_LIMIT"; then
441
485
# Don't bump this limit without understanding why this has happened and confirming that you're not the cause.
@@ -445,16 +489,10 @@ jobs:
445
489
exit 1
446
490
fi
447
491
448
- - name : Generate execution memory report
449
- working-directory : ./test-repo/${{ matrix.path }}
450
- if : ${{ !matrix.cannot_execute }}
451
- run : |
452
- ./memory_report.sh 1 1
453
-
454
492
- name : Check execution memory limit
455
493
if : ${{ !matrix.cannot_execute }}
456
494
run : |
457
- MEMORY=$(jq '.[0].value' ./test-repo/ ${{ matrix.path }}/memory_report.json )
495
+ MEMORY=$(jq '.[0].value' ${{ steps.execution_report.outputs.report_path }})
458
496
MEMORY_LIMIT=${{ matrix.execution-memory-limit }}
459
497
if awk 'BEGIN{exit !(ARGV[1]>ARGV[2])}' "$MEMORY" "$MEMORY_LIMIT"; then
460
498
# Don't bump this limit without understanding why this has happened and confirming that you're not the cause.
@@ -464,40 +502,6 @@ jobs:
464
502
exit 1
465
503
fi
466
504
467
- - name : Move compilation report
468
- id : compilation_mem_report
469
- shell : bash
470
- run : |
471
- PACKAGE_NAME=${{ matrix.path }}
472
- PACKAGE_NAME=$(basename $PACKAGE_NAME)
473
- mv ./test-repo/${{ matrix.path }}/compilation_memory_report.json ./memory_report_$PACKAGE_NAME.json
474
- echo "memory_report_name=$PACKAGE_NAME" >> $GITHUB_OUTPUT
475
-
476
- - name : Upload compilation memory report
477
- uses : actions/upload-artifact@v4
478
- with :
479
- name : compilation_mem_report_${{ steps.compilation_mem_report.outputs.memory_report_name }}
480
- path : memory_report_${{ steps.compilation_mem_report.outputs.memory_report_name }}.json
481
- retention-days : 3
482
- overwrite : true
483
-
484
- - name : Move execution report
485
- id : execution_mem_report
486
- if : ${{ !matrix.cannot_execute }}
487
- run : |
488
- PACKAGE_NAME=${{ matrix.path }}
489
- PACKAGE_NAME=$(basename $PACKAGE_NAME)
490
- mv ./test-repo/${{ matrix.path }}/memory_report.json ./memory_report_$PACKAGE_NAME.json
491
- echo "memory_report_name=$PACKAGE_NAME" >> $GITHUB_OUTPUT
492
-
493
- - name : Upload execution memory report
494
- uses : actions/upload-artifact@v4
495
- with :
496
- name : execution_mem_report_${{ steps.execution_mem_report.outputs.memory_report_name }}
497
- path : memory_report_${{ steps.execution_mem_report.outputs.memory_report_name }}.json
498
- retention-days : 3
499
- overwrite : true
500
-
501
505
upload_compilation_report :
502
506
name : Upload compilation report
503
507
needs : [generate_compilation_and_execution_report, external_repo_compilation_and_execution_report]
0 commit comments