Skip to content

Commit d7ea41a

Browse files
author
Khashayar Barooti
committed
adding workflow for opcode diffs
1 parent 54e2e67 commit d7ea41a

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Opcode Benchmarks
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
jobs:
10+
test:
11+
name: Benchmark library
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout sources
15+
uses: actions/checkout@v4
16+
17+
- name: Install Nargo
18+
uses: noir-lang/[email protected]
19+
with:
20+
toolchain: 1.0.0-beta.3
21+
22+
23+
- name: Build Noir benchmark programs forcing brillig backend
24+
run: nargo export --force-brillig
25+
26+
- name: Generate gates report
27+
run: ./scripts/build-brillig-gates-report.sh
28+
29+
- name: Compare gates reports
30+
id: gates_diff
31+
uses: noir-lang/noir-gates-diff@dbe920a8dcc3370af4be4f702ca9cef29317bec1
32+
with:
33+
report: opcode_report.json
34+
summaryQuantile: 0.9 # only display the 10% most significant circuit size diffs in the summary (defaults to 20%)
35+
36+
- name: Add gates diff to sticky comment
37+
if: github.event_name == 'pull_request' || github.event_name == 'pull_request_target'
38+
uses: marocchino/sticky-pull-request-comment@v2
39+
with:
40+
# delete the comment in case changes no longer impact circuit sizes
41+
delete: ${{ !steps.gates_diff.outputs.markdown }}
42+
message: ${{ steps.gates_diff.outputs.markdown }}

0 commit comments

Comments
 (0)