Skip to content

Commit 524f85f

Browse files
authored
Revert "Revert "feat: Sync from noir" (#11813)"
This reverts commit 857ea22.
1 parent 857ea22 commit 524f85f

File tree

47 files changed

+1327
-1157
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+1327
-1157
lines changed

.noir-sync-commit

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
130d99125a09110a3ee3e877d88d83b5aa37f369
1+
819a53a7db921f40febc0e480539df3bfaf917a2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Download Nargo
2+
description: Downloads the nargo binary from an artifact and adds it to the path
3+
4+
runs:
5+
using: composite
6+
steps:
7+
- name: Download nargo binary
8+
uses: actions/download-artifact@v4
9+
with:
10+
name: nargo
11+
path: ./nargo
12+
13+
- name: Set nargo on PATH
14+
shell: bash
15+
run: |
16+
nargo_binary="${{ github.workspace }}/nargo/nargo"
17+
chmod +x $nargo_binary
18+
echo "$(dirname $nargo_binary)" >> $GITHUB_PATH

noir/noir-repo/.github/critical_libraries_status/noir-lang/sha256/.failures.jsonl

Whitespace-only changes.

noir/noir-repo/.github/scripts/merge-bench-reports.sh

-27
This file was deleted.

noir/noir-repo/.github/workflows/formatting.yml

+1-12
Original file line numberDiff line numberDiff line change
@@ -123,18 +123,7 @@ jobs:
123123
uses: actions/checkout@v4
124124

125125
- name: Download nargo binary
126-
uses: actions/download-artifact@v4
127-
with:
128-
name: nargo
129-
path: ./nargo
130-
131-
- name: Set nargo on PATH
132-
run: |
133-
nargo_binary="${{ github.workspace }}/nargo/nargo"
134-
chmod +x $nargo_binary
135-
echo "$(dirname $nargo_binary)" >> $GITHUB_PATH
136-
export PATH="$PATH:$(dirname $nargo_binary)"
137-
nargo -V
126+
uses: ./.github/actions/download-nargo
138127

139128
- name: Format stdlib
140129
working-directory: ./noir_stdlib

noir/noir-repo/.github/workflows/reports.yml

+30-106
Original file line numberDiff line numberDiff line change
@@ -54,18 +54,7 @@ jobs:
5454
echo "$HOME/.bb/" >> $GITHUB_PATH
5555
5656
- 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
6958

7059
- name: Generate gates report
7160
working-directory: ./test_programs
@@ -100,18 +89,7 @@ jobs:
10089
- uses: actions/checkout@v4
10190

10291
- 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
11593

11694
- name: Generate Brillig bytecode size report
11795
working-directory: ./test_programs
@@ -160,18 +138,7 @@ jobs:
160138
- uses: actions/checkout@v4
161139

162140
- 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
175142

176143
- name: Generate Brillig execution report
177144
working-directory: ./test_programs
@@ -220,18 +187,7 @@ jobs:
220187
- uses: actions/checkout@v4
221188

222189
- 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
235191

236192
- name: Generate Memory report
237193
working-directory: ./test_programs
@@ -272,18 +228,7 @@ jobs:
272228
- uses: actions/checkout@v4
273229

274230
- 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
287232

288233
- name: Generate Compilation report
289234
working-directory: ./test_programs
@@ -336,29 +281,19 @@ jobs:
336281

337282
name: External repo compilation and execution reports - ${{ matrix.project.repo }}/${{ matrix.project.path }}
338283
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-
353284
- uses: actions/checkout@v4
354285
with:
355286
path: scripts
356287
sparse-checkout: |
288+
.github/actions/download-nargo/action.yml
357289
test_programs/compilation_report.sh
358290
test_programs/execution_report.sh
359291
test_programs/parse_time.sh
360292
sparse-checkout-cone-mode: false
361293

294+
- name: Download nargo binary
295+
uses: ./scripts/.github/actions/download-nargo
296+
362297
- name: Checkout
363298
uses: actions/checkout@v4
364299
with:
@@ -451,27 +386,17 @@ jobs:
451386

452387
name: External repo memory report - ${{ matrix.project.repo }}/${{ matrix.project.path }}
453388
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-
468389
- uses: actions/checkout@v4
469390
with:
470391
path: scripts
471392
sparse-checkout: |
393+
.github/actions/download-nargo/action.yml
472394
test_programs/memory_report.sh
473395
test_programs/parse_memory.sh
474396
sparse-checkout-cone-mode: false
397+
398+
- name: Download nargo binary
399+
uses: ./scripts/.github/actions/download-nargo
475400

476401
- name: Checkout
477402
uses: actions/checkout@v4
@@ -552,21 +477,22 @@ jobs:
552477
uses: actions/download-artifact@v4
553478
with:
554479
name: in_progress_compilation_report
480+
path: ./reports
555481

556482
- name: Download matrix compilation reports
557483
uses: actions/download-artifact@v4
558484
with:
559485
pattern: compilation_report_*
560486
path: ./reports
487+
merge-multiple: true
561488

562489
- name: Merge compilation reports using jq
563490
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
567494
568495
- name: Store benchmark result
569-
continue-on-error: true
570496
uses: benchmark-action/github-action-benchmark@4de1bed97a47495fc4c5404952da0499e31f5c29
571497
with:
572498
name: "Compilation Time"
@@ -607,15 +533,15 @@ jobs:
607533
with:
608534
pattern: compilation_mem_report_*
609535
path: ./reports
536+
merge-multiple: true
610537

611538
- name: Merge memory reports using jq
612539
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
616543
617544
- name: Store benchmark result
618-
continue-on-error: true
619545
uses: benchmark-action/github-action-benchmark@4de1bed97a47495fc4c5404952da0499e31f5c29
620546
with:
621547
name: "Compilation Memory"
@@ -656,17 +582,15 @@ jobs:
656582
with:
657583
pattern: execution_mem_report_*
658584
path: ./reports
585+
merge-multiple: true
659586

660587
- name: Merge memory reports using jq
661588
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
667592
668593
- name: Store benchmark result
669-
continue-on-error: true
670594
uses: benchmark-action/github-action-benchmark@4de1bed97a47495fc4c5404952da0499e31f5c29
671595
with:
672596
name: "Execution Memory"
@@ -708,15 +632,15 @@ jobs:
708632
with:
709633
pattern: execution_report_*
710634
path: ./reports
635+
merge-multiple: true
711636

712637
- name: Merge execution reports using jq
713638
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
717642
718643
- name: Store benchmark result
719-
continue-on-error: true
720644
uses: benchmark-action/github-action-benchmark@4de1bed97a47495fc4c5404952da0499e31f5c29
721645
with:
722646
name: "Execution Time"

0 commit comments

Comments
 (0)