-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathJustfile
More file actions
102 lines (80 loc) · 2.47 KB
/
Copy pathJustfile
File metadata and controls
102 lines (80 loc) · 2.47 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
set positional-arguments
alias t := test
alias f := fix
alias b := build
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, clippy, and tests
check: check-format check-clippy test
# 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
cargo +nightly fmt --all
# Checks clippy
check-clippy:
cargo clippy --all-targets -- -D warnings
# Fixes any clippy issues
clippy-fix:
cargo clippy --all-targets --fix --allow-dirty --allow-staged
# Builds the workspace with release
build:
cargo build --release
# Builds all targets in debug mode
build-all-targets:
cargo build --all-targets
# Builds the workspace with maxperf
build-maxperf:
cargo build --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/test-utils/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
# 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