Skip to content

Fix cbor serialization overhead #1898

Fix cbor serialization overhead

Fix cbor serialization overhead #1898

name: build-and-test-rust-projects
on:
push:
branches:
- testnet
- staging
pull_request:
branches: ["*"]
paths:
- "crates/**"
- "aggregation_mode/**"
- ".github/workflows/build-and-test-rust.yml"
jobs:
build:
runs-on: aligned-runner
env:
CARGO_INCREMENTAL: 0
steps:
- uses: actions/checkout@v4
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: 1.86.0
components: rustfmt, clippy
override: true
- name: Install sp1 toolchain
run: |
curl -L https://sp1.succinct.xyz | bash
source /home/runner/.bashrc
~/.sp1/bin/sp1up
- name: Install risc0 toolchain
run: |
curl -L https://risczero.com/install | bash
source ~/.bashrc
~/.risc0/bin/rzup install
- name: Cache Rust dependencies
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-rust-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-rust-
- name: Clean build dir
run: rm -rf crates/target
- name: Check formatting
run: |
cd crates
cargo fmt --all -- --check
- name: Run Clippy
run: |
cd crates
cargo clippy --all -- -D warnings
- name: Build Batcher
run: |
cd crates
cargo build --all -vv
- name: Check formatting of AggregationMode
run: |
cd aggregation_mode
cargo fmt --all -- --check
- name: Build AggregationMode
run: |
cd aggregation_mode
cargo build --all -vv
- name: Run Clippy on AggregationMode
run: |
cd aggregation_mode
RISC0_SKIP_BUILD=1 cargo clippy --all -- -D warnings
test:
runs-on: aligned-runner
needs: build
env:
CARGO_INCREMENTAL: 0
steps:
- uses: actions/checkout@v4
- name: foundry-toolchain
uses: foundry-rs/foundry-toolchain@v1.2.0
- name: Install sp1 toolchain
run: |
curl -L https://sp1.succinct.xyz | bash
source /home/runner/.bashrc
~/.sp1/bin/sp1up
- name: Install risc0 toolchain
run: |
curl -L https://risczero.com/install | bash
source ~/.bashrc
~/.risc0/bin/rzup install
- name: Cache Rust dependencies
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-rust-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-rust-
- name: Clean build dir
run: rm -rf crates/target
- name: Run Batcher tests
run: |
cd crates
cargo test --all -vv
- name: Run AggregationMode tests
run: |
cd aggregation_mode
cargo test --all -vv