Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into reth-wip
Browse files Browse the repository at this point in the history
# Conflicts:
#	Cargo.lock
#	Cargo.toml
#	core/src/lib.rs
#	core/src/preflight.rs
#	core/src/provider/db.rs
#	lib/Cargo.toml
#	lib/src/builder/execute.rs
#	lib/src/builder/finalize.rs
#	lib/src/builder/initialize.rs
#	lib/src/builder/mod.rs
#	lib/src/input.rs
#	lib/src/mem_db.rs
#	lib/src/protocol_instance.rs
#	provers/sp1/guest/elf/sp1-guest
  • Loading branch information
Brechtpd committed Jun 15, 2024
2 parents 80adeea + 125a349 commit 01bd522
Show file tree
Hide file tree
Showing 104 changed files with 4,738 additions and 2,058 deletions.
4 changes: 3 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@
!/provers
!/host
!/pipeline
!/harness
!/rust-toolchain
!/taiko.toml
!/tests
!/provers/sgx/setup
!/kzg_settings_raw.bin
!/kzg_settings_raw.bin
!/core
50 changes: 50 additions & 0 deletions .github/workflows/ci-all.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: CI - All

on:
push:
branches: ["main"]
paths:
- "host/**"
- "lib/**"
- "primitives/**"
- "script/**"
pull_request:
paths:
- "host/**"
- "lib/**"
- "primitives/**"
- "script/**"
env:
CARGO_TERM_COLOR: always
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
build-test-native:
uses: ./.github/workflows/ci-native.yml

build-test-risc0:
uses: ./.github/workflows/ci-risc0.yml

build-test-sp1:
uses: ./.github/workflows/ci-sp1.yml

build-test-sgx-all:
uses: ./.github/workflows/ci-sgx-all.yml

test-lib:
name: Test raiko-lib
runs-on: [taiko-runner]
timeout-minutes: 60

steps:
- uses: actions/checkout@v4

- uses: actions-rs/toolchain@v1
with:
profile: minimal

- run: cargo test -p raiko-lib --features=std
56 changes: 56 additions & 0 deletions .github/workflows/ci-build-test-reusable.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: CI Build and Test - Reusable

on:
workflow_call:
inputs:
version_name:
type: string
required: true
version_toolchain:
type: string
required: true

env:
CARGO_TERM_COLOR: always
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
build-test:
name: Build and test
runs-on: [taiko-runner]
timeout-minutes: 120

env:
TARGET: ${{ inputs.version_name}}
CI: 1
MOCK: 1

steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ inputs.version_toolchain }}
profile: minimal

- name: Install cargo-binstall
uses: cargo-bins/[email protected]

- name: Setup sccache
if: ${{ inputs.version_name }} == risc0
uses: risc0/risc0/.github/actions/[email protected]

- name: Install ${{ inputs.version_name }}
run: make install

- name: Build ${{ inputs.version_name }} prover
run: make build

- name: Test ${{ inputs.version_name }} prover
run: make test

- name: Build with tracer
if: ${{ inputs.version_name }} == native
run: cargo build -F tracer
40 changes: 40 additions & 0 deletions .github/workflows/ci-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: CI - Lint

on:
pull_request:
types: [opened, reopened, edited, synchronize]

env:
CARGO_TERM_COLOR: always
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
clippy:
name: clippy
runs-on: [taiko-runner]
timeout-minutes: 30

steps:
- uses: actions/checkout@v4

- uses: risc0/risc0/.github/actions/[email protected]

- uses: risc0/risc0/.github/actions/[email protected]

- uses: risc0/clippy-action@main
with:
reporter: 'github-pr-check'
fail_on_error: true
clippy_flags: --workspace --all-targets --all-features -- -D warnings

fmt:
name: fmt
runs-on: [taiko-runner]
timeout-minutes: 10

steps:
- uses: actions/checkout@v4

- uses: risc0/risc0/.github/actions/[email protected]

- run: make fmt
12 changes: 12 additions & 0 deletions .github/workflows/ci-native.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: CI - Native

on: workflow_call


jobs:
build-test-native:
name: Build and test native
uses: ./.github/workflows/ci-build-test-reusable.yml
with:
version_name: "native"
version_toolchain: "nightly-2024-04-17"
33 changes: 33 additions & 0 deletions .github/workflows/ci-provers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: CI - All Provers

on:
workflow_call:
push:
branches: ["main"]
paths:
- "pipelines/**"
- "harness/**"
pull_request:
paths:
- "pipelines/**"
- "harness/**"
env:
CARGO_TERM_COLOR: always
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
build-test-native:
uses: ./.github/workflows/ci-native.yml

build-test-risc0:
uses: ./.github/workflows/ci-risc0.yml

build-test-sp1:
uses: ./.github/workflows/ci-sp1.yml

build-test-sgx-all:
uses: ./.github/workflows/ci-sgx-all.yml
20 changes: 20 additions & 0 deletions .github/workflows/ci-risc0.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: CI - RISC0

on:
workflow_call:
push:
branches: ["main"]
paths:
- "provers/risc0/**"
pull_request:
paths:
- "provers/risc0/**"


jobs:
build-test-risc0:
name: Build and test risc0
uses: ./.github/workflows/ci-build-test-reusable.yml
with:
version_name: "risc0"
version_toolchain: "stable"
27 changes: 27 additions & 0 deletions .github/workflows/ci-sgx-all.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: CI - SGX ALL

on:
workflow_call:
push:
branches: ["main"]
paths:
- "provers/sgx/**"
pull_request:
paths:
- "provers/sgx/**"

jobs:
build-test-sgx:
name: Build and test sgx
uses: ./.github/workflows/ci-build-test-reusable.yml
with:
version_name: "sgx"
version_toolchain: "stable"

build-test-sgx-docker:
name: Build and test sgx with Docker
uses: ./.github/workflows/ci-sgx-docker.yml

build-test-sgx-hardware:
name: Build and test sgx in hardware
uses: ./.github/workflows/ci-sgx-hardware.yml
25 changes: 25 additions & 0 deletions .github/workflows/ci-sgx-docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: CI - SGX Docker

on:
workflow_call:
push:
branches: ["main"]
paths:
- "docker/**"
pull_request:
paths:
- "docker/**"

jobs:
build-test-sgx-with-docker:
name: Build and test sgx with Docker
runs-on: [taiko-runner]
timeout-minutes: 60

steps:
- uses: actions/checkout@v4
- name: Setup and build
run: |
cd docker
docker compose build --no-cache
shell: bash
35 changes: 35 additions & 0 deletions .github/workflows/ci-sgx-hardware.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: CI - SGX Hardware

on: workflow_call

jobs:
build-test-sgx-hardware:
name: Build and test sgx in hardware
runs-on: [self-hosted, sgx, linux]
timeout-minutes: 120
env:
TARGET: sgx
CI: 1
EDMM: 0

steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal

- name: Install cargo-binstall
uses: cargo-bins/[email protected]

- name: Install sgx
run: make install

- name: Build sgx prover
run: make build

- name: Test sgx prover
run: make test
19 changes: 19 additions & 0 deletions .github/workflows/ci-sp1.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: CI - SP1

on:
workflow_call:
push:
branches: ["main"]
paths:
- "provers/sp1/**"
pull_request:
paths:
- "provers/sp1/**"

jobs:
build-test-sgx:
name: Build and test sp1
uses: ./.github/workflows/ci-build-test-reusable.yml
with:
version_name: "sp1"
version_toolchain: "nightly-2024-04-18"
Loading

0 comments on commit 01bd522

Please sign in to comment.