-
Notifications
You must be signed in to change notification settings - Fork 6
68 lines (66 loc) · 2.21 KB
/
benchmarks.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Continuous Benchmarks with Bencher
on:
push:
branches:
- main
pull_request:
jobs:
benchmarks_with_bencher:
name: Rust Benchmarks with Bencher
permissions:
pull-requests: write
runs-on: ubuntu-latest
strategy:
matrix:
rust_bench: [ "commit", "encryption", "key_package", "create_group", "mls_proteus", "transaction" ]
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1 # this implicitly caches Rust tools and build artifacts
- uses: actions/checkout@v4
- 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 --bench ${{ matrix.rust_bench }} -- --quick
web_benchmarks_with_bencher:
name: Web Benchmarks with Bencher
permissions:
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1 # this implicitly caches Rust tools and build artifacts
- name: Setup bun (web)
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Install wasm-pack (web)
uses: taiki-e/install-action@v2
with:
tool: wasm-pack
- name: Setup cargo-make (web)
uses: davidB/rust-cargo-make@v1
- name: Build & test WASM / JS package (web)
run: |
cd crypto-ffi
cargo make wasm
cd bindings/js
bun install
bun run build
bun run bench
- uses: actions/checkout@v4
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