forked from brevis-network/pico
-
Notifications
You must be signed in to change notification settings - Fork 0
255 lines (242 loc) · 8.56 KB
/
Copy pathrust.yml
File metadata and controls
255 lines (242 loc) · 8.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
on:
pull_request:
branches:
- main
- release/v*
paths-ignore:
- 'docs/**'
- 'README.md'
- '.gitignore'
- 'Makefile'
- 'tools/**'
- 'scripts/**'
name: Check, Test, and Format
env:
VK_VERIFICATION: false
jobs:
fmt:
if: true
name: Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2025-08-04
override: true
- run: rustup component add rustfmt
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
lint:
if: true
name: Lint
runs-on: ubuntu-latest
steps:
- name: Configure git for private repo
run: |
git config --global url."https://${{ secrets.GH_TOKEN }}:@github.com/".insteadOf "https://github.com/"
- name: Checkout sources
uses: actions/checkout@v4
- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2025-08-04
override: true
- run: rustup component add clippy
- name: Rust cache
uses: Swatinem/rust-cache@v2
- name: Clippy (workspace, exclude pico-sdk)
run: |
cargo clippy --workspace --lib --examples --tests --benches --all-features --locked --exclude pico-sdk -- -D warnings
- name: Clippy pico-sdk
run: |
set -eux
for FIELD in bb kb m31; do
cargo clippy -p pico-sdk \
--no-default-features \
--features "$FIELD,prover,libm,coprocessor" \
--locked -- -D warnings
done
test:
if: true
name: Tests
runs-on: ubuntu-latest
steps:
- name: Configure git for private repo
run: |
git config --global url."https://${{ secrets.GH_TOKEN }}:@github.com/".insteadOf "https://github.com/"
- name: Checkout sources
uses: actions/checkout@v4
- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2025-08-04
override: true
- name: Rust cache
uses: Swatinem/rust-cache@v2
- name: Cargo run examples
run: |
RUST_LOG=info FRI_QUERIES=1 cargo run --release --example toy_simple_machine
RUST_LOG=info FRI_QUERIES=1 cargo run --release --example test_riscv_emulator
RUST_LOG=info FRI_QUERIES=1 cargo run --release --example test_proverchain
- name: Check single threaded build
run: |
cargo build -p pico-vm --no-default-features --features=strict
kb-tests:
if: true
name: KoalaBear tests
runs-on: ubuntu-latest
steps:
- name: Configure git for private repo
run: |
git config --global url."https://${{ secrets.GH_TOKEN }}:@github.com/".insteadOf "https://github.com/"
- name: Checkout sources
uses: actions/checkout@v4
- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2025-08-04
override: true
- name: Rust cache
uses: Swatinem/rust-cache@v2
- name: Cargo run examples
run: |
# KB basic tests
RUST_LOG=info FRI_QUERIES=1 cargo run --release --example test_simple_recursion -- --elf keccak --n 15 --field kb
RUST_LOG=info FRI_QUERIES=1 cargo run --release --example test_riscv -- --elf precompile --field kb
RUST_LOG=info FRI_QUERIES=1 cargo run --release --example test_riscv -- --elf poseidon2 --field kb --n 1066971790
# KB e2e test and copy the final STARK proof for later test
RUST_LOG=info FRI_QUERIES=1 cargo run --release --example test_e2e -- --field kb
cp constraints.json gnark/koalabear_verifier/
cp groth16_witness.json gnark/koalabear_verifier/
- name: Compile field ffi so
run: |
cargo build --release --package field-ffi
sudo mv ./target/release/libfield_ffi.so /usr/lib/
- uses: actions/setup-go@v5
with:
go-version: '1.22'
- name: Gnark verification
run: |
cd gnark/koalabear_verifier/
go test -timeout 70s -run TestSolveVerifierCircuit
bb-tests:
if: true
name: BabyBear tests
runs-on: ubuntu-latest
steps:
- name: Configure git for private repo
run: |
git config --global url."https://${{ secrets.GH_TOKEN }}:@github.com/".insteadOf "https://github.com/"
- name: Checkout sources
uses: actions/checkout@v4
- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2025-08-04
override: true
- name: Rust cache
uses: Swatinem/rust-cache@v2
- name: Cargo run examples
run: |
# BB basic tests
RUST_LOG=info FRI_QUERIES=1 cargo run --release --example test_simple_recursion -- --elf keccak --n 15 --field bb
RUST_LOG=info FRI_QUERIES=1 cargo run --release --example test_riscv -- --elf precompile --field bb
RUST_LOG=info FRI_QUERIES=1 cargo run --release --example test_riscv -- --elf poseidon2 --field bb --n 1071209047
# BB e2e test and copy the final STARK proof for later test
RUST_LOG=info FRI_QUERIES=1 cargo run --release --example test_e2e -- --field bb
cp constraints.json gnark/babybear_verifier/
cp groth16_witness.json gnark/babybear_verifier/
- name: Compile field ffi so
run: |
cargo build --release --package field-ffi
sudo mv ./target/release/libfield_ffi.so /usr/lib/
- uses: actions/setup-go@v5
with:
go-version: '1.22'
- name: Gnark verification
run: |
cd gnark/babybear_verifier/
go test -timeout 70s -run TestSolveVerifierCircuit
m31-tests:
if: true
name: Mersenne31 tests
runs-on: ubuntu-latest
steps:
- name: Configure git for private repo
run: |
git config --global url."https://${{ secrets.GH_TOKEN }}:@github.com/".insteadOf "https://github.com/"
- name: Checkout sources
uses: actions/checkout@v4
- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2025-08-04
override: true
- name: Rust cache
uses: Swatinem/rust-cache@v2
- name: Cargo run examples
run: |
# M31 basic tests
# TODO: restart these tests once the m31 prover is actually fixed
# RUST_LOG=info FRI_QUERIES=1 cargo run --release --example test_riscv -- --field m31
# RUST_LOG=info FRI_QUERIES=1 cargo run --release --example test_riscv -- --elf precompile --field m31
# RUST_LOG=info FRI_QUERIES=1 cargo run --release --example test_riscv -- --elf poseidon2 --field m31 --n 2118082624
riscof:
if: true
name: RISCOF Arch Tests
runs-on: ubuntu-latest
steps:
- name: Configure git for private repo
run: |
git config --global url."https://${{ secrets.GH_TOKEN }}:@github.com/".insteadOf "https://github.com/"
- name: Checkout pico sources
uses: actions/checkout@v4
with:
path: pico
- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2025-08-04
override: true
- name: Rust cache
uses: Swatinem/rust-cache@v2
with:
workspaces: pico
- name: Build pico-cli
run: |
cd pico
cargo build --release -p pico-cli
- name: Checkout zkevm-test-monitor
uses: actions/checkout@v4
with:
repository: eth-act/zkevm-test-monitor
path: zkevm-test-monitor
- name: Setup pico binary for RISCOF
run: |
mkdir -p zkevm-test-monitor/binaries
cp pico/target/release/cargo-pico zkevm-test-monitor/binaries/pico-binary
chmod +x zkevm-test-monitor/binaries/pico-binary
- name: Run RISCOF arch tests
run: |
cd zkevm-test-monitor
./src/test.sh --arch pico
- name: Display test results
if: always()
run: |
cd zkevm-test-monitor
if [ -f "test-results/pico/summary-arch.json" ]; then
echo "📊 RISCOF Test Results:"
cat test-results/pico/summary-arch.json | jq '.'
else
echo "⚠️ No test results found"
fi