-
Notifications
You must be signed in to change notification settings - Fork 53
76 lines (67 loc) · 2.42 KB
/
backend-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
69
70
71
72
73
74
75
76
name: benchmarks
on: [push, pull_request, workflow_dispatch]
env:
C_KZG_4844_GIT_HASH: '5b35b6147bf269b16c1bffd268fd03bac0c00b64'
jobs:
benchmarks:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-11]
# Excluding mcl for now due to they have different project layout
backend: [blst, zkcrypto, arkworks, arkworks3, constantine]
include:
# Setup exec_once_per_backend flag
- os: ubuntu-latest
exec_once_per_backend: true
# Select backends which support wasm & which support ckzg drop-in
- backend: blst
support_ckzg: true
- backend: zkcrypto
support_ckzg: true
- backend: arkworks
support_ckzg: true
- backend: arkworks3
support_ckzg: true
- backend: constantine
support_ckzg: true
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v3
with:
distribution: "temurin"
java-version: "11"
- if: matrix.backend == 'constantine'
uses: jiro4989/setup-nim-action@v1
with:
nim-version: '1.6.14'
# Install constantine backend deps
- name: "constantine - install deps"
if: matrix.backend == 'constantine' && matrix.os == 'ubuntu-latest'
run: |
sudo DEBIAN_FRONTEND='noninteractive' apt-fast install \
--no-install-recommends -yq \
libgmp-dev \
llvm
- uses: actions/setup-go@v2
with:
go-version: ^1.19
- name: "${{ matrix.backend }} Benchmark"
uses: actions-rs/cargo@v1
with:
command: bench
args: --manifest-path ${{ matrix.backend }}/Cargo.toml
- name: "${{ matrix.backend }} Benchmark (parallel)"
uses: actions-rs/cargo@v1
with:
command: bench
args: --manifest-path ${{ matrix.backend }}/Cargo.toml --features parallel
- name: "${{ matrix.backend }} Benchmark (c-kzg-4844)"
if: matrix.exec_once_per_backend && matrix.support_ckzg
run: |
bash run-c-kzg-4844-benches.sh ${{ matrix.backend }}
- name: "${{ matrix.backend }} Benchmark (c-kzg-4844 parallel)"
if: matrix.exec_once_per_backend && matrix.support_ckzg
run: |
bash run-c-kzg-4844-benches.sh --parallel ${{ matrix.backend }}