forked from eth-act/zkevm-test-monitor
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun
More file actions
executable file
·99 lines (88 loc) · 2.99 KB
/
Copy pathrun
File metadata and controls
executable file
·99 lines (88 loc) · 2.99 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
#!/bin/bash
# run - Main entry point for ZKVM testing
set -e
CMD=${1:-help}
shift || true
case "$CMD" in
build)
echo "Building ZKVMs: ${@:-all}"
./src/build.sh "$@"
;;
test)
DISPLAY_TARGETS="${@:-all}"
echo "Testing ZKVMs: ${DISPLAY_TARGETS}"
./src/test.sh "$@"
;;
all)
DISPLAY_TARGETS="${@:-all}"
echo "Building and testing: ${DISPLAY_TARGETS}"
./src/build.sh "$@"
./src/test.sh "$@"
;;
serve)
echo "Server at http://0.0.0.0:9586/"
echo " Press Ctrl+C to stop"
cd docs && python3 -c "
import http.server
class H(http.server.SimpleHTTPRequestHandler):
def end_headers(self):
self.send_header('Cache-Control', 'no-cache, no-store, must-revalidate')
super().end_headers()
http.server.HTTPServer(('0.0.0.0', 9586), H).serve_forever()
"
;;
clean)
TARGETS="${@:-all}"
if [ "$TARGETS" = "all" ]; then
echo "Cleaning all artifacts"
ZKVMS=""
for dir in test-results/*/; do
[ -d "$dir" ] && ZKVMS="$ZKVMS $(basename "$dir")"
done
else
echo "Cleaning artifacts for: $TARGETS"
ZKVMS="$TARGETS"
fi
for zkvm in $ZKVMS; do
if [ -d "test-results/$zkvm/elfs" ]; then
docker run --rm -v "$PWD/test-results/$zkvm/elfs:/elfs" ubuntu:24.04 rm -rf /elfs/native /elfs/target 2> /dev/null || true
fi
rm -rf "test-results/$zkvm"
rm -f "binaries/${zkvm}-binary"
if [ "$zkvm" = "zisk" ]; then
rm -f binaries/cargo-zisk binaries/cargo-zisk-cuda binaries/libzisk_witness.so
rm -rf binaries/zisk-lib
fi
done
if [ "$TARGETS" = "all" ]; then
rm -f act4-runner/target/release/act4-runner
fi
;;
*)
cat << EOF
Usage: ./run COMMAND [OPTIONS]
Commands:
build [zkvm ...] Build ZKVM binaries
test [zkvm ...] Run ACT4 compliance tests
all [zkvm ...] Build + test
serve Start local web server at 0.0.0.0:9586
clean [zkvm ...] Remove build artifacts (all or specific ZKVMs)
Environment Variables:
JOBS=N Limit to N CPU cores
ACT4_JOBS=N Override parallel test jobs inside container
FORCE=1 Force regeneration of ELFs / rebuild of binaries
ZISK_MODE=execute|prove|full Zisk test mode (default: full)
GPU=1 Build/use GPU variants for Zisk proving
Examples:
./run build sp1
./run test sp1 jolt
./run test # test all ZKVMs
./run all
JOBS=8 ./run test zisk
ZISK_MODE=execute ./run test zisk # zisk emulation only (no proving)
GPU=1 ./run build zisk # build with GPU support
GPU=1 ./run test zisk # use GPU for proving
FORCE=1 ./run test zisk # regenerate ELFs from scratch
EOF
;;
esac