forked from amark/gun
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
76 lines (51 loc) · 1.96 KB
/
Makefile
File metadata and controls
76 lines (51 loc) · 1.96 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
# Makefile for gun.rs development tasks
.PHONY: help test build fmt clippy clean all check bench
help: ## Show this help message
@echo 'Usage: make [target]'
@echo ''
@echo 'Available targets:'
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf " %-15s %s\n", $$1, $$2}' $(MAKEFILE_LIST)
all: fmt clippy test ## Run all checks (format, clippy, tests)
build: ## Build the project
cargo build --all-features
test: ## Run all tests
cargo test --all-features
test-unit: ## Run unit tests only
cargo test --lib
test-integration: ## Run integration tests
cargo test --test integration_tests -- --test-threads=1
test-stress: ## Run stress tests (may take longer)
cargo test --test stress_tests -- --ignored --test-threads=1
test-locks: ## Run lock contention tests
cargo test --test lock_tests -- --test-threads=1
fmt: ## Format code
cargo fmt --all
fmt-check: ## Check formatting without modifying files
cargo fmt --all -- --check
clippy: ## Run clippy lints
cargo clippy --all-targets --all-features -- -D warnings
clippy-fix: ## Try to auto-fix clippy issues
cargo clippy --fix --all-targets --all-features -- -D warnings
check: fmt-check clippy ## Run format check and clippy
clean: ## Clean build artifacts
cargo clean
clean-all: clean ## Clean build artifacts and test data
cargo clean
rm -rf gun_data/*
bench: ## Run benchmarks (if available)
cargo bench
doc: ## Build documentation
cargo doc --all-features --open
audit: ## Run security audit
cargo audit
machete: ## Check for unused dependencies
cargo install cargo-machete --locked || true
cargo machete
examples: ## Build and run examples
cargo build --examples
@echo "Examples built. Run with: cargo run --example <name>"
server: ## Build the relay server
cargo build --bin gun-server --release
run-server: ## Run the relay server
cargo run --bin gun-server
ci: fmt-check clippy build test ## Run CI checks locally