feat: add ci build #3
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build & Run Program | |
on: | |
workflow_dispatch: | |
push: | |
branches: [main] | |
pull_request: | |
jobs: | |
build-sp1: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: true | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Install rust toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: 1.85.0 | |
- name: Install SP1 toolchain | |
run: | | |
curl -L https://sp1.succinct.xyz | bash | |
~/.sp1/bin/sp1up --c-toolchain | |
~/.sp1/bin/cargo-prove prove --version | |
- name: Build SP1 program | |
run: | | |
cd sp1/program/ | |
~/.sp1/bin/cargo-prove prove build | |
- name: Run SP1 program | |
run: | | |
LOG_TO_FILE=0 make sp1 | |
build-r0: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: true | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Install rust toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: 1.85.0 | |
- name: Install Risc0 toolchain | |
run: | | |
curl -L https://risczero.com/install | bash | |
/home/runner/.risc0/bin/rzup install rust 1.85.0 | |
/home/runner/.risc0/bin/rzup install r0vm 2.0.1 | |
/home/runner/.risc0/bin/rzup install cargo-risczero 2.0.1 | |
- name: Build Risc0 guest program | |
run: | | |
cd r0/ | |
cargo build | |
- name: Run Risc0 program | |
run: | | |
LOG_TO_FILE=0 make r0 |