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