|
54 | 54 | echo "$HOME/.bb/" >> $GITHUB_PATH
|
55 | 55 |
|
56 | 56 | - name: Download nargo binary
|
57 |
| - uses: actions/download-artifact@v4 |
58 |
| - with: |
59 |
| - name: nargo |
60 |
| - path: ./nargo |
61 |
| - |
62 |
| - - name: Set nargo on PATH |
63 |
| - run: | |
64 |
| - nargo_binary="${{ github.workspace }}/nargo/nargo" |
65 |
| - chmod +x $nargo_binary |
66 |
| - echo "$(dirname $nargo_binary)" >> $GITHUB_PATH |
67 |
| - export PATH="$PATH:$(dirname $nargo_binary)" |
68 |
| - nargo -V |
| 57 | + uses: ./.github/actions/download-nargo |
69 | 58 |
|
70 | 59 | - name: Generate gates report
|
71 | 60 | working-directory: ./test_programs
|
@@ -100,18 +89,7 @@ jobs:
|
100 | 89 | - uses: actions/checkout@v4
|
101 | 90 |
|
102 | 91 | - name: Download nargo binary
|
103 |
| - uses: actions/download-artifact@v4 |
104 |
| - with: |
105 |
| - name: nargo |
106 |
| - path: ./nargo |
107 |
| - |
108 |
| - - name: Set nargo on PATH |
109 |
| - run: | |
110 |
| - nargo_binary="${{ github.workspace }}/nargo/nargo" |
111 |
| - chmod +x $nargo_binary |
112 |
| - echo "$(dirname $nargo_binary)" >> $GITHUB_PATH |
113 |
| - export PATH="$PATH:$(dirname $nargo_binary)" |
114 |
| - nargo -V |
| 92 | + uses: ./.github/actions/download-nargo |
115 | 93 |
|
116 | 94 | - name: Generate Brillig bytecode size report
|
117 | 95 | working-directory: ./test_programs
|
@@ -160,18 +138,7 @@ jobs:
|
160 | 138 | - uses: actions/checkout@v4
|
161 | 139 |
|
162 | 140 | - name: Download nargo binary
|
163 |
| - uses: actions/download-artifact@v4 |
164 |
| - with: |
165 |
| - name: nargo |
166 |
| - path: ./nargo |
167 |
| - |
168 |
| - - name: Set nargo on PATH |
169 |
| - run: | |
170 |
| - nargo_binary="${{ github.workspace }}/nargo/nargo" |
171 |
| - chmod +x $nargo_binary |
172 |
| - echo "$(dirname $nargo_binary)" >> $GITHUB_PATH |
173 |
| - export PATH="$PATH:$(dirname $nargo_binary)" |
174 |
| - nargo -V |
| 141 | + uses: ./.github/actions/download-nargo |
175 | 142 |
|
176 | 143 | - name: Generate Brillig execution report
|
177 | 144 | working-directory: ./test_programs
|
@@ -220,18 +187,7 @@ jobs:
|
220 | 187 | - uses: actions/checkout@v4
|
221 | 188 |
|
222 | 189 | - name: Download nargo binary
|
223 |
| - uses: actions/download-artifact@v4 |
224 |
| - with: |
225 |
| - name: nargo |
226 |
| - path: ./nargo |
227 |
| - |
228 |
| - - name: Set nargo on PATH |
229 |
| - run: | |
230 |
| - nargo_binary="${{ github.workspace }}/nargo/nargo" |
231 |
| - chmod +x $nargo_binary |
232 |
| - echo "$(dirname $nargo_binary)" >> $GITHUB_PATH |
233 |
| - export PATH="$PATH:$(dirname $nargo_binary)" |
234 |
| - nargo -V |
| 190 | + uses: ./.github/actions/download-nargo |
235 | 191 |
|
236 | 192 | - name: Generate Memory report
|
237 | 193 | working-directory: ./test_programs
|
@@ -272,18 +228,7 @@ jobs:
|
272 | 228 | - uses: actions/checkout@v4
|
273 | 229 |
|
274 | 230 | - name: Download nargo binary
|
275 |
| - uses: actions/download-artifact@v4 |
276 |
| - with: |
277 |
| - name: nargo |
278 |
| - path: ./nargo |
279 |
| - |
280 |
| - - name: Set nargo on PATH |
281 |
| - run: | |
282 |
| - nargo_binary="${{ github.workspace }}/nargo/nargo" |
283 |
| - chmod +x $nargo_binary |
284 |
| - echo "$(dirname $nargo_binary)" >> $GITHUB_PATH |
285 |
| - export PATH="$PATH:$(dirname $nargo_binary)" |
286 |
| - nargo -V |
| 231 | + uses: ./.github/actions/download-nargo |
287 | 232 |
|
288 | 233 | - name: Generate Compilation report
|
289 | 234 | working-directory: ./test_programs
|
@@ -336,29 +281,19 @@ jobs:
|
336 | 281 |
|
337 | 282 | name: External repo compilation and execution reports - ${{ matrix.project.repo }}/${{ matrix.project.path }}
|
338 | 283 | steps:
|
339 |
| - - name: Download nargo binary |
340 |
| - uses: actions/download-artifact@v4 |
341 |
| - with: |
342 |
| - name: nargo |
343 |
| - path: ./nargo |
344 |
| - |
345 |
| - - name: Set nargo on PATH |
346 |
| - run: | |
347 |
| - nargo_binary="${{ github.workspace }}/nargo/nargo" |
348 |
| - chmod +x $nargo_binary |
349 |
| - echo "$(dirname $nargo_binary)" >> $GITHUB_PATH |
350 |
| - export PATH="$PATH:$(dirname $nargo_binary)" |
351 |
| - nargo -V |
352 |
| -
|
353 | 284 | - uses: actions/checkout@v4
|
354 | 285 | with:
|
355 | 286 | path: scripts
|
356 | 287 | sparse-checkout: |
|
| 288 | + .github/actions/download-nargo/action.yml |
357 | 289 | test_programs/compilation_report.sh
|
358 | 290 | test_programs/execution_report.sh
|
359 | 291 | test_programs/parse_time.sh
|
360 | 292 | sparse-checkout-cone-mode: false
|
361 | 293 |
|
| 294 | + - name: Download nargo binary |
| 295 | + uses: ./scripts/.github/actions/download-nargo |
| 296 | + |
362 | 297 | - name: Checkout
|
363 | 298 | uses: actions/checkout@v4
|
364 | 299 | with:
|
@@ -451,27 +386,17 @@ jobs:
|
451 | 386 |
|
452 | 387 | name: External repo memory report - ${{ matrix.project.repo }}/${{ matrix.project.path }}
|
453 | 388 | steps:
|
454 |
| - - name: Download nargo binary |
455 |
| - uses: actions/download-artifact@v4 |
456 |
| - with: |
457 |
| - name: nargo |
458 |
| - path: ./nargo |
459 |
| - |
460 |
| - - name: Set nargo on PATH |
461 |
| - run: | |
462 |
| - nargo_binary="${{ github.workspace }}/nargo/nargo" |
463 |
| - chmod +x $nargo_binary |
464 |
| - echo "$(dirname $nargo_binary)" >> $GITHUB_PATH |
465 |
| - export PATH="$PATH:$(dirname $nargo_binary)" |
466 |
| - nargo -V |
467 |
| -
|
468 | 389 | - uses: actions/checkout@v4
|
469 | 390 | with:
|
470 | 391 | path: scripts
|
471 | 392 | sparse-checkout: |
|
| 393 | + .github/actions/download-nargo/action.yml |
472 | 394 | test_programs/memory_report.sh
|
473 | 395 | test_programs/parse_memory.sh
|
474 | 396 | sparse-checkout-cone-mode: false
|
| 397 | + |
| 398 | + - name: Download nargo binary |
| 399 | + uses: ./scripts/.github/actions/download-nargo |
475 | 400 |
|
476 | 401 | - name: Checkout
|
477 | 402 | uses: actions/checkout@v4
|
@@ -552,21 +477,22 @@ jobs:
|
552 | 477 | uses: actions/download-artifact@v4
|
553 | 478 | with:
|
554 | 479 | name: in_progress_compilation_report
|
| 480 | + path: ./reports |
555 | 481 |
|
556 | 482 | - name: Download matrix compilation reports
|
557 | 483 | uses: actions/download-artifact@v4
|
558 | 484 | with:
|
559 | 485 | pattern: compilation_report_*
|
560 | 486 | path: ./reports
|
| 487 | + merge-multiple: true |
561 | 488 |
|
562 | 489 | - name: Merge compilation reports using jq
|
563 | 490 | run: |
|
564 |
| - mv ./.github/scripts/merge-bench-reports.sh merge-bench-reports.sh |
565 |
| - ./merge-bench-reports.sh compilation_report |
566 |
| - jq ".compilation_reports | map({name: .artifact_name, value: (.time[:-1] | tonumber), unit: \"s\"}) " ./compilation_report.json > time_bench.json |
| 491 | + # Github actions seems to not expand "**" in globs by default. |
| 492 | + shopt -s globstar |
| 493 | + jq --slurp '. | flatten' ./reports/* | tee time_bench.json |
567 | 494 |
|
568 | 495 | - name: Store benchmark result
|
569 |
| - continue-on-error: true |
570 | 496 | uses: benchmark-action/github-action-benchmark@4de1bed97a47495fc4c5404952da0499e31f5c29
|
571 | 497 | with:
|
572 | 498 | name: "Compilation Time"
|
@@ -607,15 +533,15 @@ jobs:
|
607 | 533 | with:
|
608 | 534 | pattern: compilation_mem_report_*
|
609 | 535 | path: ./reports
|
| 536 | + merge-multiple: true |
610 | 537 |
|
611 | 538 | - name: Merge memory reports using jq
|
612 | 539 | run: |
|
613 |
| - mv ./.github/scripts/merge-bench-reports.sh merge-bench-reports.sh |
614 |
| - ./merge-bench-reports.sh memory_report |
615 |
| - jq ".memory_reports | map({name: .artifact_name, value: (.peak_memory | tonumber), unit: \"MB\"}) " ./memory_report.json > memory_bench.json |
| 540 | + # Github actions seems to not expand "**" in globs by default. |
| 541 | + shopt -s globstar |
| 542 | + jq --slurp '. | flatten' ./reports/* | tee memory_bench.json |
616 | 543 |
|
617 | 544 | - name: Store benchmark result
|
618 |
| - continue-on-error: true |
619 | 545 | uses: benchmark-action/github-action-benchmark@4de1bed97a47495fc4c5404952da0499e31f5c29
|
620 | 546 | with:
|
621 | 547 | name: "Compilation Memory"
|
@@ -656,17 +582,15 @@ jobs:
|
656 | 582 | with:
|
657 | 583 | pattern: execution_mem_report_*
|
658 | 584 | path: ./reports
|
| 585 | + merge-multiple: true |
659 | 586 |
|
660 | 587 | - name: Merge memory reports using jq
|
661 | 588 | run: |
|
662 |
| - mv ./.github/scripts/merge-bench-reports.sh merge-bench-reports.sh |
663 |
| - ./merge-bench-reports.sh memory_report |
664 |
| - # Rename the memory report as to not clash with the compilation memory report file name |
665 |
| - cp memory_report.json execution_memory_report.json |
666 |
| - jq ".memory_reports | map({name: .artifact_name, value: (.peak_memory | tonumber), unit: \"MB\"}) " ./execution_memory_report.json > memory_bench.json |
| 589 | + # Github actions seems to not expand "**" in globs by default. |
| 590 | + shopt -s globstar |
| 591 | + jq --slurp '. | flatten' ./reports/* | tee memory_bench.json |
667 | 592 |
|
668 | 593 | - name: Store benchmark result
|
669 |
| - continue-on-error: true |
670 | 594 | uses: benchmark-action/github-action-benchmark@4de1bed97a47495fc4c5404952da0499e31f5c29
|
671 | 595 | with:
|
672 | 596 | name: "Execution Memory"
|
@@ -708,15 +632,15 @@ jobs:
|
708 | 632 | with:
|
709 | 633 | pattern: execution_report_*
|
710 | 634 | path: ./reports
|
| 635 | + merge-multiple: true |
711 | 636 |
|
712 | 637 | - name: Merge execution reports using jq
|
713 | 638 | run: |
|
714 |
| - mv ./.github/scripts/merge-bench-reports.sh merge-bench-reports.sh |
715 |
| - ./merge-bench-reports.sh execution_report |
716 |
| - jq ".execution_reports | map({name: .artifact_name, value: (.time[:-1] | tonumber), unit: \"s\"}) " ./execution_report.json > time_bench.json |
| 639 | + # Github actions seems to not expand "**" in globs by default. |
| 640 | + shopt -s globstar |
| 641 | + jq --slurp '. | flatten' ./reports/* | tee time_bench.json |
717 | 642 |
|
718 | 643 | - name: Store benchmark result
|
719 |
| - continue-on-error: true |
720 | 644 | uses: benchmark-action/github-action-benchmark@4de1bed97a47495fc4c5404952da0499e31f5c29
|
721 | 645 | with:
|
722 | 646 | name: "Execution Time"
|
|
0 commit comments