Skip to content

Commit

Permalink
chore: all feats, no feats, default feats top level workspace checks (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
nhtyy authored Nov 26, 2024
1 parent f9640e8 commit b1bc953
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 39 deletions.
109 changes: 72 additions & 37 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,12 @@ jobs:
- name: Setup CI
uses: ./.github/actions/setup

- name: Install SP1 toolchain
- name: Install SP1 toolchain from repo
run: |
curl -L https://sp1.succinct.xyz | bash
~/.sp1/bin/sp1up
~/.sp1/bin/cargo-prove prove --version
cargo run -p sp1-cli -- prove install-toolchain
cd crates/cli
cargo install --locked --path .
cargo clean
- name: Run cargo check
uses: actions-rs/cargo@v1
Expand Down Expand Up @@ -80,11 +81,12 @@ jobs:
- name: Setup CI
uses: ./.github/actions/setup

- name: Install SP1 toolchain
- name: Install SP1 toolchain from repo
run: |
curl -L https://sp1.succinct.xyz | bash
~/.sp1/bin/sp1up
~/.sp1/bin/cargo-prove prove --version
cargo run -p sp1-cli -- prove install-toolchain
cd crates/cli
cargo install --locked --path .
cargo clean
- name: Run cargo check
uses: actions-rs/cargo@v1
Expand All @@ -106,7 +108,7 @@ jobs:

lint:
name: Formatting & Clippy
runs-on: [runs-on, runner=8cpu-linux-x64, "run-id=${{ github.run_id }}"]
runs-on: [runs-on, runner=16cpu-linux-x64, "run-id=${{ github.run_id }}"]
env:
CARGO_NET_GIT_FETCH_WITH_CLI: "true"
steps:
Expand All @@ -116,11 +118,12 @@ jobs:
- name: Setup CI
uses: ./.github/actions/setup

- name: Install SP1 toolchain
- name: Install SP1 toolchain from repo
run: |
curl -L https://sp1.succinct.xyz | bash
~/.sp1/bin/sp1up
~/.sp1/bin/cargo-prove prove --version
cargo run -p sp1-cli -- prove install-toolchain
cd crates/cli
cargo install --locked --path .
cargo clean
- name: Run cargo fmt
uses: actions-rs/cargo@v1
Expand All @@ -146,6 +149,43 @@ jobs:
env:
CARGO_INCREMENTAL: 1

check:
name: Cargo Check
runs-on: [runs-on, runner=16cpu-linux-x64, disk=medium, "run-id=${{ github.run_id }}"]
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 from repo
run: |
cargo run -p sp1-cli -- prove install-toolchain
cd crates/cli
cargo install --locked --path .
cargo clean
- name: Check workspace no features
uses: actions-rs/cargo@v1
with:
command: check
args: --workspace --all-targets --no-default-features

- name: Check workspace with default features
uses: actions-rs/cargo@v1
with:
command: check
args: --workspace --all-targets

- name: Check workspace with all features
uses: actions-rs/cargo@v1
with:
command: check
args: --workspace --all-targets --all-features

examples:
name: Examples
runs-on:
Expand All @@ -165,9 +205,12 @@ jobs:
- name: Setup CI
uses: ./.github/actions/setup

- name: Install SP1 toolchain
- name: Install SP1 toolchain from repo
run: |
cargo run -p sp1-cli -- prove install-toolchain
cd crates/cli
cargo install --locked --path .
cargo clean
- name: Run cargo fmt
run: |
Expand All @@ -186,7 +229,7 @@ jobs:
cli:
name: CLI
runs-on: [runs-on, runner=8cpu-linux-x64, "run-id=${{ github.run_id }}"]
runs-on: [runs-on, runner=8cpu-linux-x64, disk=large, "run-id=${{ github.run_id }}"]
env:
CARGO_NET_GIT_FETCH_WITH_CLI: "true"
steps:
Expand All @@ -196,17 +239,12 @@ jobs:
- 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
- name: Install SP1 toolchain from repo
run: |
cargo run -p sp1-cli -- prove install-toolchain
cd crates/cli
cargo install --force --locked --path .
cd ~
cargo install --locked --path .
cargo clean
- name: Run cargo prove new
run: |
Expand Down Expand Up @@ -235,11 +273,12 @@ jobs:
- name: Setup CI
uses: ./.github/actions/setup

- name: Install SP1 toolchain
- name: Install SP1 toolchain from repo
run: |
curl -L https://sp1.succinct.xyz | bash
~/.sp1/bin/sp1up
~/.sp1/bin/cargo-prove prove --version
cargo run -p sp1-cli -- prove install-toolchain
cd crates/cli
cargo install --locked --path .
cargo clean
- name: Run Evaluation
run: |
Expand Down Expand Up @@ -267,6 +306,7 @@ jobs:
[
runs-on,
"ram=${{ matrix.mem_limit}}",
disk=large,
family=c7a,
image=ubuntu22-full-x64,
"run-id=${{ github.run_id }}",
Expand All @@ -280,17 +320,12 @@ jobs:
- 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
- name: Install SP1 toolchain from repo
run: |
cargo run -p sp1-cli -- prove install-toolchain
cd crates/cli
cargo install --force --locked --path .
cd ~
cargo install --locked --path .
cargo clean
- name: Run tendermint script
run: |
Expand Down
2 changes: 1 addition & 1 deletion crates/core/executor/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ enum-map = { version = "2.7.3", features = ["serde"] }
test-artifacts = { workspace = true, optional = true }

[dev-dependencies]
sp1-zkvm = { workspace = true }
sp1-zkvm = { workspace = true, features = ["lib"] }

[features]
programs = ["dep:test-artifacts"]
Expand Down
2 changes: 1 addition & 1 deletion crates/verifier/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! This crate provides verifiers for SP1 Groth16 and Plonk BN254 proofs in a no-std environment.
//! It is patched for efficient verification within the SP1 zkVM context.
#![cfg_attr(not(feature = "std"), no_std)]
#![cfg_attr(not(any(feature = "std", test)), no_std)]
extern crate alloc;

use lazy_static::lazy_static;
Expand Down

0 comments on commit b1bc953

Please sign in to comment.