-
Notifications
You must be signed in to change notification settings - Fork 212
281 lines (236 loc) · 8.66 KB
/
reports.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
name: Reports
on:
push:
branches:
- master
pull_request:
jobs:
build-nargo:
runs-on: ubuntu-22.04
steps:
- name: Checkout Noir repo
uses: actions/checkout@v4
- name: Setup toolchain
uses: dtolnay/[email protected]
- uses: Swatinem/rust-cache@v2
with:
key: x86_64-unknown-linux-gnu
cache-on-failure: true
save-if: ${{ github.event_name != 'merge_group' }}
- name: Build Nargo
run: cargo build --package nargo_cli --release
- name: Package artifacts
run: |
mkdir dist
cp ./target/release/nargo ./dist/nargo
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: nargo
path: ./dist/*
retention-days: 3
compare_gates_reports:
name: Circuit sizes
needs: [build-nargo]
runs-on: ubuntu-22.04
permissions:
pull-requests: write
steps:
- uses: actions/checkout@v4
- name: Install `bb`
run: |
./scripts/install_bb.sh
echo "$HOME/.bb/" >> $GITHUB_PATH
- name: Download nargo binary
uses: actions/download-artifact@v4
with:
name: nargo
path: ./nargo
- name: Set nargo on PATH
run: |
nargo_binary="${{ github.workspace }}/nargo/nargo"
chmod +x $nargo_binary
echo "$(dirname $nargo_binary)" >> $GITHUB_PATH
export PATH="$PATH:$(dirname $nargo_binary)"
nargo -V
- name: Generate gates report
working-directory: ./test_programs
run: |
./rebuild.sh
./gates_report.sh
mv gates_report.json ../gates_report.json
- name: Compare gates reports
id: gates_diff
uses: noir-lang/noir-gates-diff@1931aaaa848a1a009363d6115293f7b7fc72bb87
with:
report: gates_report.json
summaryQuantile: 0.9 # only display the 10% most significant circuit size diffs in the summary (defaults to 20%)
- name: Add gates diff to sticky comment
if: github.event_name == 'pull_request' || github.event_name == 'pull_request_target'
uses: marocchino/sticky-pull-request-comment@v2
with:
# delete the comment in case changes no longer impact circuit sizes
delete: ${{ !steps.gates_diff.outputs.markdown }}
message: ${{ steps.gates_diff.outputs.markdown }}
compare_brillig_bytecode_size_reports:
name: Brillig bytecode sizes
needs: [build-nargo]
runs-on: ubuntu-22.04
permissions:
pull-requests: write
steps:
- uses: actions/checkout@v4
- name: Download nargo binary
uses: actions/download-artifact@v4
with:
name: nargo
path: ./nargo
- name: Set nargo on PATH
run: |
nargo_binary="${{ github.workspace }}/nargo/nargo"
chmod +x $nargo_binary
echo "$(dirname $nargo_binary)" >> $GITHUB_PATH
export PATH="$PATH:$(dirname $nargo_binary)"
nargo -V
- name: Generate Brillig bytecode size report
working-directory: ./test_programs
run: |
./gates_report_brillig.sh
mv gates_report_brillig.json ../gates_report_brillig.json
- name: Compare Brillig bytecode size reports
id: brillig_bytecode_diff
uses: noir-lang/noir-gates-diff@d88f7523b013b9edd3f31c5cfddaef87a3fe1b48
with:
report: gates_report_brillig.json
header: |
# Changes to Brillig bytecode sizes
brillig_report: true
summaryQuantile: 0.9 # only display the 10% most significant bytecode size diffs in the summary (defaults to 20%)
- name: Add bytecode size diff to sticky comment
if: github.event_name == 'pull_request' || github.event_name == 'pull_request_target'
uses: marocchino/sticky-pull-request-comment@v2
with:
header: brillig
# delete the comment in case changes no longer impact brillig bytecode sizes
delete: ${{ !steps.brillig_bytecode_diff.outputs.markdown }}
message: ${{ steps.brillig_bytecode_diff.outputs.markdown }}
compare_brillig_execution_reports:
name: Brillig execution trace sizes
needs: [build-nargo]
runs-on: ubuntu-22.04
permissions:
pull-requests: write
steps:
- uses: actions/checkout@v4
- name: Download nargo binary
uses: actions/download-artifact@v4
with:
name: nargo
path: ./nargo
- name: Set nargo on PATH
run: |
nargo_binary="${{ github.workspace }}/nargo/nargo"
chmod +x $nargo_binary
echo "$(dirname $nargo_binary)" >> $GITHUB_PATH
export PATH="$PATH:$(dirname $nargo_binary)"
nargo -V
- name: Generate Brillig execution report
working-directory: ./test_programs
run: |
./gates_report_brillig_execution.sh
mv gates_report_brillig_execution.json ../gates_report_brillig_execution.json
- name: Compare Brillig execution reports
id: brillig_execution_diff
uses: noir-lang/noir-gates-diff@d88f7523b013b9edd3f31c5cfddaef87a3fe1b48
with:
report: gates_report_brillig_execution.json
header: |
# Changes to number of Brillig opcodes executed
brillig_report: true
summaryQuantile: 0.9 # only display the 10% most significant bytecode size diffs in the summary (defaults to 20%)
- name: Add bytecode size diff to sticky comment
if: github.event_name == 'pull_request' || github.event_name == 'pull_request_target'
uses: marocchino/sticky-pull-request-comment@v2
with:
header: brillig_execution
# delete the comment in case changes no longer impact brillig bytecode sizes
delete: ${{ !steps.brillig_execution_diff.outputs.markdown }}
message: ${{ steps.brillig_execution_diff.outputs.markdown }}
generate_memory_report:
name: Peak memory usage
needs: [build-nargo]
runs-on: ubuntu-22.04
permissions:
pull-requests: write
steps:
- uses: actions/checkout@v4
- name: Download nargo binary
uses: actions/download-artifact@v4
with:
name: nargo
path: ./nargo
- name: Set nargo on PATH
run: |
nargo_binary="${{ github.workspace }}/nargo/nargo"
chmod +x $nargo_binary
echo "$(dirname $nargo_binary)" >> $GITHUB_PATH
export PATH="$PATH:$(dirname $nargo_binary)"
nargo -V
- name: Generate Memory report
working-directory: ./test_programs
run: |
./memory_report.sh
mv memory_report.json ../memory_report.json
- name: Parse memory report
id: memory_report
uses: noir-lang/noir-bench-report@0d7464a8c39170523932d7846b6e6b458a294aea
with:
report: memory_report.json
header: |
# Memory Report
memory_report: true
- name: Add memory report to sticky comment
if: github.event_name == 'pull_request' || github.event_name == 'pull_request_target'
uses: marocchino/sticky-pull-request-comment@v2
with:
header: memory
message: ${{ steps.memory_report.outputs.markdown }}
generate_compilation_report:
name: Compilation time
needs: [build-nargo]
runs-on: ubuntu-22.04
permissions:
pull-requests: write
steps:
- uses: actions/checkout@v4
- name: Download nargo binary
uses: actions/download-artifact@v4
with:
name: nargo
path: ./nargo
- name: Set nargo on PATH
run: |
nargo_binary="${{ github.workspace }}/nargo/nargo"
chmod +x $nargo_binary
echo "$(dirname $nargo_binary)" >> $GITHUB_PATH
export PATH="$PATH:$(dirname $nargo_binary)"
nargo -V
- name: Generate Compilation report
working-directory: ./test_programs
run: |
./compilation_report.sh
mv compilation_report.json ../compilation_report.json
- name: Parse compilation report
id: compilation_report
uses: noir-lang/noir-bench-report@0d7464a8c39170523932d7846b6e6b458a294aea
with:
report: compilation_report.json
header: |
# Compilation Report
memory_report: false
- name: Add memory report to sticky comment
if: github.event_name == 'pull_request' || github.event_name == 'pull_request_target'
uses: marocchino/sticky-pull-request-comment@v2
with:
header: compilation
message: ${{ steps.compilation_report.outputs.markdown }}