@@ -315,7 +315,7 @@ jobs:
315
315
316
316
external_repo_compilation_and_execution_report :
317
317
needs : [build-nargo]
318
- runs-on : ubuntu-latest
318
+ runs-on : ubuntu-22.04
319
319
timeout-minutes : 15
320
320
strategy :
321
321
fail-fast : false
@@ -425,9 +425,13 @@ jobs:
425
425
needs : [generate_compilation_and_execution_report, external_repo_compilation_and_execution_report]
426
426
# We want this job to run even if one variation of the matrix in `external_repo_compilation_and_execution_report` fails
427
427
if : always()
428
- runs-on : ubuntu-latest
428
+ runs-on : ubuntu-22.04
429
429
permissions :
430
430
pull-requests : write
431
+ # deployments permission to deploy GitHub pages website
432
+ deployments : write
433
+ # contents permission to update benchmark contents in gh-pages branch
434
+ contents : write
431
435
432
436
steps :
433
437
- uses : actions/checkout@v4
@@ -464,9 +468,29 @@ jobs:
464
468
header : compilation
465
469
message : ${{ steps.compilation_report.outputs.markdown }}
466
470
471
+ - name : Convert to `benchmark-action` format
472
+ run : |
473
+ jq ".compilation_reports | map({name: .artifact_name, value: (.time[:-1] | tonumber), unit: \"s\"}) " ./compilation_report.json > time_bench.json
474
+
475
+ - name : Store benchmark result
476
+ continue-on-error : true
477
+ uses : benchmark-action/github-action-benchmark@4de1bed97a47495fc4c5404952da0499e31f5c29
478
+ with :
479
+ name : " Compilation Time"
480
+ tool : " customSmallerIsBetter"
481
+ output-file-path : ./time_bench.json
482
+ github-token : ${{ secrets.GITHUB_TOKEN }}
483
+ # We want this to only run on master to avoid garbage data from PRs being added.
484
+ auto-push : ${{ github.ref == 'refs/heads/master' }}
485
+ alert-threshold : " 110%"
486
+ comment-on-alert : true
487
+ fail-on-alert : false
488
+ alert-comment-cc-users : " @TomAFrench"
489
+ max-items-in-chart : 50
490
+
467
491
external_repo_memory_report :
468
492
needs : [build-nargo]
469
- runs-on : ubuntu-latest
493
+ runs-on : ubuntu-22.04
470
494
timeout-minutes : 30
471
495
strategy :
472
496
fail-fast : false
@@ -507,6 +531,7 @@ jobs:
507
531
path : scripts
508
532
sparse-checkout : |
509
533
test_programs/memory_report.sh
534
+ test_programs/parse_memory.sh
510
535
sparse-checkout-cone-mode : false
511
536
512
537
- name : Checkout
@@ -520,6 +545,7 @@ jobs:
520
545
working-directory : ./test-repo/${{ matrix.project.path }}
521
546
run : |
522
547
mv /home/runner/work/noir/noir/scripts/test_programs/memory_report.sh ./memory_report.sh
548
+ mv /home/runner/work/noir/noir/scripts/test_programs/parse_memory.sh ./parse_memory.sh
523
549
./memory_report.sh 1
524
550
# Rename the memory report as the execution report is about to write to the same file
525
551
cp memory_report.json compilation_memory_report.json
@@ -572,9 +598,13 @@ jobs:
572
598
needs : [generate_memory_report, external_repo_memory_report]
573
599
# We want this job to run even if one variation of the matrix in `external_repo_memory_report` fails
574
600
if : always()
575
- runs-on : ubuntu-latest
601
+ runs-on : ubuntu-22.04
576
602
permissions :
577
603
pull-requests : write
604
+ # deployments permission to deploy GitHub pages website
605
+ deployments : write
606
+ # contents permission to update benchmark contents in gh-pages branch
607
+ contents : write
578
608
579
609
steps :
580
610
- uses : actions/checkout@v4
@@ -611,14 +641,38 @@ jobs:
611
641
header : compilation_memory
612
642
message : ${{ steps.compilation_mem_report.outputs.markdown }}
613
643
644
+ - name : Convert to `benchmark-action` format
645
+ run : |
646
+ jq ".memory_reports | map({name: .artifact_name, value: (.peak_memory | tonumber), unit: \"MB\"}) " ./memory_report.json > memory_bench.json
647
+
648
+ - name : Store benchmark result
649
+ continue-on-error : true
650
+ uses : benchmark-action/github-action-benchmark@4de1bed97a47495fc4c5404952da0499e31f5c29
651
+ with :
652
+ name : " Compilation Memory"
653
+ tool : " customSmallerIsBetter"
654
+ output-file-path : ./memory_bench.json
655
+ github-token : ${{ secrets.GITHUB_TOKEN }}
656
+ # We want this to only run on master to avoid garbage data from PRs being added.
657
+ auto-push : ${{ github.ref == 'refs/heads/master' }}
658
+ alert-threshold : " 110%"
659
+ comment-on-alert : true
660
+ fail-on-alert : false
661
+ alert-comment-cc-users : " @TomAFrench"
662
+ max-items-in-chart : 50
663
+
614
664
upload_execution_memory_report :
615
665
name : Upload execution memory report
616
666
needs : [generate_memory_report, external_repo_memory_report]
617
667
# We want this job to run even if one variation of the matrix in `external_repo_memory_report` fails
618
668
if : always()
619
- runs-on : ubuntu-latest
669
+ runs-on : ubuntu-22.04
620
670
permissions :
621
671
pull-requests : write
672
+ # deployments permission to deploy GitHub pages website
673
+ deployments : write
674
+ # contents permission to update benchmark contents in gh-pages branch
675
+ contents : write
622
676
623
677
steps :
624
678
- uses : actions/checkout@v4
@@ -657,14 +711,39 @@ jobs:
657
711
header : execution_memory
658
712
message : ${{ steps.execution_mem_report.outputs.markdown }}
659
713
714
+ - name : Convert to `benchmark-action` format
715
+ run : |
716
+ jq ".memory_reports | map({name: .artifact_name, value: (.peak_memory | tonumber), unit: \"MB\"}) " ./execution_memory_report.json > memory_bench.json
717
+
718
+ - name : Store benchmark result
719
+ continue-on-error : true
720
+ uses : benchmark-action/github-action-benchmark@4de1bed97a47495fc4c5404952da0499e31f5c29
721
+ with :
722
+ name : " Execution Memory"
723
+ tool : " customSmallerIsBetter"
724
+ output-file-path : ./memory_bench.json
725
+ github-token : ${{ secrets.GITHUB_TOKEN }}
726
+ # We want this to only run on master to avoid garbage data from PRs being added.
727
+ auto-push : ${{ github.ref == 'refs/heads/master' }}
728
+ alert-threshold : " 110%"
729
+ comment-on-alert : true
730
+ fail-on-alert : false
731
+ alert-comment-cc-users : " @TomAFrench"
732
+ max-items-in-chart : 50
733
+
734
+
660
735
upload_execution_report :
661
736
name : Upload execution report
662
737
needs : [generate_compilation_and_execution_report, external_repo_compilation_and_execution_report]
663
738
# We want this job to run even if one variation of the matrix in `external_repo_compilation_and_execution_report` fails
664
739
if : always()
665
- runs-on : ubuntu-latest
740
+ runs-on : ubuntu-22.04
666
741
permissions :
667
742
pull-requests : write
743
+ # deployments permission to deploy GitHub pages website
744
+ deployments : write
745
+ # contents permission to update benchmark contents in gh-pages branch
746
+ contents : write
668
747
669
748
steps :
670
749
- uses : actions/checkout@v4
@@ -701,3 +780,22 @@ jobs:
701
780
header : execution_time
702
781
message : ${{ steps.execution_report.outputs.markdown }}
703
782
783
+ - name : Convert to `benchmark-action` format
784
+ run : |
785
+ jq ".execution_reports | map({name: .artifact_name, value: (.time[:-1] | tonumber), unit: \"s\"}) " ./execution_report.json > time_bench.json
786
+
787
+ - name : Store benchmark result
788
+ continue-on-error : true
789
+ uses : benchmark-action/github-action-benchmark@4de1bed97a47495fc4c5404952da0499e31f5c29
790
+ with :
791
+ name : " Execution Time"
792
+ tool : " customSmallerIsBetter"
793
+ output-file-path : ./time_bench.json
794
+ github-token : ${{ secrets.GITHUB_TOKEN }}
795
+ # We want this to only run on master to avoid garbage data from PRs being added.
796
+ auto-push : ${{ github.ref == 'refs/heads/master' }}
797
+ alert-threshold : " 110%"
798
+ comment-on-alert : true
799
+ fail-on-alert : false
800
+ alert-comment-cc-users : " @TomAFrench"
801
+ max-items-in-chart : 50
0 commit comments