forked from versatus/versatus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
95 lines (75 loc) · 2.29 KB
/
Makefile
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
# The default make command.
DEFAULT = help
# Use 'VERBOSE=1' to echo all commands, for example 'make help VERBOSE=1'.
ifdef VERBOSE
Q :=
else
Q := @
endif
.PHONY: \
clean \
run \
test \
bench \
watch
all: $(DEFAULT)
help:
$(Q)echo "VRRB Dev CLI - v0.0.1"
$(Q)echo "make run - Runs main executable"
$(Q)echo "make build - Builds the main executable"
$(Q)echo "make build-dev - Builds a debug version of the main executable"
$(Q)echo "make test - Tests all crates"
$(Q)echo "make lint - Runs clippy and formatter"
$(Q)echo "make fmt - Runs formatter"
$(Q)echo "make bench - Benchmarks all crates"
$(Q)echo "make dev - Alias for 'make watch'"
$(Q)echo "make watch - Runs main executable in hot-reloading mode for development"
$(Q)echo "make clean - Deletes binaries and documentation."
$(Q)echo "make ci-build - Builds a container for the Node runtime."
$(Q)echo "make ci-run - Builds and runs a container for the Node runtime."
$(Q)echo "make ci-run-d - Builds and runs a container for the Node runtime in dettached mode."
build:
$(Q)cargo build --release
$(Q)echo "--- Done"
build-dev:
$(Q)cargo build
$(Q)echo "--- Done"
ci-build:
$(Q)sh infra/scripts/build-ci.sh
$(Q)echo "--- Done"
ci-run: ci-build
$(Q)docker run --rm --name vrrb-node ghcr.io/vrrb-io/vrrb
$(Q)echo "--- Done"
ci-run-d:
$(Q)docker run -d --name vrrb-node ghcr.io/vrrb-io/vrrb
$(Q)echo "--- Done"
clean: clean-ui
$(Q)cargo clean
$(Q)echo "--- Deleted binaries and documentation"
clean-ui:
$(Q)rm -rf infra/gui/node_modules infra/gui/.next
$(Q)echo "--- Deleted UI build artifacts"
run:
# TODO: consider replacing with env aware script instead
$(Q)sh infra/scripts/run_test_node.sh
$(Q)echo "--- Done"
run-test-cluster:
$(Q)sh infra/scripts/run_test_node.sh
$(Q)echo "--- Done"
test:
$(Q)sh infra/scripts/run_tests.sh
$(Q)echo "--- Executed tests on all crates"
lint:
$(Q)sh infra/scripts/run_lints.sh
$(Q)echo "--- Ran all lints and formatters"
fmt:
$(Q)cargo +nightly fmt --all
$(Q)echo "--- Ran formatter"
dev: watch
watch:
$(Q)sh infra/scripts/watch.sh
$(Q)echo "--- Done"
buf-gen:
$(Q) buf generate infra/proto
buf-push:
$(Q) buf generate infra/proto