forked from celo-org/kona
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
129 lines (103 loc) · 3.88 KB
/
justfile
File metadata and controls
129 lines (103 loc) · 3.88 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
# E2e integration tests for kona.
import "./tests/justfile"
# Builds docker images for kona
import "./docker/apps/justfile"
# Vocs Documentation commands
import "./docs/justfile"
set positional-arguments
alias t := tests
alias la := lint-all
alias l := lint-native
alias lint := lint-native
alias f := fmt-native-fix
alias b := build-native
alias h := hack
# default recipe to display help information
default:
@just --list
# Build the rollup node in a single command.
build-node:
cargo build --release --bin kona-node
# Build the supervisor
build-supervisor:
cargo build --release --bin kona-supervisor
# Run all tests (excluding online tests)
tests: test test-docs
# Test for the native target with all features. By default, excludes online tests.
test *args="-E '!test(test_online)'":
cargo nextest run --workspace --all-features {{args}}
# Run all online tests
test-online:
just test "-E 'test(test_online)'"
# Runs the tests with llvm-cov
llvm-cov-tests:
cargo llvm-cov nextest --locked --workspace --lcov \
--output-path lcov.info --all-features \
--exclude kona-node --exclude kona-p2p --exclude kona-sources \
--ignore-run-fail --profile ci -E '!test(test_online)'
# Runs benchmarks
benches:
cargo bench --no-run --workspace --features test-utils --exclude example-gossip --exclude example-discovery
# Lint the workspace for all available targets
lint-all: lint-native lint-cannon lint-asterisc lint-docs lint-typos
# Check spelling with typos (`cargo install typos-cli`)
lint-typos:
typos
# Runs `cargo hack check` against the workspace
hack:
cargo hack check --feature-powerset --no-dev-deps
# Fixes the formatting of the workspace
fmt-native-fix:
cargo +nightly fmt --all
# Check the formatting of the workspace
fmt-native-check:
cargo +nightly fmt --all -- --check
# Lint the workspace
lint-native: fmt-native-check lint-docs
cargo clippy --workspace --all-features --all-targets -- -D warnings
# Lint the workspace (mips arch). Currently, only the `kona-std-fpvm` crate is linted for the `cannon` target, as it is the only crate with architecture-specific code.
lint-cannon:
docker run \
--rm \
-v `pwd`/:/workdir \
-w="/workdir" \
ghcr.io/op-rs/kona/cannon-builder:0.3.0 cargo clippy -p kona-std-fpvm --all-features -Zbuild-std=core,alloc -- -D warnings
# Lint the workspace (risc-v arch). Currently, only the `kona-std-fpvm` crate is linted for the `asterisc` target, as it is the only crate with architecture-specific code.
lint-asterisc:
docker run \
--rm \
-v `pwd`/:/workdir \
-w="/workdir" \
ghcr.io/op-rs/kona/asterisc-builder:0.3.0 cargo clippy -p kona-std-fpvm --all-features -Zbuild-std=core,alloc -- -D warnings
# Lint the Rust documentation
lint-docs:
RUSTDOCFLAGS="-D warnings" cargo doc --workspace --no-deps --document-private-items
# Test the Rust documentation
test-docs:
cargo test --doc --workspace --locked
# Build for the native target
build-native *args='':
cargo build --workspace $@
# Build `kona-client` for the `cannon` target.
build-cannon-client:
docker run \
--rm \
-v `pwd`/:/workdir \
-w="/workdir" \
ghcr.io/op-rs/kona/cannon-builder:0.3.0 cargo build -Zbuild-std=core,alloc -p kona-client --bin kona-client --profile release-client-lto
# Build `kona-client` for the `asterisc` target.
build-asterisc-client:
docker run \
--rm \
-v `pwd`/:/workdir \
-w="/workdir" \
ghcr.io/op-rs/kona/asterisc-builder:0.3.0 cargo build -Zbuild-std=core,alloc -p kona-client --bin kona-client --profile release-client-lto
# Check for unused dependencies in the crate graph.
check-udeps:
cargo +nightly udeps --workspace --all-features --all-targets
# Updates the `superchain-registry` git submodule source
source-registry:
@just --justfile ./crates/protocol/registry/justfile source
# Generate file bindings for super-registry
bind-registry:
@just --justfile ./crates/protocol/registry/justfile bind