Skip to content

Commit df0d54a

Browse files
committed
Fix
1 parent c884fc9 commit df0d54a

File tree

1 file changed

+58
-1
lines changed

1 file changed

+58
-1
lines changed

.github/workflows/build-and-test-rust.yml

Lines changed: 58 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,50 @@ on:
1313
- ".github/workflows/build-and-test-rust.yml"
1414

1515
jobs:
16+
build:
17+
runs-on: aligned-runner
18+
19+
steps:
20+
- uses: actions/checkout@v4
21+
22+
- name: Set up Rust
23+
uses: actions-rs/toolchain@v1
24+
with:
25+
toolchain: 1.86.0
26+
components: rustfmt, clippy
27+
override: true
28+
29+
- name: Cache Rust dependencies
30+
uses: actions/cache@v3
31+
with:
32+
path: |
33+
~/.cargo/registry
34+
~/.cargo/git
35+
crates/target
36+
key: ${{ runner.os }}-rust-${{ hashFiles('**/Cargo.lock') }}
37+
restore-keys: |
38+
${{ runner.os }}-rust-
39+
40+
- name: Build Batcher
41+
run: |
42+
cd crates
43+
cargo build --all
44+
45+
- name: Check formatting of AggregationMode
46+
run: |
47+
cd aggregation_mode
48+
cargo fmt --all -- --check
49+
50+
- name: Build AggregationMode # We build before clippy to generate the ELF
51+
run: |
52+
cd aggregation_mode
53+
cargo build --all
54+
55+
- name: Run Clippy on AggregationMode
56+
run: |
57+
cd aggregation_mode
58+
# We need to skip the build as clippy does not support the riscv32im-risc0-zkvm-elf target
59+
RISC0_SKIP_BUILD=1 cargo clippy --all -- -D warnings
1660
1761
test:
1862
runs-on: aligned-runner
@@ -24,6 +68,19 @@ jobs:
2468
- name: foundry-toolchain
2569
uses: foundry-rs/foundry-toolchain@v1.2.0
2670

71+
# Reference: https://github.com/succinctlabs/sp1/actions/runs/8886659400/workflow#L61-L65
72+
- name: Install sp1 toolchain
73+
run: |
74+
curl -L https://sp1.succinct.xyz | bash
75+
source /home/runner/.bashrc
76+
~/.sp1/bin/sp1up
77+
78+
- name: Install risc0 toolchain
79+
run: |
80+
curl -L https://risczero.com/install | bash
81+
source ~/.bashrc
82+
~/.risc0/bin/rzup install
83+
2784
- name: Cache Rust dependencies
2885
uses: actions/cache@v3
2986
with:
@@ -44,7 +101,7 @@ jobs:
44101
echo "=== searching for try_build_batch in expanded.rs ==="
45102
rg -n 'fn\s+try_build_batch' expanded.rs || true
46103
rg -n '__exposed_try_build_batch_for_tests' expanded.rs || true
47-
104+
48105
- name: Run Batcher tests
49106
run: |
50107
cd crates

0 commit comments

Comments
 (0)