-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mac debug; temporarily disable other ci
- Loading branch information
1 parent
8c66e75
commit 7606d38
Showing
6 changed files
with
289 additions
and
174 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,40 @@ | ||
name: Run Benchmarks | ||
# name: Run Benchmarks | ||
|
||
on: | ||
push: | ||
pull_request: | ||
# on: | ||
# push: | ||
# pull_request: | ||
|
||
jobs: | ||
benchmark: | ||
runs-on: 7950x3d | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Set up Python | ||
run: python3 --version | ||
- name: update toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
- name: 'Authenticate to Google Cloud' | ||
uses: 'google-github-actions/auth@v1' | ||
with: | ||
credentials_json: '${{ secrets.GCP_SA_KEY }}' | ||
- name: Set up Google Cloud SDK | ||
uses: google-github-actions/setup-gcloud@v1 | ||
with: | ||
project_id: ${{ secrets.GCP_PROJECT_ID }} | ||
- name: Install criterion | ||
run: cargo install cargo-criterion | ||
- name: Run benchmark | ||
run: RUSTFLAGS="-C target-cpu=native" cargo criterion --message-format=json > benchmark_results.json | ||
- name: Clean benchmark results | ||
run: | | ||
wget https://raw.githubusercontent.com/PolyhedraZK/Expander-rs/main/scripts/parse_benchmark_result.py | ||
python3 parse_benchmark_result.py benchmark_results.json benchmark_results_clean.json | ||
- name: Upload benchmark results to Google Cloud Storage | ||
run: | | ||
commit_hash=$(git rev-parse HEAD) | ||
repo_name="${GITHUB_REPOSITORY#*/}" | ||
gsutil cp benchmark_results_clean.json gs://github_micro_bench/${repo_name}/benchmark_${commit_hash}.json | ||
# jobs: | ||
# benchmark: | ||
# runs-on: 7950x3d | ||
# steps: | ||
# - uses: actions/checkout@v4 | ||
# with: | ||
# fetch-depth: 0 | ||
# - name: Set up Python | ||
# run: python3 --version | ||
# - name: update toolchain | ||
# uses: actions-rs/toolchain@v1 | ||
# with: | ||
# toolchain: stable | ||
# - name: 'Authenticate to Google Cloud' | ||
# uses: 'google-github-actions/auth@v1' | ||
# with: | ||
# credentials_json: '${{ secrets.GCP_SA_KEY }}' | ||
# - name: Set up Google Cloud SDK | ||
# uses: google-github-actions/setup-gcloud@v1 | ||
# with: | ||
# project_id: ${{ secrets.GCP_PROJECT_ID }} | ||
# - name: Install criterion | ||
# run: cargo install cargo-criterion | ||
# - name: Run benchmark | ||
# run: RUSTFLAGS="-C target-cpu=native" cargo criterion --message-format=json > benchmark_results.json | ||
# - name: Clean benchmark results | ||
# run: | | ||
# wget https://raw.githubusercontent.com/PolyhedraZK/Expander-rs/main/scripts/parse_benchmark_result.py | ||
# python3 parse_benchmark_result.py benchmark_results.json benchmark_results_clean.json | ||
# - name: Upload benchmark results to Google Cloud Storage | ||
# run: | | ||
# commit_hash=$(git rev-parse HEAD) | ||
# repo_name="${GITHUB_REPOSITORY#*/}" | ||
# gsutil cp benchmark_results_clean.json gs://github_micro_bench/${repo_name}/benchmark_${commit_hash}.json |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,40 @@ | ||
name: build-expander-exec | ||
on: | ||
release: | ||
types: [released] | ||
# name: build-expander-exec | ||
# on: | ||
# release: | ||
# types: [released] | ||
|
||
env: | ||
RUSTFLAGS: "-Dwarnings" | ||
RUST_BACKTRACE: 1 | ||
# env: | ||
# RUSTFLAGS: "-Dwarnings" | ||
# RUST_BACKTRACE: 1 | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
matrix: | ||
platform: [macos, linux-avx2] | ||
include: | ||
- platform: macos | ||
ci_image: macos-latest | ||
flags: '' | ||
- platform: linux-avx2 | ||
ci_image: ubuntu-latest | ||
flags: 'RUSTFLAGS="-C target-feature=+avx2"' | ||
runs-on: ${{ matrix.ci_image }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@stable | ||
- uses: Swatinem/rust-cache@v2 | ||
- name: Prepare binary | ||
run: ${{ matrix.flags }} cargo build --release --bin expander-exec | ||
- name: Upload release asset | ||
uses: actions/github-script@v6 | ||
with: | ||
script: | | ||
const fs = require('fs').promises; | ||
github.rest.repos.uploadReleaseAsset({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
release_id: ${{ github.event.release.id }}, | ||
name: 'expander-exec-${{ matrix.platform }}', | ||
data: await fs.readFile('target/release/expander-exec') | ||
}); | ||
# jobs: | ||
# build: | ||
# strategy: | ||
# matrix: | ||
# platform: [macos, linux-avx2] | ||
# include: | ||
# - platform: macos | ||
# ci_image: macos-latest | ||
# flags: '' | ||
# - platform: linux-avx2 | ||
# ci_image: ubuntu-latest | ||
# flags: 'RUSTFLAGS="-C target-feature=+avx2"' | ||
# runs-on: ${{ matrix.ci_image }} | ||
# steps: | ||
# - uses: actions/checkout@v4 | ||
# - uses: dtolnay/rust-toolchain@stable | ||
# - uses: Swatinem/rust-cache@v2 | ||
# - name: Prepare binary | ||
# run: ${{ matrix.flags }} cargo build --release --bin expander-exec | ||
# - name: Upload release asset | ||
# uses: actions/github-script@v6 | ||
# with: | ||
# script: | | ||
# const fs = require('fs').promises; | ||
# github.rest.repos.uploadReleaseAsset({ | ||
# owner: context.repo.owner, | ||
# repo: context.repo.repo, | ||
# release_id: ${{ github.event.release.id }}, | ||
# name: 'expander-exec-${{ matrix.platform }}', | ||
# data: await fs.readFile('target/release/expander-exec') | ||
# }); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,76 +41,76 @@ jobs: | |
- run: cargo test -p bi-kzg --release | ||
- run: cargo test --no-default-features --release | ||
- run: cargo test --all-features --release | ||
Bench-mac-m31-ext3: | ||
name: Bench-mac-m31-ext3 | ||
runs-on: macos-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@stable | ||
- uses: Swatinem/rust-cache@v2 | ||
- run: wget -P data https://storage.googleapis.com/keccak8/circuit.txt | ||
- run: wget -P data https://storage.googleapis.com/keccak8/witness.txt | ||
- run: RUSTFLAGS="-C target-cpu=native" cargo run --release -- -t 2 -f m31ext3 | ||
Bench-mac-BN254: | ||
name: Bench-mac-BN254 | ||
runs-on: macos-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@stable | ||
- uses: Swatinem/rust-cache@v2 | ||
- run: wget -P data https://storage.googleapis.com/keccak8/circuit.txt | ||
- run: wget -P data https://storage.googleapis.com/keccak8/witness.txt | ||
- run: RUSTFLAGS="-C target-cpu=native" cargo run --release -- -t 2 -f fr | ||
Bench-mac-gf2-ext128: | ||
name: Bench-mac-gf2ext128 | ||
runs-on: macos-latest | ||
steps: | ||
- uses: styfle/[email protected] | ||
with: | ||
all_but_latest: true | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@stable | ||
- uses: Swatinem/rust-cache@v2 | ||
- run: wget -P data https://storage.googleapis.com/expander-compiled-circuits/keccak-ci/gf2/circuit.txt | ||
- run: RUSTFLAGS="-C target-cpu=native" cargo run --release -- -t 2 -f gf2ext128 | ||
Test-linux: | ||
name: Test-linux | ||
runs-on: 7950x3d | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- run: . "$HOME/.cargo/env" | ||
- run: wget -P data https://storage.googleapis.com/keccak8/circuit.txt | ||
- run: wget -P data https://storage.googleapis.com/keccak8/witness.txt | ||
- run: RUSTFLAGS="-C target-cpu=native" cargo test -p arith --release | ||
- run: RUSTFLAGS="-C target-cpu=native" cargo test -p bi-kzg --release | ||
- run: RUSTFLAGS="-C target-cpu=native" cargo test --no-default-features --release | ||
- run: RUSTFLAGS="-C target-cpu=native" cargo test --all-features --release | ||
Bench-linux-m31-ext3: | ||
name: Bench-linux-m31-ext3 | ||
runs-on: 7950x3d | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- run: . "$HOME/.cargo/env" | ||
- run: wget -P data https://storage.googleapis.com/keccak8/circuit.txt | ||
- run: wget -P data https://storage.googleapis.com/keccak8/witness.txt | ||
- run: RUSTFLAGS="-C target-cpu=native" cargo run --release -- -t 16 -f m31ext3 | ||
Bench-linux-BN254: | ||
name: Bench-linux-BN254 | ||
runs-on: 7950x3d | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- run: . "$HOME/.cargo/env" | ||
- run: wget -P data https://storage.googleapis.com/keccak8/circuit.txt | ||
- run: wget -P data https://storage.googleapis.com/keccak8/witness.txt | ||
- run: RUSTFLAGS="-C target-cpu=native" cargo run --release -- -t 16 -f fr | ||
Bench-linux-gf2-ext128: | ||
name: Bench-linux-gf2-ext128 | ||
runs-on: 7950x3d | ||
steps: | ||
- uses: styfle/[email protected] | ||
with: | ||
all_but_latest: true | ||
- uses: actions/checkout@v4 | ||
- run: . "$HOME/.cargo/env" | ||
- run: wget -P data https://storage.googleapis.com/expander-compiled-circuits/keccak-ci/gf2/circuit.txt | ||
- run: RUSTFLAGS="-C target-cpu=native" cargo run --release -- -t 16 -f gf2ext128 | ||
# Bench-mac-m31-ext3: | ||
# name: Bench-mac-m31-ext3 | ||
# runs-on: macos-latest | ||
# steps: | ||
# - uses: actions/checkout@v4 | ||
# - uses: dtolnay/rust-toolchain@stable | ||
# - uses: Swatinem/rust-cache@v2 | ||
# - run: wget -P data https://storage.googleapis.com/keccak8/circuit.txt | ||
# - run: wget -P data https://storage.googleapis.com/keccak8/witness.txt | ||
# - run: RUSTFLAGS="-C target-cpu=native" cargo run --release -- -t 2 -f m31ext3 | ||
# Bench-mac-BN254: | ||
# name: Bench-mac-BN254 | ||
# runs-on: macos-latest | ||
# steps: | ||
# - uses: actions/checkout@v4 | ||
# - uses: dtolnay/rust-toolchain@stable | ||
# - uses: Swatinem/rust-cache@v2 | ||
# - run: wget -P data https://storage.googleapis.com/keccak8/circuit.txt | ||
# - run: wget -P data https://storage.googleapis.com/keccak8/witness.txt | ||
# - run: RUSTFLAGS="-C target-cpu=native" cargo run --release -- -t 2 -f fr | ||
# Bench-mac-gf2-ext128: | ||
# name: Bench-mac-gf2ext128 | ||
# runs-on: macos-latest | ||
# steps: | ||
# - uses: styfle/[email protected] | ||
# with: | ||
# all_but_latest: true | ||
# - uses: actions/checkout@v4 | ||
# - uses: dtolnay/rust-toolchain@stable | ||
# - uses: Swatinem/rust-cache@v2 | ||
# - run: wget -P data https://storage.googleapis.com/expander-compiled-circuits/keccak-ci/gf2/circuit.txt | ||
# - run: RUSTFLAGS="-C target-cpu=native" cargo run --release -- -t 2 -f gf2ext128 | ||
# Test-linux: | ||
# name: Test-linux | ||
# runs-on: 7950x3d | ||
# steps: | ||
# - uses: actions/checkout@v4 | ||
# - run: . "$HOME/.cargo/env" | ||
# - run: wget -P data https://storage.googleapis.com/keccak8/circuit.txt | ||
# - run: wget -P data https://storage.googleapis.com/keccak8/witness.txt | ||
# - run: RUSTFLAGS="-C target-cpu=native" cargo test -p arith --release | ||
# - run: RUSTFLAGS="-C target-cpu=native" cargo test -p bi-kzg --release | ||
# - run: RUSTFLAGS="-C target-cpu=native" cargo test --no-default-features --release | ||
# - run: RUSTFLAGS="-C target-cpu=native" cargo test --all-features --release | ||
# Bench-linux-m31-ext3: | ||
# name: Bench-linux-m31-ext3 | ||
# runs-on: 7950x3d | ||
# steps: | ||
# - uses: actions/checkout@v4 | ||
# - run: . "$HOME/.cargo/env" | ||
# - run: wget -P data https://storage.googleapis.com/keccak8/circuit.txt | ||
# - run: wget -P data https://storage.googleapis.com/keccak8/witness.txt | ||
# - run: RUSTFLAGS="-C target-cpu=native" cargo run --release -- -t 16 -f m31ext3 | ||
# Bench-linux-BN254: | ||
# name: Bench-linux-BN254 | ||
# runs-on: 7950x3d | ||
# steps: | ||
# - uses: actions/checkout@v4 | ||
# - run: . "$HOME/.cargo/env" | ||
# - run: wget -P data https://storage.googleapis.com/keccak8/circuit.txt | ||
# - run: wget -P data https://storage.googleapis.com/keccak8/witness.txt | ||
# - run: RUSTFLAGS="-C target-cpu=native" cargo run --release -- -t 16 -f fr | ||
# Bench-linux-gf2-ext128: | ||
# name: Bench-linux-gf2-ext128 | ||
# runs-on: 7950x3d | ||
# steps: | ||
# - uses: styfle/[email protected] | ||
# with: | ||
# all_but_latest: true | ||
# - uses: actions/checkout@v4 | ||
# - run: . "$HOME/.cargo/env" | ||
# - run: wget -P data https://storage.googleapis.com/expander-compiled-circuits/keccak-ci/gf2/circuit.txt | ||
# - run: RUSTFLAGS="-C target-cpu=native" cargo run --release -- -t 16 -f gf2ext128 |
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
Oops, something went wrong.