.PHONY: all build test test-unit test-integration test-full clean help install bench bench-quick bench-baseline
all: build test
build:
@echo "๐จ Building kelora..."
cargo build --release
test: test-unit test-integration
test-unit:
@echo "๐งช Running unit tests..."
cargo test --lib
test-integration:
@echo "๐ Running integration tests..."
cargo test --test integration_tests
test-full:
@echo "๐ Running comprehensive test suite..."
@chmod +x test_kelora.sh
./test_kelora.sh
clean:
@echo "๐งน Cleaning build artifacts..."
cargo clean
install:
@echo "๐ฆ Installing dependencies..."
cargo fetch
lint:
@echo "๐ Running clippy..."
cargo clippy -- -D warnings
fmt:
@echo "โจ Formatting code..."
cargo fmt
check: fmt lint test
demo:
@echo "๐ฌ Running demo..."
@echo '{"timestamp":"2023-07-18T15:04:23.456Z","level":"ERROR","message":"Demo error","component":"test"}' | cargo run -- -f json -c
@echo '{"timestamp":"2023-07-18T15:04:24.456Z","level":"INFO","message":"Demo info","component":"test"}' | cargo run -- -f json -c
bench: build
@echo "โก Running performance benchmarks..."
@chmod +x benchmarks/run_benchmarks.sh
./benchmarks/run_benchmarks.sh
bench-quick: build
@echo "โก Running quick benchmarks..."
@chmod +x benchmarks/run_benchmarks.sh
./benchmarks/run_benchmarks.sh --quick
bench-baseline: build
@echo "๐ Updating performance baseline..."
@chmod +x benchmarks/run_benchmarks.sh
./benchmarks/run_benchmarks.sh --update-baseline
help:
@echo "Kelora Makefile Commands:"
@echo ""
@echo " make build - Build the project"
@echo " make test - Run unit and integration tests"
@echo " make test-unit - Run only unit tests"
@echo " make test-integration - Run only integration tests"
@echo " make test-full - Run comprehensive test suite with manual tests"
@echo " make lint - Run clippy for code quality"
@echo " make fmt - Format code"
@echo " make check - Run format, lint, and test"
@echo " make demo - Run a quick demo"
@echo " make bench - Run performance benchmarks"
@echo " make bench-quick - Run quick benchmarks (10k dataset)"
@echo " make bench-baseline - Update performance baseline"
@echo " make clean - Clean build artifacts"
@echo " make install - Install dependencies"
@echo " make help - Show this help"