Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
91 lines (69 loc) · 1.67 KB
/
Copy pathMakefile
File metadata and controls
91 lines (69 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
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
CARGO := cargo
# Publish order (topological by internal deps)
CRATES := \
hotmint-types \
hotmint-mempool \
hotmint-crypto \
hotmint-mgmt \
hotmint-consensus \
hotmint-abci-proto \
hotmint-abci \
hotmint-staking \
hotmint-network \
hotmint-storage \
hotmint-light \
hotmint-api \
hotmint
.PHONY: all fmt lint build test bench bench-e2e bench-consensus bench-utxo bench-all run clean check doc update publish
all: fmt lint build test _doc
fmt:
$(CARGO) fmt --all
lint:
$(CARGO) clippy --workspace --all-targets -- -D warnings
build:
$(CARGO) build --workspace
test:
$(CARGO) test --workspace
bench:
$(CARGO) bench --workspace
bench-e2e:
@echo "bench-e2e has been replaced by bench-consensus (see nbnet for bench-nbnet)"
bench-consensus:
$(CARGO) run --release -p bench-consensus
bench-ipc:
$(CARGO) run --release -p bench-ipc
bench-utxo:
$(CARGO) run --release -p utxo-chain-example --bin bench-utxo
bench-all: bench-consensus bench-utxo bench-ipc
run:
$(CARGO) run --bin hotmint-node -- node
demo:
$(CARGO) run -p hotmint-demo
init:
$(CARGO) run --bin hotmint-node -- init
check:
$(CARGO) check --workspace --all-targets
doc:
$(CARGO) doc --workspace --no-deps --open
_doc:
$(CARGO) doc --workspace --no-deps
clean:
$(CARGO) clean
update:
$(CARGO) update
publish:
@for crate in $(CRATES); do \
printf "Publishing $$crate... "; \
output=$$($(CARGO) publish -p $$crate 2>&1); \
status=$$?; \
if [ $$status -eq 0 ]; then \
echo "ok"; \
sleep 2; \
elif echo "$$output" | grep -qE "already uploaded|already exists"; then \
echo "skipped (already published)"; \
else \
echo "FAILED"; \
echo "$$output"; \
exit 1; \
fi; \
done