Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: run examples on merge to main #1060

Merged
merged 7 commits into from
Jul 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 70 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ jobs:
env:
RUSTFLAGS: -Copt-level=3 -Cdebug-assertions -Coverflow-checks=y -Cdebuginfo=0 -C target-cpu=native
RUST_BACKTRACE: 1

plonk-docker:
name: Plonk Docker
runs-on: runs-on,cpu=64,ram=256,family=m7i+m7a,hdd=80,image=ubuntu22-full-x64,spot=false
Expand All @@ -60,6 +61,7 @@ jobs:
env:
RUSTFLAGS: -Copt-level=3 -Cdebug-assertions -Coverflow-checks=y -Cdebuginfo=0 -C target-cpu=native
RUST_BACKTRACE: 1

check-branch:
name: Check branch
runs-on: ubuntu-latest
Expand All @@ -69,3 +71,71 @@ jobs:
run: |
echo "ERROR: You can only merge to main from dev, release/*, or hotfix/*."
exit 1

ssz-withdrawals:
name: Example (SSZ Withdrawals)
runs-on: runs-on,runner=64cpu-linux-arm64,spot=false
env:
CARGO_NET_GIT_FETCH_WITH_CLI: "true"
steps:
- name: Checkout sources
uses: actions/checkout@v4

- name: Setup CI
uses: ./.github/actions/setup

- name: Install SP1 toolchain
run: |
curl -L https://sp1.succinct.xyz | bash
~/.sp1/bin/sp1up
~/.sp1/bin/cargo-prove prove --version

- name: Install SP1 CLI
run: |
cd cli
cargo install --force --locked --path .
cd ~

- name: Run script
run: |
cd examples/ssz-withdrawals/program
cargo add sp1-zkvm --path $GITHUB_WORKSPACE/zkvm/entrypoint
cargo prove build
cd ../script
cargo remove sp1-sdk
cargo add sp1-sdk --path $GITHUB_WORKSPACE/sdk
SP1_DEV=1 RUST_LOG=info cargo run --release

tendermint:
name: Example (Tendermint)
runs-on: runs-on,runner=64cpu-linux-arm64,spot=false
env:
CARGO_NET_GIT_FETCH_WITH_CLI: "true"
steps:
- name: Checkout sources
uses: actions/checkout@v4

- name: Setup CI
uses: ./.github/actions/setup

- name: Install SP1 toolchain
run: |
curl -L https://sp1.succinct.xyz | bash
~/.sp1/bin/sp1up
~/.sp1/bin/cargo-prove prove --version

- name: Install SP1 CLI
run: |
cd cli
cargo install --force --locked --path .
cd ~

- name: Run script
run: |
cd examples/tendermint/program
cargo add sp1-zkvm --path $GITHUB_WORKSPACE/zkvm/entrypoint
cargo prove build
cd ../script
cargo remove sp1-sdk
cargo add sp1-sdk --path $GITHUB_WORKSPACE/sdk
SP1_DEV=1 RUST_LOG=info cargo run --release
Loading