benchmarks #6524
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: benchmarks | |
| on: | |
| schedule: | |
| - cron: "0 2 * * *" | |
| workflow_dispatch: | |
| jobs: | |
| benchmarks_with_bencher: | |
| name: rust | |
| permissions: | |
| pull-requests: write | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| rust_bench: [ "commit", "encryption", "key_package", "create_group", "transaction" ] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: ./.github/actions/setup-and-cache-rust | |
| - uses: actions/checkout@v6 | |
| - name: run bencher cli | |
| uses: ./.github/actions/run-bencher | |
| with: | |
| bencher-api-token: ${{ secrets.BENCHER_API_TOKEN }} | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| adapter: rust_criterion | |
| bench-command: cargo bench --locked --bench ${{ matrix.rust_bench }} -- --quick | |
| web_benchmarks_with_bencher: | |
| name: web | |
| permissions: | |
| pull-requests: write | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: ./.github/actions/setup-and-cache-rust | |
| with: | |
| target: "wasm32-unknown-unknown" | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: Install wasm-bindgen-cli | |
| uses: jetli/wasm-bindgen-action@v0.2.0 | |
| - name: bench wasm/js | |
| run: | | |
| make ts-bench RELEASE=1 | |
| - uses: actions/checkout@v6 | |
| with: | |
| # Keep result file | |
| clean: 'false' | |
| - name: run bencher cli | |
| uses: ./.github/actions/run-bencher | |
| with: | |
| bencher-api-token: ${{ secrets.BENCHER_API_TOKEN }} | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| directory: ${{ github.workspace }}/crypto-ffi/bindings/js | |
| adapter: json | |
| # No bench command, as we run the bench before calling bencher CLI. | |
| bench-command: | |
| bench-results-file-name: web_benchmark_results.json |