forked from privacy-scaling-explorations/zkevm-circuits
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
83 lines (57 loc) · 3.73 KB
/
Makefile
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
CARGO = cargo
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Darwin)
CARGO += --config 'build.rustdocflags = ["-C", "link-args=-framework CoreFoundation -framework Security"]'
endif
help: ## Display this help screen
@grep -h \
-E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | \
awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
clippy: ## Run clippy checks over all workspace members
@cargo check --all-features
@cargo clippy --all-features --all-targets -- -D warnings
doc: ## Generate and tests docs including private items
@cargo doc --no-deps --all --document-private-items
fmt: ## Check whether the code is formatted correctly
@cargo check --all-features
@cargo fmt --all -- --check
test: ## Run tests for all the workspace members
# Run light tests
@cargo test --release --all --all-features --exclude integration-tests --exclude circuit-benchmarks
# Run heavy tests serially to avoid OOM
@cargo test --release --all --all-features --exclude integration-tests --exclude circuit-benchmarks serial_ -- --ignored --test-threads 1
test_doc: ## Test the docs
@$(CARGO) test --release --all --all-features --doc
test_benches: ## Compiles the benchmarks
@cargo test --verbose --release --all-features -p circuit-benchmarks --no-run
test-all: fmt doc clippy test_doc test_benches test ## Run all the CI checks locally (in your actual toolchain)
super_bench: ## Run Super Circuit benchmarks
@cargo test --profile bench bench_super_circuit_prover -p circuit-benchmarks --features benches -- --nocapture
evm_bench: ## Run Evm Circuit benchmarks
@cargo test --profile bench bench_evm_circuit_prover -p circuit-benchmarks --features benches -- --nocapture
state_bench: ## Run State Circuit benchmarks
@cargo test --profile bench bench_state_circuit_prover -p circuit-benchmarks --features benches -- --nocapture
mpt_bench: ## Run MPT Circuit benchmarks
@cargo test --profile bench bench_mpt_circuit_prover -p circuit-benchmarks --features benches -- --nocapture
packed_multi_keccak_bench: ## Run Packed Multi Keccak Circuit benchmarks
@cargo test --profile bench bench_packed_multi_keccak_circuit_prover -p circuit-benchmarks --features benches -- --nocapture
bytecode_bench: ## Run Bytecode Circuit benchmarks
@cargo test --profile bench bench_bytecode_circuit_prover -p circuit-benchmarks --features benches -- --nocapture
pi_bench: ## Run Public Input Circuit benchmarks
@cargo test --profile bench bench_pi_circuit_prover -p circuit-benchmarks --features benches -- --nocapture
copy_bench: ## Run Copy Circuit benchmarks
@cargo test --profile bench bench_copy_circuit_prover -p circuit-benchmarks --features benches -- --nocapture
tx_bench: ## Run Tx Circuit benchmarks
@cargo test --profile bench bench_tx_circuit_prover -p circuit-benchmarks --features benches -- --nocapture
exp_bench: ## Run Exp Circuit benchmarks
@cargo test --profile bench bench_exp_circuit_prover -p circuit-benchmarks --features benches -- --nocapture
circuit_benches: evm_bench state_bench ## Run All Circuit benchmarks
stats_state_circuit: # Print a table with State Circuit stats by ExecState/opcode
@cargo run --bin stats --features stats -- state
stats_evm_circuit: # Print a table with EVM Circuit stats by ExecState/opcode
@cargo run --bin stats --features stats -- evm
stats_copy_circuit: # Print a table with Copy Circuit stats by ExecState/opcode
@cargo run --bin stats --features stats -- copy
evm_exec_steps_occupancy: # Print a table for each EVM-CellManager CellType with the top 10 occupancy ExecSteps associated
@cargo run --bin stats --features stats -- exec
.PHONY: clippy doc fmt test test_benches test-all evm_bench state_bench circuit_benches evm_exec_steps_occupancy stats_state_circuit stats_evm_circuit stats_copy_circuit help