77 branches : ["*"]
88 paths :
99 - " batcher/**"
10+ - " aggregation_mode/**"
1011 - " .github/workflows/build-rust.yml"
1112
1213jobs :
2223 toolchain : stable
2324 components : rustfmt, clippy
2425 override : true
26+
27+ # Reference: https://github.com/succinctlabs/sp1/actions/runs/8886659400/workflow#L61-L65
28+ - name : Install sp1 toolchain
29+ run : |
30+ curl -L https://sp1.succinct.xyz | bash
31+ source /home/runner/.bashrc
32+ ~/.sp1/bin/sp1up
33+
2534 - name : Cache Rust dependencies
2635 uses : actions/cache@v3
2736 with :
@@ -32,27 +41,54 @@ jobs:
3241 key : ${{ runner.os }}-rust-${{ hashFiles('**/Cargo.lock') }}
3342 restore-keys : |
3443 ${{ runner.os }}-rust-
35- - name : Check formatting of Rust projects
44+
45+ - name : Check formatting of Batcher
3646 run : |
3747 cd batcher
3848 cargo fmt --all -- --check
39- - name : Run Clippy
49+
50+ - name : Run Clippy on Batcher
4051 run : |
4152 cd batcher
4253 cargo clippy --all -- -D warnings
43- - name : Build Rust projects
54+
55+ - name : Build Batcher
4456 run : |
4557 cd batcher
4658 cargo build --all
4759
60+ - name : Check formatting of AggregationMode
61+ run : |
62+ cd aggregation_mode
63+ cargo fmt --all -- --check
64+
65+ - name : Build AggregationMode # We build before clippy to generate the ELF
66+ run : |
67+ cd aggregation_mode
68+ cargo build --all
69+
70+ - name : Run Clippy on AggregationMode
71+ run : |
72+ cd aggregation_mode
73+ cargo clippy --all -- -D warnings
74+
4875 test :
4976 runs-on : aligned-runner
5077 needs : build
5178 steps :
5279 - name : Checkout code
5380 uses : actions/checkout@v4
81+
5482 - name : foundry-toolchain
5583 uses : foundry-rs/foundry-toolchain@v1.2.0
84+
85+ # Reference: https://github.com/succinctlabs/sp1/actions/runs/8886659400/workflow#L61-L65
86+ - name : Install sp1 toolchain
87+ run : |
88+ curl -L https://sp1.succinct.xyz | bash
89+ source /home/runner/.bashrc
90+ ~/.sp1/bin/sp1up
91+
5692 - name : Cache Rust dependencies
5793 uses : actions/cache@v3
5894 with :
6399 key : ${{ runner.os }}-rust-${{ hashFiles('**/Cargo.lock') }}
64100 restore-keys : |
65101 ${{ runner.os }}-rust-
66- - name : Run tests
102+
103+ - name : Run Batcher tests
67104 run : |
68105 cd batcher
69106 cargo test --all
107+
108+ - name : Run AggregationMode tests
109+ run : |
110+ cd aggregation_mode
111+ cargo test --all
0 commit comments