-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
124 lines (94 loc) · 3.19 KB
/
Makefile
File metadata and controls
124 lines (94 loc) · 3.19 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
# BitQuan Blockchain - Makefile
# Common development tasks for BitQuan cryptocurrency implementation
.PHONY: all build check test clippy fmt clean run benchmark help
# Default target
all: build
## Build targets
build: ## Build all crates in debug mode
cargo build --all-features
release: ## Build all crates in release mode
cargo build --release --all-features
## Code quality targets
check: ## Run quick checks (format, clippy)
@echo "Running cargo fmt --check..."
cargo fmt --all -- --check
@echo "Running cargo clippy..."
cargo clippy --all-targets --all-features -- -D warnings
clippy: ## Run clippy linter
cargo clippy --all-targets --all-features -- -D warnings
fmt: ## Format code with rustfmt
cargo fmt --all
fmt-check: ## Check if code is formatted
cargo fmt --all -- --check
## Testing targets
test: ## Run all tests
cargo test --all-features
test-quiet: ## Run tests with minimal output
cargo test --all-features --quiet
test-fast: ## Run tests without all features (faster)
cargo test
## Security targets
audit: ## Run cargo deny check
cargo deny check
audit-advisories: ## Check security advisories
cargo deny check advisories
audit-bans: ## Check dependency bans
cargo deny check bans
audit-licenses: ## Check license compliance
cargo deny check licenses
audit-sources: ## Check source validity
cargo deny check sources
## Documentation targets
doc: ## Generate and open documentation
cargo doc --all-features --open
doc-no-deps: ## Generate documentation without dependencies
cargo doc --all-features --no-deps
## Cleaning targets
clean: ## Clean build artifacts
cargo clean
clean-all: clean ## Clean everything including temporary files
rm -rf data/* .agents
## Development targets
run: ## Run the main node
cargo run --bin bitquan-node --all-features
run-miner: ## Run the miner
cargo run --bin bitquan-node --all-features -- mine
run-faucet: ## Run the faucet server
cargo run --bin faucet --all-features
## Utility targets
update: ## Update dependencies
cargo update
update-deps: update ## Update all dependencies (alias)
tree: ## Show dependency tree
cargo tree
fetch: ## Fetch all git dependencies
cargo fetch
## CI targets (used by GitHub Actions)
ci: ## Run full CI checks (format, clippy, test, audit)
@echo "=== Running cargo fmt --check ==="
cargo fmt --all -- --check
@echo "=== Running cargo clippy ==="
cargo clippy --all-targets --all-features -- -D warnings
@echo "=== Running cargo test ==="
cargo test --all-features
@echo "=== Running cargo deny check ==="
cargo deny check
@echo "=== All CI checks passed! ==="
ck: ci ## Alias for ci (pre-commit check)
## Help target
help: ## Show this help message
@echo "BitQuan Development Commands"
@echo ""
@echo "Usage:"
@echo " make <target>"
@echo ""
@echo "Available targets:"
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf " %-20s %s\n", $$1, $$2}'
@echo ""
@echo "Examples:"
@echo " make build # Build all crates"
@echo " make test # Run all tests"
@echo " make clippy # Run linter"
@echo " make fmt # Format code"
@echo " make ci # Run full CI checks"
@echo " make help # Show this help"