chore: adding benchmarking tools for number of brillig opcodes #1
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Opcode Benchmarks | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| jobs: | |
| test: | |
| name: Benchmark library | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@v4 | |
| - name: Install Nargo | |
| uses: noir-lang/[email protected] | |
| with: | |
| toolchain: 1.0.0-beta.3 | |
| - name: Build Noir benchmark programs forcing brillig backend | |
| run: nargo export --force-brillig | |
| - name: Generate gates report | |
| run: ./scripts/build-brillig-gates-report.sh | |
| - name: Compare gates reports | |
| id: gates_diff | |
| uses: noir-lang/noir-gates-diff@dbe920a8dcc3370af4be4f702ca9cef29317bec1 | |
| with: | |
| report: opcode_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 }} |