Skip to content

ci(template-e2e): install Risc Zero toolchain for the rendered guest build#224

Open
danisharora099 wants to merge 2 commits into
masterfrom
danisharora099/fix-template-e2e-risc0-toolchain
Open

ci(template-e2e): install Risc Zero toolchain for the rendered guest build#224
danisharora099 wants to merge 2 commits into
masterfrom
danisharora099/fix-template-e2e-risc0-toolchain

Conversation

@danisharora099

Copy link
Copy Markdown
Contributor

Problem

The Template E2E workflow's render-and-build matrix (default + lez-framework) has been failing on every run, across unrelated PRs and dates — e.g. #221's first run and #210 (wozos/scaffold-deslop) going back to early June. It is not a required check, so it hasn't blocked merges, but it leaves a persistent red ✗ on any PR that touches src/constants.rs, templates/**, or src/template/**.

Root cause

The job's final step renders a project, builds real lez/spel via setup, asserts doctor is clean, then runs lgs build on the rendered workspace. That last step cross-compiles the template's risc0 guest crate (methods/) to riscv32im-risc0-zkvm-elf, which needs the Risc Zero Rust toolchain. The workflow never installed it, so the guest build script panics:

thread 'main' panicked at risc0-build-3.0.5/src/lib.rs:379:
Risc Zero Rust toolchain not found. Try running `rzup install rust`

Everything earlier in the job (render → setup's full LEZ/spel build → circuits fetch → doctor zero-FAIL) already passes; this is the only failing step.

Fix

Add an rzup step before the build to install and register the risc0 rustup toolchain that risc0-build discovers. One added step, no other behavior change.

Notes

  • Split out as its own PR (not folded into the circuits/basecamp Phase 2 PRs) since it's shared CI infra unrelated to those changes.
  • Once merged, the Phase 2 branches pick it up on rebase and their render-and-build jobs go green.

…build

The `render-and-build` matrix renders a project, builds real lez/spel via
`setup`, asserts `doctor` is clean, then runs `lgs build` on the rendered
workspace. That last step cross-compiles the template's risc0 guest crate
(methods/) to riscv32im-risc0-zkvm-elf, which needs the Risc Zero Rust
toolchain — but the workflow never installed it, so every run panicked with
"Risc Zero Rust toolchain not found. Try running `rzup install rust`".

Add an rzup step before the build to register the `risc0` toolchain that
risc0-build discovers. Everything earlier in the job (render, setup, the full
LEZ/spel build, circuits fetch, doctor) was already passing; this closes the
only failing step.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes the Template E2E workflow’s render-and-build job by installing the Risc Zero Rust toolchain needed to compile the rendered template’s risc0 guest crate during the final workspace build.

Changes:

  • Add an rzup installation step to install/register the risc0 rustup toolchain before building the rendered project.
  • Document why the toolchain is required (risc0 guest cross-compilation).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/template-e2e.yml
Comment thread .github/workflows/template-e2e.yml Outdated
Review nits: use `curl -fsSL` so an HTTP error page fails the step instead of
being piped into bash (matches the existing `curl -fL` circuits fetch), and
refer to the `logos-scaffold build` step by the command the workflow actually
runs rather than the `lgs` alias.
@danisharora099

Copy link
Copy Markdown
Contributor Author

Addressed both review nits in 4a6fe7c: switched to curl -fsSL so an HTTP error page fails the step instead of piping into bash (matches the existing curl -fL circuits fetch), and corrected the comment to name the logos-scaffold build step the workflow actually runs. Resolving.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants