-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
52 lines (38 loc) · 1.58 KB
/
Copy pathMakefile
File metadata and controls
52 lines (38 loc) · 1.58 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
# Every command this repo needs. Run `make` on its own to see the list.
#
# The Go module lives in src/, so each target uses `go -C src`. You never need
# to cd anywhere: run make from the repository root.
GO ?= go
SRC := src
# Used by `make measure` to limit the run to one model:
# make measure MODEL=qwen3-8b
MODEL ?=
.DEFAULT_GOAL := help
.PHONY: help build validate test check measure notes fmt vet lint clean
help: ## Show this help
@echo "usage: make <target>"
@echo
@grep -E '^[a-z-]+:.*?## .*$$' $(MAKEFILE_LIST) \
| awk 'BEGIN {FS = ":.*?## "}; {printf " %-10s %s\n", $$1, $$2}'
@echo
@echo "variables: MODEL=$(MODEL) (limits 'make measure' to one model)"
build: ## Regenerate dist/ and MODELS.md
$(GO) -C $(SRC) run ./cmd/llamapreset build
validate: ## Check every config against the rules in AGENTS.md
$(GO) -C $(SRC) run ./cmd/llamapreset validate
test: ## Run the Go tests
$(GO) -C $(SRC) test ./...
check: test build validate ## Test, rebuild, validate. Do this before committing
measure: ## Measure missing VRAM numbers (network, no downloads). MODEL=<id> for one
$(GO) -C $(SRC) run ./cmd/llamapreset measure --missing $(MODEL)
notes: ## Print the release notes to stdout
@$(GO) -C $(SRC) run ./cmd/llamapreset build --notes
fmt: ## Format the Go code
$(GO) -C $(SRC) fmt ./...
vet: ## Report suspicious Go constructs
$(GO) -C $(SRC) vet ./...
lint: ## Run golangci-lint (install: brew install golangci-lint)
cd $(SRC) && golangci-lint run ./...
clean: ## Delete generated presets (MODELS.md is committed, so it stays)
rm -f dist/*.ini
@rmdir dist 2>/dev/null || true