1- # Qurious Makefile
2- # Simplified development workflow
31CARGO = cargo
4- RUSTFMT = rustfmt
52DOCKER = docker
6- PROJECT_NAME = qurious
73TPCH_DATA_DIR = qurious/tests/tpch/data
84TPCH_DOCKER_IMAGE = ghcr.io/scalytics/tpch-docker:main
95
10- # Default target
116.PHONY : help
12- help :
13- @echo " Qurious Development Tools"
14- @echo " ========================"
7+ help : # # Show available commands
8+ @echo " Qurious Makefile (minimal)"
159 @echo " "
1610 @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
11+ @awk ' BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf " \033[36m%-18s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST )
4012
4113.PHONY : test
42- test : # # Run unit tests
14+ # Tests in `qurious/tests/tpch/` run against the TPC-H dataset and require
15+ # data generation ahead of time (default scale factor is 0.01 here).
16+ # Generate data from the repository root with:
17+ # make tpch-data
18+ test : # # Run unit tests (includes TPC-H tests when available)
4319 INCLUDE_TPCH=true $(CARGO ) test
4420
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
7521.PHONY : tpch-data
76- tpch-data : # # Generate TPC-H test data
22+ tpch-data : # # Generate TPC-H test data (scale factor 0.01)
7723 mkdir -p $(TPCH_DATA_DIR )
7824 $(DOCKER ) run -it -v " $( realpath $( TPCH_DATA_DIR) ) " :/data $(TPCH_DOCKER_IMAGE ) -vf -s 0.01
7925
8026.PHONY : tpch-data-small
81- tpch-data-small : # # Generate small TPC-H test data
27+ tpch-data-small : # # Generate small TPC-H test data (scale factor 0.001)
8228 mkdir -p $(TPCH_DATA_DIR )
8329 $(DOCKER ) run -it -v " $( realpath $( TPCH_DATA_DIR) ) " :/data $(TPCH_DOCKER_IMAGE ) -vf -s 0.001
8430
8531.PHONY : tpch-data-large
86- tpch-data-large : # # Generate large TPC-H test data
32+ tpch-data-large : # # Generate large TPC-H test data (scale factor 0.1)
8733 mkdir -p $(TPCH_DATA_DIR )
8834 $(DOCKER ) run -it -v " $( realpath $( TPCH_DATA_DIR) ) " :/data $(TPCH_DOCKER_IMAGE ) -vf -s 0.1
8935
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
17436.DEFAULT_GOAL := help
0 commit comments