-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathMakefile
More file actions
72 lines (58 loc) · 1.83 KB
/
Makefile
File metadata and controls
72 lines (58 loc) · 1.83 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
BINARY_NAME=prompt-cache
VERSION=0.3.0
PROVIDER?=openai
.PHONY: all build run test benchmark clean help
all: build
help:
@echo "PromptCache v$(VERSION) - Makefile commands:"
@echo ""
@echo " make build - Build the binary"
@echo " make run - Build and run the server"
@echo " make test - Run unit tests"
@echo " make test-verbose - Run tests with verbose output"
@echo " make benchmark - Run benchmark suite"
@echo " make bench-go - Run Go benchmarks"
@echo " make clean - Clean build artifacts and data"
@echo " make docker-build - Build Docker image"
@echo " make docker-run - Run with Docker Compose"
@echo ""
@echo "Environment variables:"
@echo " PORT - Server port (default: 8080)"
@echo " PROVIDER - Embedding provider (openai|mistral|claude)"
@echo " OPENAI_API_KEY - OpenAI API key"
@echo " MISTRAL_API_KEY - Mistral API key"
@echo " ANTHROPIC_API_KEY - Anthropic API key"
@echo " VOYAGE_API_KEY - Voyage AI API key (for Claude)"
@echo " LOG_LEVEL - Logging level (debug|info|warn|error)"
build:
@echo "Building $(BINARY_NAME)..."
@go build -o $(BINARY_NAME) ./cmd/api
run:
@./scripts/run.sh
test:
@echo "Running tests..."
@go test ./...
test-verbose:
@echo "Running tests (verbose)..."
@go test ./... -v
benchmark:
@echo "Running benchmark suite..."
@./scripts/benchmark.sh
bench-go:
@echo "Running Go benchmarks..."
@go test ./internal/semantic/... -bench=. -benchmem
clean:
@echo "Cleaning up..."
@go clean
@rm -f $(BINARY_NAME)
@rm -rf badger_data data
@rm -f server.log
docker-build:
@echo "Building Docker image..."
@docker build -t prompt-cache:latest .
docker-run:
@echo "Starting with Docker Compose..."
@docker-compose up -d
docker-stop:
@echo "Stopping Docker Compose..."
@docker-compose down