-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathMakefile
68 lines (54 loc) · 1.79 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
.PHONY: all setup fmt lint test coverage watch-test watch-lint audit clean build release check update help
# Default target when running just 'make'
all: help
# Colors for help output
BLUE := \033[36m
RESET := \033[0m
# Install all dependencies and tools
setup:
@cargo install cargo-nextest
@rustup component add clippy
@rustup component add rustfmt
# Format code
fmt:
@cargo fmt --all
# Run clippy with all features
lint:
@cargo clippy --all-features -- -D warnings
# Run tests using nextest
test:
@cargo nextest run --no-fail-fast --all-features
# Run tests with coverage report
coverage:
@cargo llvm-cov nextest --all-features
# Clean build artifacts
clean:
@cargo clean
# Build with all features
build:
@cargo build --all-features
# Build for release
release:
@cargo build --release
# Run all checks (format, lint, test)
check: fmt lint test
# Update dependencies
update:
@cargo update
# Generate documentation
docs:
@cargo doc --all-features --no-deps --open
# Help command to list all available commands
help:
@echo "Available commands:"
@echo "${BLUE}make setup${RESET} - Install all dependencies and tools"
@echo "${BLUE}make fmt${RESET} - Format code"
@echo "${BLUE}make lint${RESET} - Run clippy with all features"
@echo "${BLUE}make test${RESET} - Run tests using nextest"
@echo "${BLUE}make coverage${RESET} - Run tests with coverage report"
@echo "${BLUE}make clean${RESET} - Clean build artifacts"
@echo "${BLUE}make build${RESET} - Build with all features"
@echo "${BLUE}make release${RESET} - Build for release"
@echo "${BLUE}make check${RESET} - Run all checks (format, lint, test)"
@echo "${BLUE}make update${RESET} - Update dependencies"
@echo "${BLUE}make docs${RESET} - Generate documentation"