|
| 1 | +name: 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 | + permissions: |
| 14 | + contents: write |
| 15 | + pull-requests: write |
| 16 | + steps: |
| 17 | + - name: Checkout sources |
| 18 | + uses: actions/checkout@v4 |
| 19 | + |
| 20 | + - name: Install Nargo |
| 21 | + |
| 22 | + with: |
| 23 | + toolchain: 1.0.0-beta.17 |
| 24 | + |
| 25 | + - name: Install bb |
| 26 | + run: | |
| 27 | + curl -L https://raw.githubusercontent.com/AztecProtocol/aztec-packages/refs/heads/next/barretenberg/bbup/install | bash |
| 28 | + ~/.bb/bbup -nv 1.0.0-beta.12 |
| 29 | + sudo apt install libc++-dev |
| 30 | +
|
| 31 | + - name: Build Noir benchmark programs |
| 32 | + run: nargo export |
| 33 | + |
| 34 | + - name: Generate gates report |
| 35 | + run: ./scripts/build-gates-report.sh |
| 36 | + env: |
| 37 | + BACKEND: /home/runner/.bb/bb |
| 38 | + |
| 39 | + - name: Store ACIR opcode benchmark result |
| 40 | + uses: benchmark-action/github-action-benchmark@v1 |
| 41 | + with: |
| 42 | + name: "ACIR Opcodes" |
| 43 | + tool: "customSmallerIsBetter" |
| 44 | + output-file-path: "benchmark-opcodes.json" |
| 45 | + gh-pages-branch: "gh-pages" |
| 46 | + benchmark-data-dir-path: "dev/bench" |
| 47 | + github-token: ${{ secrets.GITHUB_TOKEN }} |
| 48 | + auto-push: ${{ github.ref == 'refs/heads/main' }} |
| 49 | + comment-always: ${{ contains( github.event.pull_request.labels.*.name, 'bench-show') }} |
| 50 | + comment-on-alert: true |
| 51 | + alert-threshold: "101%" |
| 52 | + fail-on-alert: false |
| 53 | + max-items-in-chart: 50 |
| 54 | + |
| 55 | + - name: Store gates benchmark result |
| 56 | + uses: benchmark-action/github-action-benchmark@v1 |
| 57 | + with: |
| 58 | + name: "Circuit Size" |
| 59 | + tool: "customSmallerIsBetter" |
| 60 | + output-file-path: "benchmark-circuit.json" |
| 61 | + gh-pages-branch: "gh-pages" |
| 62 | + benchmark-data-dir-path: "dev/bench" |
| 63 | + github-token: ${{ secrets.GITHUB_TOKEN }} |
| 64 | + auto-push: ${{ github.ref == 'refs/heads/master' }} |
| 65 | + comment-always: ${{ contains( github.event.pull_request.labels.*.name, 'bench-show') }} |
| 66 | + comment-on-alert: true |
| 67 | + alert-threshold: "101%" |
| 68 | + fail-on-alert: false |
| 69 | + max-items-in-chart: 50 |
| 70 | + skip-fetch-gh-pages: true |
| 71 | + |
| 72 | + - name: Delete export files |
| 73 | + run: rm -rf export |
| 74 | + |
| 75 | + - name: Build Brillig benchmark programs |
| 76 | + run: nargo export --force-brillig |
| 77 | + |
| 78 | + - name: Generate brillig report |
| 79 | + run: ./scripts/build-brillig-report.sh |
| 80 | + |
| 81 | + - name: Store brillig benchmark result |
| 82 | + uses: benchmark-action/github-action-benchmark@v1 |
| 83 | + with: |
| 84 | + name: "Brillig Bytecode Size" |
| 85 | + tool: "customSmallerIsBetter" |
| 86 | + output-file-path: "benchmark-brillig.json" |
| 87 | + gh-pages-branch: "gh-pages" |
| 88 | + benchmark-data-dir-path: "dev/bench" |
| 89 | + github-token: ${{ secrets.GITHUB_TOKEN }} |
| 90 | + auto-push: ${{ github.ref == 'refs/heads/master' }} |
| 91 | + comment-always: ${{ contains( github.event.pull_request.labels.*.name, 'bench-show') }} |
| 92 | + comment-on-alert: true |
| 93 | + alert-threshold: "101%" |
| 94 | + fail-on-alert: false |
| 95 | + max-items-in-chart: 50 |
| 96 | + skip-fetch-gh-pages: true |
0 commit comments