Skip to content

Commit

Permalink
Upgrade Risc0 to v0.19.0 (#1130)
Browse files Browse the repository at this point in the history
* Update Risc0 to v0.19.0

* Use cargo-binstall for Risc0 installation

Signed-off-by: Filippo Costa <[email protected]>

* Fix read_padded_bytes implementation

* Improve README

* cargo +nightly fmt --all

Signed-off-by: Filippo Costa <[email protected]>

* Clippy fix

Signed-off-by: Filippo Costa <[email protected]>

---------

Signed-off-by: Filippo Costa <[email protected]>
  • Loading branch information
neysofu authored Nov 3, 2023
1 parent 7cf2e64 commit 4401a3f
Show file tree
Hide file tree
Showing 12 changed files with 330 additions and 163 deletions.
68 changes: 40 additions & 28 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,14 @@ jobs:
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 # Nightly is needed for our configuration of cargo fmt
- 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"
Expand All @@ -111,10 +119,6 @@ jobs:
workspaces: |
.
fuzz
- name: Install cargo-risc0 # Risc0 v0.17 and higher require a cargo extension to build the guest code
run: cargo install cargo-risczero
- 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 }}
- name: Run lint
Expand Down Expand Up @@ -194,6 +198,14 @@ jobs:
with:
version: "23.2"
repo-token: ${{ secrets.GITHUB_TOKEN }}
- 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 }}
# `cargo-nextest` is much faster than standard `cargo test`.
- uses: taiki-e/install-action@nextest
- name: Install Rust
Expand All @@ -202,12 +214,6 @@ jobs:
with:
cache-provider: "buildjet"
save-if: ${{ github.ref == 'refs/heads/nightly' }}
- name: Install cargo-risc0 # Risc0 v0.17 and higher require a cargo extension to build the guest code
run: cargo install cargo-risczero
- 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 }}
- run: cargo nextest run --workspace --all-features
test:
name: test
Expand All @@ -221,18 +227,20 @@ jobs:
with:
version: "23.2"
repo-token: ${{ secrets.GITHUB_TOKEN }}
- 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 }}
- name: Install Rust
run: rustup show
- uses: Swatinem/rust-cache@v2
with:
cache-provider: "buildjet"
save-if: ${{ github.ref == 'refs/heads/nightly' }}
- name: Install cargo-risc0 # Risc0 v0.17 and higher require a cargo extension to build the guest code
run: cargo install cargo-risczero
- 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 }}
# `cargo-nextest` does not support doctests (yet?), so we have to run them
# separately.
# TODO: https://github.com/nextest-rs/nextest/issues/16
Expand All @@ -257,16 +265,18 @@ jobs:
run: rustup component add llvm-tools-preview
- name: cargo install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- uses: Swatinem/rust-cache@v2
- name: Install cargo-risczero
uses: taiki-e/install-action@v2
with:
cache-provider: "buildjet"
save-if: ${{ github.ref == 'refs/heads/nightly' }}
- name: Install cargo-risc0 # Risc0 v0.17 and higher require a cargo extension to build the guest code
run: cargo install cargo-risczero
- name: Install risc0-zkvm toolchain # Use the risc0 cargo extension to install the risc0 std library for the current toolchain
tool: [email protected]
- name: Install risc0-zkvm toolchain
run: cargo risczero install
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: Swatinem/rust-cache@v2
with:
cache-provider: "buildjet"
save-if: ${{ github.ref == 'refs/heads/nightly' }}
- name: cargo generate-lockfile
if: hashFiles('Cargo.lock') == ''
run: cargo generate-lockfile
Expand Down Expand Up @@ -362,18 +372,20 @@ jobs:
with:
version: "23.2"
repo-token: ${{ secrets.GITHUB_TOKEN }}
- 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 }}
- name: Install Rust
run: rustup show
- uses: Swatinem/rust-cache@v2
with:
cache-provider: "buildjet"
save-if: ${{ github.ref == 'refs/heads/nightly' }}
- name: Install cargo-risc0 # Risc0 v0.17 and higher require a cargo extension to build the guest code
run: cargo install cargo-risczero
- 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 }}
- name: Compile README.md to Bash
run: cargo run --bin bashtestmd -- --input examples/demo-rollup/README.md --output demo-rollup-readme.sh --tag test-ci
- run: cat demo-rollup-readme.sh
Expand Down
Loading

0 comments on commit 4401a3f

Please sign in to comment.