1- check :
2- cargo check --all-features
1+ # Qurious Makefile
2+ # Simplified development workflow
3+ CARGO = cargo
4+ RUSTFMT = rustfmt
5+ DOCKER = docker
6+ PROJECT_NAME = qurious
7+ TPCH_DATA_DIR = qurious/tests/tpch/data
8+ TPCH_DOCKER_IMAGE = ghcr.io/scalytics/tpch-docker:main
39
4- make tpch :
5- mkdir -p qurious/tests/tpch/data
6- docker run -it -v " $( realpath qurious/tests/tpch/data) " :/data ghcr.io/scalytics/tpch-docker:main -vf -s 0.01
10+ # Default target
11+ .PHONY : help
12+ help :
13+ @echo " Qurious Development Tools"
14+ @echo " ========================"
15+ @echo " "
16+ @echo " Available commands:"
17+ @awk ' BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf " \033[36m%-15s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST )
18+
19+ # Code checking
20+ .PHONY : check
21+ check : # # Check code syntax and dependencies
22+ $(CARGO ) check --all-features
23+
24+ .PHONY : check-all
25+ check-all : # # Check all workspace members
26+ $(CARGO ) check --workspace --all-features
27+
28+ # Build
29+ .PHONY : build
30+ build : # # Build project (debug mode)
31+ $(CARGO ) build
32+
33+ .PHONY : build-release
34+ build-release : # # Build project (release mode)
35+ $(CARGO ) build --release
36+
37+ .PHONY : build-all
38+ build-all : # # Build all workspace members
39+ $(CARGO ) build --workspace
40+
41+ .PHONY : test
42+ test : # # Run unit tests
43+ INCLUDE_TPCH=true $(CARGO ) test
44+
45+ # Code formatting
46+ .PHONY : fmt
47+ fmt : # # Check code formatting
48+ $(CARGO ) fmt -- --check
49+
50+ .PHONY : fmt-fix
51+ fmt-fix : # # Format code and auto-fix
52+ $(CARGO ) fmt
53+
54+ # Code quality
55+ .PHONY : clippy
56+ clippy : # # Run clippy code checks
57+ $(CARGO ) clippy --all-features -- -D warnings
58+
59+ .PHONY : clippy-fix
60+ clippy-fix : # # Run clippy and auto-fix
61+ $(CARGO ) clippy --fix --all-features
62+
63+ # Clean
64+ .PHONY : clean
65+ clean : # # Clean build artifacts
66+ $(CARGO ) clean
67+
68+ .PHONY : clean-all
69+ clean-all : clean # # Clean all build artifacts and temp files
70+ rm -rf target/
71+ find . -name " *.orig" -delete
72+ find . -name " *.rej" -delete
73+
74+ # TPC-H data generation
75+ .PHONY : tpch-data
76+ tpch-data : # # Generate TPC-H test data
77+ mkdir -p $(TPCH_DATA_DIR )
78+ $(DOCKER ) run -it -v " $( realpath $( TPCH_DATA_DIR) ) " :/data $(TPCH_DOCKER_IMAGE ) -vf -s 0.01
79+
80+ .PHONY : tpch-data-small
81+ tpch-data-small : # # Generate small TPC-H test data
82+ mkdir -p $(TPCH_DATA_DIR )
83+ $(DOCKER ) run -it -v " $( realpath $( TPCH_DATA_DIR) ) " :/data $(TPCH_DOCKER_IMAGE ) -vf -s 0.001
84+
85+ .PHONY : tpch-data-large
86+ tpch-data-large : # # Generate large TPC-H test data
87+ mkdir -p $(TPCH_DATA_DIR )
88+ $(DOCKER ) run -it -v " $( realpath $( TPCH_DATA_DIR) ) " :/data $(TPCH_DOCKER_IMAGE ) -vf -s 0.1
89+
90+ # Development workflow
91+ .PHONY : dev-setup
92+ dev-setup : # # Setup development environment
93+ rustup component add rustfmt
94+ rustup component add clippy
95+ $(CARGO ) install cargo-watch
96+
97+ .PHONY : dev
98+ dev : # # Development mode: watch files and run tests
99+ cargo watch -x check -x test
100+
101+ .PHONY : dev-test
102+ dev-test : # # Development mode: watch files and run tests
103+ cargo watch -x test
104+
105+ # Documentation
106+ .PHONY : doc
107+ doc : # # Generate documentation
108+ $(CARGO ) doc --no-deps
109+
110+ .PHONY : doc-open
111+ doc-open : # # Generate and open documentation
112+ $(CARGO ) doc --no-deps --open
113+
114+ # Benchmark
115+ .PHONY : bench
116+ bench : # # Run benchmarks
117+ $(CARGO ) bench
118+
119+ # Dependency management
120+ .PHONY : update
121+ update : # # Update dependencies
122+ $(CARGO ) update
123+
124+ .PHONY : audit
125+ audit : # # Check dependency security vulnerabilities
126+ $(CARGO ) audit
127+
128+ # Release preparation
129+ .PHONY : release-check
130+ release-check : check-all clippy test-all # # Pre-release checks
131+ @echo " All checks passed, ready to release!"
132+
133+ .PHONY : release-build
134+ release-build : # # Build release version
135+ $(CARGO ) build --release
136+ @echo " Release build completed: target/release/$( PROJECT_NAME) "
137+
138+ # Database
139+ .PHONY : db-start
140+ db-start : # # Start database services
141+ $(DOCKER ) compose up -d
142+
143+ .PHONY : db-stop
144+ db-stop : # # Stop database services
145+ $(DOCKER ) compose down
146+
147+ .PHONY : db-reset
148+ db-reset : # # Reset database
149+ $(DOCKER ) compose down -v
150+ $(DOCKER ) compose up -d
151+
152+ # Utilities
153+ .PHONY : size
154+ size : build-release # # Show binary file size
155+ @echo " Binary file size:"
156+ @ls -lh target/release/$(PROJECT_NAME )
157+
158+ .PHONY : deps-tree
159+ deps-tree : # # Show dependency tree
160+ $(CARGO ) tree
161+
162+ .PHONY : outdated
163+ outdated : # # Check outdated dependencies
164+ $(CARGO ) install-update -a
165+
166+ # Quick development command combinations
167+ .PHONY : quick-check
168+ quick-check : fmt clippy test # # Quick check: format, clippy, test
169+
170+ .PHONY : full-check
171+ full-check : fmt clippy test-all audit # # Full check: format, clippy, all tests, security audit
172+
173+ # Default goal
174+ .DEFAULT_GOAL := help
0 commit comments