-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
68 lines (59 loc) · 2.69 KB
/
Makefile
File metadata and controls
68 lines (59 loc) · 2.69 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
.PHONY: help buf_generate test build fmt fix_fmt build_release clean full_test
help:
@echo "Usage: make <target>"
@echo ""
@echo "Available targets:"
@echo " help : Show this help message"
@echo " buf_generate : Generate Protocol Buffer Code"
@echo " test : Build extplugin_test_server binary and run Rust tests"
@echo " build : Build Rust project (all features)"
@echo " fmt : Check Rust format and run clippy (non-fatal)"
@echo " fix_fmt : Fix Rust format and run clippy fixes"
@echo " build_release : Build Rust project in release mode"
@echo " clean : Clean build artifacts"
@echo " full_test : Run build, test, fix_fmt, and build_release sequentially"
buf_generate:
@echo "Generate Protocol Buffer Code"
@echo "----------------------------------------------------------"
buf generate
@echo "----------------------------------------------------------"
test:
@echo "Build extplugin_test_server binary"
@echo "----------------------------------------------------------"
cargo build --package ext_plugin --bin extplugin_test_server
@echo "----------------------------------------------------------"
@echo "Run Rust Tests"
@echo "----------------------------------------------------------"
cargo test --workspace --all-features --all-targets
@echo "----------------------------------------------------------"
build:
@echo "Build Rust Project"
@echo "----------------------------------------------------------"
cargo build --workspace --all-features
@echo "----------------------------------------------------------"
fmt:
@echo "Check Rust Format"
@echo "----------------------------------------------------------"
cargo fmt --check || true
@echo "----------------------------------------------------------"
cargo clippy --workspace || true
@echo "----------------------------------------------------------"
fix_fmt:
@echo "Fix Rust Format"
@echo "----------------------------------------------------------"
cargo fmt || true
@echo "----------------------------------------------------------"
cargo clippy --workspace --fix --allow-dirty || true
@echo "----------------------------------------------------------"
build_release:
@echo "Build Rust Project in Release Mode"
@echo "----------------------------------------------------------"
cargo build --workspace --all-features --release
@echo "----------------------------------------------------------"
clean:
@echo "Cleaning build artifacts"
@echo "----------------------------------------------------------"
cargo clean
@echo "----------------------------------------------------------"
full_test: build test fix_fmt build_release
@echo "Full test completed"