Update constantine backend #261
Workflow file for this run
This file contains 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: [push, pull_request, workflow_dispatch] | |
env: | |
C_KZG_4844_GIT_HASH: '0894e3ded53d6f85f5aa146f4fe3e80afb411b94' | |
jobs: | |
benchmarks: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
backend: [blst, zkcrypto, arkworks5, arkworks4, arkworks3, constantine, mcl] | |
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: arkworks5 | |
support_ckzg: true | |
- backend: arkworks4 | |
support_ckzg: true | |
- backend: arkworks3 | |
support_ckzg: true | |
- backend: constantine | |
support_ckzg: true | |
- backend: mcl | |
support_ckzg: true | |
exclude: | |
- os: windows-latest | |
backend: mcl | |
# FIXME: enable macos, when fixes are merged into constantine-public-sys branch | |
- os: macos-latest | |
backend: constantine | |
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@v2 | |
with: | |
nim-version: '2.0.2' | |
# Install constantine backend deps | |
- name: "constantine - install deps" | |
if: matrix.backend == 'constantine' && matrix.os == 'ubuntu-latest' | |
run: | | |
sudo DEBIAN_FRONTEND='noninteractive' apt-get install \ | |
--no-install-recommends -yq \ | |
libgmp-dev \ | |
llvm | |
- uses: actions/setup-go@v2 | |
with: | |
go-version: ^1.19 | |
- uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: '7.x.x' | |
- 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 }} |