Skip to content

Commit

Permalink
Merge branch 'main' of github.com:risc0/zeth into rkhalil/1.2.1-rc.0-…
Browse files Browse the repository at this point in the history
…perf
  • Loading branch information
hashcashier committed Dec 12, 2024
2 parents deedd06 + 80e3c5d commit 73a33b6
Show file tree
Hide file tree
Showing 34 changed files with 1,150 additions and 5,075 deletions.
32 changes: 32 additions & 0 deletions .github/actions/risczero/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: risczero toolchain install
description: Install risczero toolchain

inputs:
version:
description: 'Version of the RISC Zero to install'
required: true
type: string
toolchain-version:
description: 'Version of the RISC Zero toolchains to install'
required: false
default: ''
type: string

runs:
using: composite
steps:
- uses: risc0/cargo-install@v3
with:
crate: cargo-binstall
version: '=1.6'
locked: true

- run: cargo binstall -y --force cargo-risczero@${{ inputs.version }}
shell: bash

- run: cargo risczero install ${{ inputs.toolchain-version != '' && format('--version {0}', inputs.toolchain-version) || '' }}
shell: bash

- name: test risczero
shell: bash
run: cargo risczero --version
45 changes: 30 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,29 +17,44 @@ permissions:
env:
CARGO_TERM_COLOR: always
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RISC0_VERSION: "1.1.3"
RISC0_TOOLCHAIN_VERSION: "r0.1.81.0"

jobs:
test:
name: test
name: cargo test
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
- uses: risc0/risc0/.github/actions/rustup@main
- uses: risc0/risc0/.github/actions/sccache@main
- uses: ./.github/actions/risczero
with:
submodules: recursive
- uses: risc0/risc0/.github/actions/rustup@v1.1.3
- uses: risc0/risc0/.github/actions/sccache@v1.1.3
- uses: risc0/cargo-install@v1
with:
crate: cargo-binstall
- run: cargo binstall -y --force cargo-risczero@1.1.3
- run: cargo risczero install
version: ${{ env.RISC0_VERSION }}
toolchain-version: ${{ env.RISC0_TOOLCHAIN_VERSION }}
- run: cargo test --all-targets -p zeth-core -p zeth-guests -p zeth-preflight -p zeth -p zeth-benchmark -F debug-guest-build
- run: cargo test --all-targets -p zeth-core-ethereum -p zeth-preflight-ethereum -p zeth-ethereum -F debug-guest-build
- run: cargo test --all-targets -p zeth-core-optimism -p zeth-preflight-optimism -p zeth-optimism -F debug-guest-build

ef-tests:
name: Ethereum execution tests
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: risc0/risc0/.github/actions/rustup@main
- uses: risc0/risc0/.github/actions/sccache@main
- uses: ./.github/actions/risczero
with:
version: ${{ env.RISC0_VERSION }}
toolchain-version: ${{ env.RISC0_TOOLCHAIN_VERSION }}
- run: cargo test --all-targets -p zeth-testeth -F ef-tests

clippy:
name: clippy
name: cargo clippy
runs-on: [self-hosted, prod, "${{ matrix.os }}"]
strategy:
fail-fast: false
Expand All @@ -60,20 +75,20 @@ jobs:
steps:
- uses: actions/checkout@v4
- if: matrix.feature == 'cuda'
uses: risc0/risc0/.github/actions/cuda@v1.1.3
- uses: risc0/risc0/.github/actions/rustup@v1.1.3
- uses: risc0/risc0/.github/actions/sccache@v1.1.3
uses: risc0/risc0/.github/actions/cuda@main
- uses: risc0/risc0/.github/actions/rustup@main
- uses: risc0/risc0/.github/actions/sccache@main
- uses: risc0/clippy-action@main
with:
reporter: 'github-pr-check'
fail_on_error: true
clippy_flags: -F $FEATURE --workspace --all-targets -- -Dwarnings

fmt:
name: fmt
name: cargo fmt
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: risc0/risc0/.github/actions/rustup@v1.1.3
- uses: risc0/risc0/.github/actions/rustup@main
- run: cargo fmt --all --check
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "testing/ef-tests/testdata"]
path = testing/ef-tests/testdata
url = https://github.com/ethereum/tests.git
Loading

0 comments on commit 73a33b6

Please sign in to comment.