-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJustfile
More file actions
125 lines (97 loc) · 3.24 KB
/
Copy pathJustfile
File metadata and controls
125 lines (97 loc) · 3.24 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
set positional-arguments := true
alias t := test
alias f := fix
alias b := build
alias be := benches
alias c := clean
alias h := hack
alias u := check-udeps
alias wt := watch-test
alias wc := watch-check
# Default to display help menu
default:
@just --list
# Runs all ci checks
ci: fix check lychee zepter
# Performs lychee checks, installing the lychee command if necessary
lychee:
@command -v lychee >/dev/null 2>&1 || cargo install lychee
lychee --config ./lychee.toml .
# Checks formatting, udeps, clippy, and tests
check: check-format check-udeps check-clippy test check-deny
# Runs cargo deny to check dependencies
check-deny:
@command -v cargo-deny >/dev/null 2>&1 || cargo install cargo-deny
cargo deny check bans --hide-inclusion-graph
# Fixes formatting and clippy issues
fix: format-fix clippy-fix zepter-fix
# Runs zepter feature checks, installing zepter if necessary
zepter:
@command -v zepter >/dev/null 2>&1 || cargo install zepter
zepter --version
zepter format features
zepter
# Fixes zepter feature formatting.
zepter-fix:
@command -v zepter >/dev/null 2>&1 || cargo install zepter
zepter format features --fix
# Runs tests across workspace with all features enabled
test: build-contracts
@command -v cargo-nextest >/dev/null 2>&1 || cargo install cargo-nextest
RUSTFLAGS="-D warnings" cargo nextest run --workspace --all-features
# Runs cargo hack against the workspace
hack:
cargo hack check --feature-powerset --no-dev-deps
# Checks formatting
check-format:
cargo +nightly fmt --all -- --check
# Fixes any formatting issues
format-fix:
cargo fix --allow-dirty --allow-staged --workspace
cargo +nightly fmt --all
# Checks clippy
check-clippy: build-contracts
cargo clippy --workspace --all-targets -- -D warnings
# Fixes any clippy issues
clippy-fix:
cargo clippy --workspace --all-targets --fix --allow-dirty --allow-staged
# Builds the workspace with release
build:
cargo build --workspace --release
# Builds all targets in debug mode
build-all-targets: build-contracts
cargo build --workspace --all-targets
# Builds the workspace with maxperf
build-maxperf:
cargo build --workspace --profile maxperf --features jemalloc
# Builds the base node binary
build-node:
cargo build --bin base-reth-node
# Build the contracts used for tests
build-contracts:
cd crates/shared/primitives/contracts && forge build
# Cleans the workspace
clean:
cargo clean
# Checks if there are any unused dependencies
check-udeps: build-contracts
@command -v cargo-udeps >/dev/null 2>&1 || cargo install cargo-udeps
cargo +nightly udeps --workspace --all-features --all-targets
# Checks that shared crates don't depend on client crates
check-crate-deps:
./scripts/check-crate-deps.sh
# Watches tests
watch-test: build-contracts
cargo watch -x test
# Watches checks
watch-check:
cargo watch -x "fmt --all -- --check" -x "clippy --all-targets -- -D warnings" -x test
# Runs all benchmarks
benches:
@just bench-flashblocks
# Runs flashblocks pending state benchmarks
bench-flashblocks:
cargo bench -p base-flashblocks --bench pending_state
# Builds tester binary (requires testing feature)
build-tester:
cargo build -p op-rbuilder --bin tester --features "testing"