Skip to content

Commit

Permalink
Add prover_bench to CI to catch potential breakages resulting from fo…
Browse files Browse the repository at this point in the history
…rmat/serialization changes (Sovereign-Labs#1279)

* add bench to test

* move to check

* trying check on bench

* risc0 tool for bench check

* install risc0

* try bench

* add general bench

* add risc0 install to general bench as well
  • Loading branch information
dubbelosix authored Jan 5, 2024
1 parent 1b8a21a commit de526a6
Showing 1 changed file with 68 additions and 0 deletions.
68 changes: 68 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,74 @@ jobs:
- name: Run check
run: make check-no-std

prover_bench_check:
name: prover_bench_check
needs: check
runs-on: buildjet-8vcpu-ubuntu-2204
timeout-minutes: 120
steps:
- uses: actions/checkout@v3
- uses: rui314/setup-mold@v1
- name: Install Protoc
uses: arduino/setup-protoc@v2
with:
version: "23.2"
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install Rust
run: rustup show && rustup install nightly && rustup component add rustfmt --toolchain nightly-x86_64-unknown-linux-gnu
- name: Install cargo-risczero
uses: taiki-e/install-action@v2
with:
tool: [email protected]
- name: Install risc0-zkvm toolchain # Use the risc0 cargo extension to install the risc0 std library for the current toolchain
run: cargo risczero install
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: Swatinem/rust-cache@v2
with:
cache-provider: "buildjet"
shared-key: cargo-check-cache
save-if: ${{ github.ref == 'refs/heads/nightly' }}
workspaces: |
.
fuzz
- name: cargo prover bench check
run: cargo bench --bench prover_bench --features bench

bench_check:
name: bench_check
needs: check
runs-on: buildjet-8vcpu-ubuntu-2204
timeout-minutes: 120
steps:
- uses: actions/checkout@v3
- uses: rui314/setup-mold@v1
- name: Install Protoc
uses: arduino/setup-protoc@v2
with:
version: "23.2"
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install Rust
run: rustup show && rustup install nightly && rustup component add rustfmt --toolchain nightly-x86_64-unknown-linux-gnu
- name: Install cargo-risczero
uses: taiki-e/install-action@v2
with:
tool: [email protected]
- name: Install risc0-zkvm toolchain # Use the risc0 cargo extension to install the risc0 std library for the current toolchain
run: cargo risczero install
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: Swatinem/rust-cache@v2
with:
cache-provider: "buildjet"
shared-key: cargo-check-cache
save-if: ${{ github.ref == 'refs/heads/nightly' }}
workspaces: |
.
fuzz
- name: cargo bench check
run: cargo bench

# Check that every combination of features is working properly.
hack:
name: features
Expand Down

0 comments on commit de526a6

Please sign in to comment.