-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
65 lines (50 loc) · 1.36 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
# Example plugins directory path
EXAMPLES_DIR ?= examples
# Cargo profile for builds. Default is for local builds, CI uses an override.
PROFILE ?= release
#@ common
.PHONY: build
build:
make build-lib && \
make build-examples
.PHONY: fix
fix: ## Lint & fmt for all example plugins and `reth-exex-plugin` lib
make lint && \
make fmt
.PHONY: fmt
fmt:
make fmt-lib &&\
make fmt-examples
.PHONY: lint
lint:
make lint-lib &&\
make lint-examples
.PHONY: test
test: ## tests from whole `reth-exex-plugin` crate (included doc tests also).
cargo test -- --nocapture
.PHONY: clean
clean: ## cleanup for /target directory on all example plugins and `reth-exex-plugin` lib.
cargo clean && \
cd $(EXAMPLES_DIR)/minimal && \
cargo clean
#@ `reth-exex-plugin` lib
build-lib: ## Build the `reth-exex-plugin` lib & bin into a `/target` directory.
cargo build --profile "$(PROFILE)"
fmt-lib:
cargo +nightly fmt --all
lint-lib:
cargo +nightly clippy \
--all-features \
-- -D warnings
#@ example plugins
build-examples: ## Build the `/examples/minimal` plugin dylib file(s) into a `examples/minimal/target` directory.
cd $(EXAMPLES_DIR)/minimal && \
cargo build --profile "$(PROFILE)"
fmt-examples:
cd $(EXAMPLES_DIR)/minimal && \
cargo +nightly fmt --all
lint-examples:
cd $(EXAMPLES_DIR)/minimal && \
cargo +nightly clippy \
--all-features \
-- -D warnings