@@ -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
@@ -421,53 +421,9 @@ jobs:
421
421
retention-days : 3
422
422
overwrite : true
423
423
424
- upload_compilation_report :
425
- name : Upload compilation report
426
- needs : [generate_compilation_and_execution_report, external_repo_compilation_and_execution_report]
427
- # We want this job to run even if one variation of the matrix in `external_repo_compilation_and_execution_report` fails
428
- if : always()
429
- runs-on : ubuntu-latest
430
- permissions :
431
- pull-requests : write
432
-
433
- steps :
434
- - uses : actions/checkout@v4
435
-
436
- - name : Download initial compilation report
437
- uses : actions/download-artifact@v4
438
- with :
439
- name : in_progress_compilation_report
440
-
441
- - name : Download matrix compilation reports
442
- uses : actions/download-artifact@v4
443
- with :
444
- pattern : compilation_report_*
445
- path : ./reports
446
-
447
- - name : Merge compilation reports using jq
448
- run : |
449
- mv ./.github/scripts/merge-bench-reports.sh merge-bench-reports.sh
450
- ./merge-bench-reports.sh compilation_report
451
-
452
- - name : Parse compilation report
453
- id : compilation_report
454
- uses : noir-lang/noir-bench-report@6ba151d7795042c4ff51864fbeb13c0a6a79246c
455
- with :
456
- report : compilation_report.json
457
- header : |
458
- Compilation Report
459
- memory_report : false
460
-
461
- - name : Add memory report to sticky comment
462
- if : github.event_name == 'pull_request' || github.event_name == 'pull_request_target'
463
- uses : marocchino/sticky-pull-request-comment@v2
464
- with :
465
- header : compilation
466
- message : ${{ steps.compilation_report.outputs.markdown }}
467
-
468
424
external_repo_memory_report :
469
425
needs : [build-nargo]
470
- runs-on : ubuntu-latest
426
+ runs-on : ubuntu-22.04
471
427
timeout-minutes : 30
472
428
strategy :
473
429
fail-fast : false
@@ -508,6 +464,7 @@ jobs:
508
464
path : scripts
509
465
sparse-checkout : |
510
466
test_programs/memory_report.sh
467
+ test_programs/parse_memory.sh
511
468
sparse-checkout-cone-mode : false
512
469
513
470
- name : Checkout
@@ -521,6 +478,7 @@ jobs:
521
478
working-directory : ./test-repo/${{ matrix.project.path }}
522
479
run : |
523
480
mv /home/runner/work/noir/noir/scripts/test_programs/memory_report.sh ./memory_report.sh
481
+ mv /home/runner/work/noir/noir/scripts/test_programs/parse_memory.sh ./parse_memory.sh
524
482
./memory_report.sh 1
525
483
# Rename the memory report as the execution report is about to write to the same file
526
484
cp memory_report.json compilation_memory_report.json
@@ -568,14 +526,67 @@ jobs:
568
526
retention-days : 3
569
527
overwrite : true
570
528
529
+ upload_compilation_report :
530
+ name : Upload compilation report
531
+ needs : [generate_compilation_and_execution_report, external_repo_compilation_and_execution_report]
532
+ # We want this job to run even if one variation of the matrix in `external_repo_compilation_and_execution_report` fails
533
+ if : always()
534
+ runs-on : ubuntu-22.04
535
+ permissions :
536
+ pull-requests : write
537
+ # deployments permission to deploy GitHub pages website
538
+ deployments : write
539
+ # contents permission to update benchmark contents in gh-pages branch
540
+ contents : write
541
+
542
+ steps :
543
+ - uses : actions/checkout@v4
544
+
545
+ - name : Download initial compilation report
546
+ uses : actions/download-artifact@v4
547
+ with :
548
+ name : in_progress_compilation_report
549
+
550
+ - name : Download matrix compilation reports
551
+ uses : actions/download-artifact@v4
552
+ with :
553
+ pattern : compilation_report_*
554
+ path : ./reports
555
+
556
+ - name : Merge compilation reports using jq
557
+ run : |
558
+ mv ./.github/scripts/merge-bench-reports.sh merge-bench-reports.sh
559
+ ./merge-bench-reports.sh compilation_report
560
+ jq ".compilation_reports | map({name: .artifact_name, value: (.time[:-1] | tonumber), unit: \"s\"}) " ./compilation_report.json > time_bench.json
561
+
562
+ - name : Store benchmark result
563
+ continue-on-error : true
564
+ uses : benchmark-action/github-action-benchmark@4de1bed97a47495fc4c5404952da0499e31f5c29
565
+ with :
566
+ name : " Compilation Time"
567
+ tool : " customSmallerIsBetter"
568
+ output-file-path : ./time_bench.json
569
+ github-token : ${{ secrets.GITHUB_TOKEN }}
570
+ # We want this to only run on master to avoid garbage data from PRs being added.
571
+ auto-push : ${{ github.ref == 'refs/heads/master' }}
572
+ alert-threshold : " 120%"
573
+ comment-on-alert : true
574
+ fail-on-alert : false
575
+ alert-comment-cc-users : " @TomAFrench"
576
+ max-items-in-chart : 50
577
+
571
578
upload_compilation_memory_report :
572
579
name : Upload compilation memory report
573
580
needs : [generate_memory_report, external_repo_memory_report]
574
581
# We want this job to run even if one variation of the matrix in `external_repo_memory_report` fails
575
582
if : always()
576
- runs-on : ubuntu-latest
583
+ runs-on : ubuntu-22.04
577
584
permissions :
578
585
pull-requests : write
586
+ # deployments permission to deploy GitHub pages website
587
+ deployments : write
588
+ # contents permission to update benchmark contents in gh-pages branch
589
+ contents : write
579
590
580
591
steps :
581
592
- uses : actions/checkout@v4
@@ -595,33 +606,36 @@ jobs:
595
606
run : |
596
607
mv ./.github/scripts/merge-bench-reports.sh merge-bench-reports.sh
597
608
./merge-bench-reports.sh memory_report
598
- # Rename the memory report as to not clash with the compilation memory report file name
599
- cp memory_report.json execution_memory_report.json
600
-
601
- - name : Parse compilation memory report
602
- id : compilation_mem_report
603
- uses : noir-lang/noir-bench-report@6ba151d7795042c4ff51864fbeb13c0a6a79246c
604
- with :
605
- report : execution_memory_report.json
606
- header : |
607
- Compilation Memory Report
608
- memory_report : true
609
-
610
- - name : Add execution memory report to sticky comment
611
- if : github.event_name == 'pull_request' || github.event_name == 'pull_request_target'
612
- uses : marocchino/sticky-pull-request-comment@v2
613
- with :
614
- header : compilation_memory
615
- message : ${{ steps.compilation_mem_report.outputs.markdown }}
609
+ jq ".memory_reports | map({name: .artifact_name, value: (.peak_memory | tonumber), unit: \"MB\"}) " ./memory_report.json > memory_bench.json
610
+
611
+ - name : Store benchmark result
612
+ continue-on-error : true
613
+ uses : benchmark-action/github-action-benchmark@4de1bed97a47495fc4c5404952da0499e31f5c29
614
+ with :
615
+ name : " Compilation Memory"
616
+ tool : " customSmallerIsBetter"
617
+ output-file-path : ./memory_bench.json
618
+ github-token : ${{ secrets.GITHUB_TOKEN }}
619
+ # We want this to only run on master to avoid garbage data from PRs being added.
620
+ auto-push : ${{ github.ref == 'refs/heads/master' }}
621
+ alert-threshold : " 120%"
622
+ comment-on-alert : true
623
+ fail-on-alert : false
624
+ alert-comment-cc-users : " @TomAFrench"
625
+ max-items-in-chart : 50
616
626
617
627
upload_execution_memory_report :
618
628
name : Upload execution memory report
619
629
needs : [generate_memory_report, external_repo_memory_report]
620
630
# We want this job to run even if one variation of the matrix in `external_repo_memory_report` fails
621
631
if : always()
622
- runs-on : ubuntu-latest
632
+ runs-on : ubuntu-22.04
623
633
permissions :
624
634
pull-requests : write
635
+ # deployments permission to deploy GitHub pages website
636
+ deployments : write
637
+ # contents permission to update benchmark contents in gh-pages branch
638
+ contents : write
625
639
626
640
steps :
627
641
- uses : actions/checkout@v4
@@ -643,31 +657,37 @@ jobs:
643
657
./merge-bench-reports.sh memory_report
644
658
# Rename the memory report as to not clash with the compilation memory report file name
645
659
cp memory_report.json execution_memory_report.json
660
+ jq ".memory_reports | map({name: .artifact_name, value: (.peak_memory | tonumber), unit: \"MB\"}) " ./execution_memory_report.json > memory_bench.json
646
661
647
- - name : Parse execution memory report
648
- id : execution_mem_report
649
- uses : noir-lang/noir-bench-report@6ba151d7795042c4ff51864fbeb13c0a6a79246c
662
+ - name : Store benchmark result
663
+ continue-on-error : true
664
+ uses : benchmark-action/github-action-benchmark@4de1bed97a47495fc4c5404952da0499e31f5c29
650
665
with :
651
- report : execution_memory_report.json
652
- header : |
653
- Execution Memory Report
654
- memory_report : true
666
+ name : " Execution Memory"
667
+ tool : " customSmallerIsBetter"
668
+ output-file-path : ./memory_bench.json
669
+ github-token : ${{ secrets.GITHUB_TOKEN }}
670
+ # We want this to only run on master to avoid garbage data from PRs being added.
671
+ auto-push : ${{ github.ref == 'refs/heads/master' }}
672
+ alert-threshold : " 120%"
673
+ comment-on-alert : true
674
+ fail-on-alert : false
675
+ alert-comment-cc-users : " @TomAFrench"
676
+ max-items-in-chart : 50
655
677
656
- - name : Add execution memory report to sticky comment
657
- if : github.event_name == 'pull_request' || github.event_name == 'pull_request_target'
658
- uses : marocchino/sticky-pull-request-comment@v2
659
- with :
660
- header : execution_memory
661
- message : ${{ steps.execution_mem_report.outputs.markdown }}
662
678
663
679
upload_execution_report :
664
680
name : Upload execution report
665
681
needs : [generate_compilation_and_execution_report, external_repo_compilation_and_execution_report]
666
682
# We want this job to run even if one variation of the matrix in `external_repo_compilation_and_execution_report` fails
667
683
if : always()
668
- runs-on : ubuntu-latest
684
+ runs-on : ubuntu-22.04
669
685
permissions :
670
686
pull-requests : write
687
+ # deployments permission to deploy GitHub pages website
688
+ deployments : write
689
+ # contents permission to update benchmark contents in gh-pages branch
690
+ contents : write
671
691
672
692
steps :
673
693
- uses : actions/checkout@v4
@@ -687,20 +707,20 @@ jobs:
687
707
run : |
688
708
mv ./.github/scripts/merge-bench-reports.sh merge-bench-reports.sh
689
709
./merge-bench-reports.sh execution_report
690
-
691
- - name : Parse execution report
692
- id : execution_report
693
- uses : noir-lang/noir-bench-report@6ba151d7795042c4ff51864fbeb13c0a6a79246c
694
- with :
695
- report : execution_report.json
696
- header : |
697
- Execution Report
698
- execution_report : true
699
-
700
- - name : Add memory report to sticky comment
701
- if : github.event_name == 'pull_request' || github.event_name == 'pull_request_target'
702
- uses : marocchino/sticky-pull-request-comment@v2
703
- with :
704
- header : execution_time
705
- message : ${{ steps.execution_report.outputs.markdown }}
706
-
710
+ jq ".execution_reports | map({name: .artifact_name, value: (.time[:-1] | tonumber), unit: \"s\"}) " ./execution_report.json > time_bench.json
711
+
712
+ - name : Store benchmark result
713
+ continue-on-error : true
714
+ uses : benchmark-action/github-action-benchmark@4de1bed97a47495fc4c5404952da0499e31f5c29
715
+ with :
716
+ name : " Execution Time "
717
+ tool : " customSmallerIsBetter "
718
+ output-file-path : ./time_bench.json
719
+ github-token : ${{ secrets.GITHUB_TOKEN }}
720
+ # We want this to only run on master to avoid garbage data from PRs being added.
721
+ auto-push : ${{ github.ref == 'refs/heads/master' }}
722
+ alert-threshold : " 120% "
723
+ comment-on-alert : true
724
+ fail-on-alert : false
725
+ alert-comment-cc-users : " @TomAFrench "
726
+ max-items-in-chart : 50
0 commit comments