forked from databendlabs/openraft
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
58 lines (44 loc) · 1.67 KB
/
Copy pathMakefile
File metadata and controls
58 lines (44 loc) · 1.67 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
all: test lint fmt defensive_test send_delay_test doc
defensive_test:
OPENRAFT_STORE_DEFENSIVE=on cargo test
send_delay_test:
OPENRAFT_NETWORK_SEND_DELAY=30 cargo test
test: lint fmt
cargo test
cargo test --features bt
cargo test --features serde
cargo test --manifest-path examples/raft-kv-memstore/Cargo.toml
cargo test --manifest-path examples/raft-kv-rocksdb/Cargo.toml
bench:
cargo bench --features bench
bench_cluster_of_1:
cargo test --package openraft --test benchmark --release bench_cluster_of_1 -- --ignored --nocapture
bench_cluster_of_3:
cargo test --package openraft --test benchmark --release bench_cluster_of_3 -- --ignored --nocapture
bench_cluster_of_5:
cargo test --package openraft --test benchmark --release bench_cluster_of_5 -- --ignored --nocapture
fmt:
cargo fmt
fix:
cargo fix --allow-staged
doc:
RUSTDOCFLAGS="-D warnings" cargo doc --all --no-deps
guide:
mdbook build
@echo "doc is built in:"
@echo "./guide/book/index.html"
lint:
cargo fmt
cargo fmt --manifest-path examples/raft-kv-memstore/Cargo.toml
cargo fmt --manifest-path examples/raft-kv-rocksdb/Cargo.toml
cargo clippy --all-targets -- -D warnings
cargo clippy --manifest-path examples/raft-kv-memstore/Cargo.toml --all-targets -- -D warnings
cargo clippy --manifest-path examples/raft-kv-rocksdb/Cargo.toml --all-targets -- -D warnings
# Bug: clippy --all-targets reports false warning about unused dep in
# `[dev-dependencies]`:
# https://github.com/rust-lang/rust/issues/72686#issuecomment-635539688
# Thus we only check unused deps for lib
RUSTFLAGS=-Wunused-crate-dependencies cargo clippy --lib -- -D warnings
clean:
cargo clean
.PHONY: test fmt lint clean doc guide