GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — chronos-code/Makefile at main · spawn08/chronos-code Expand file tree/ Copy pathMakefileMore file actions 128 lines (99 loc) · 5.36 KB / Copy pathMakefileFile metadata and controls128 lines (99 loc) · 5.36 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 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 MODULE := github.com/spawn08/chronos-code BINARY := chronos-code BIN_DIR := bin VERSION := $(shell git describe --tags --always --dirty 2>/dev/null || echo "dev") COMMIT := $(shell git rev-parse --short HEAD 2>/dev/null || echo "none") BUILD_DATE := $(shell date -u '+%Y-%m-%dT%H:%M:%SZ') LDFLAGS := -s -w \ -X '$(MODULE)/internal/cli.Version=$(VERSION)' \ -X '$(MODULE)/internal/cli.Commit=$(COMMIT)' \ -X '$(MODULE)/internal/cli.BuildDate=$(BUILD_DATE)' # No package uses cgo; builds are pure Go on every platform. CGO_ENABLED ?= 0 # Tree-sitter grammars embedded in the binary: one per language pack under # indexer/extract/packs. Without these tags gotreesitter embeds all # of its ~200 grammars (about 18 MiB instead of 5 MiB); the build still works. GRAMMARS := bash c cpp c_sharp dart java javascript kotlin objc php python ruby rust scala swift tsx typescript GRAMMAR_TAGS := lsp grammar_subset $(addprefix grammar_subset_,$(GRAMMARS)) SIZE_LIMIT := 58720256 .PHONY: build build-core build-full build-release grammar-tags test lint size-check size-check-core fmt vet tidy clean install install-core eval eval-edges eval-tasks-validate eval-fixture eval-live eval-runtime-test bench-index build: build-full build-full: @mkdir -p $(BIN_DIR) CGO_ENABLED=$(CGO_ENABLED) go build -tags "$(GRAMMAR_TAGS)" -ldflags "$(LDFLAGS)" -trimpath -o $(BIN_DIR)/$(BINARY) ./cmd/chronos-code build-core: @mkdir -p $(BIN_DIR) CGO_ENABLED=0 go build -tags "$(GRAMMAR_TAGS)" -ldflags "$(LDFLAGS)" -trimpath -o $(BIN_DIR)/$(BINARY)-core ./cmd/chronos-code build-release: @mkdir -p $(BIN_DIR) CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -tags "$(GRAMMAR_TAGS)" -trimpath \ -ldflags="-s -w -X '$(MODULE)/internal/cli.Version=$(VERSION)' -X '$(MODULE)/internal/cli.Commit=$(COMMIT)' -X '$(MODULE)/internal/cli.BuildDate=$(BUILD_DATE)'" \ -o $(BIN_DIR)/$(BINARY) ./cmd/chronos-code grammar-tags: @echo $(GRAMMAR_TAGS) lint: golangci-lint run ./... size-check: build-release @SIZE=$$(stat -f%z $(BIN_DIR)/$(BINARY) 2>/dev/null || stat -c%s $(BIN_DIR)/$(BINARY)); \ echo "Binary size: $$SIZE bytes ($$(( SIZE / 1048576 )) MB)"; \ if [ "$$SIZE" -gt "$(SIZE_LIMIT)" ]; then \ echo "FAIL: binary exceeds $(SIZE_LIMIT) bytes"; exit 1; \ fi; \ if [ "$$SIZE" -gt 31457280 ]; then \ echo "WARN: binary exceeds 30 MB target ($(SIZE_LIMIT) byte gate active)"; \ fi size-check-core: build-core @SIZE=$$(stat -f%z $(BIN_DIR)/$(BINARY)-core 2>/dev/null || stat -c%s $(BIN_DIR)/$(BINARY)-core); \ echo "Core binary: $$SIZE bytes (limit $(SIZE_LIMIT))"; \ test "$$SIZE" -le "$(SIZE_LIMIT)" test: go test -tags "$(GRAMMAR_TAGS)" ./... -race -count=1 # eval runs the token-efficiency eval suite (PRD P3-006) against the # checked-in baseline (benchmark/eval/baseline.json) and fails if any task's # efficiency contract broke or optimized tokens regressed >10%. It is fully # offline/deterministic — no API key or network access required. eval: build $(BIN_DIR)/$(BINARY) eval run --md benchmark/eval/report.md EVAL_MANIFEST ?= benchmark/runtime/manifest.yaml EVAL_REPETITIONS ?= 2 EVAL_OUTPUT ?= bin/eval/runtime.jsonl EVAL_CONFIG ?= benchmark/runtime/config.yaml EVAL_LIVE_CONFIG ?= # Runtime fixtures use the actual orchestrator with a scripted loopback provider. eval-tasks-validate: build $(BIN_DIR)/$(BINARY) eval tasks --validate-only --manifest "$(EVAL_MANIFEST)" eval-fixture: build @DATA_HOME=$$(mktemp -d); trap 'rm -rf "$$DATA_HOME"' EXIT; \ CHRONOS_CODE_DATA_HOME="$$DATA_HOME" $(BIN_DIR)/$(BINARY) --config "$(EVAL_CONFIG)" eval tasks --run --manifest "$(EVAL_MANIFEST)" --fixture-provider benchmark/runtime/provider.yaml --repetitions $(EVAL_REPETITIONS) --output "$(EVAL_OUTPUT)" # Live runs require explicit model configuration and real provider credentials. eval-live: build @test -n "$(EVAL_LIVE_CONFIG)" || (echo 'Set EVAL_LIVE_CONFIG to a real provider configuration'; exit 1) $(BIN_DIR)/$(BINARY) --config "$(EVAL_LIVE_CONFIG)" eval tasks --run --manifest "$(EVAL_MANIFEST)" --repetitions $(EVAL_REPETITIONS) --output "$(EVAL_OUTPUT)" eval-runtime-test: go test -tags "$(GRAMMAR_TAGS)" -race ./internal/eval ./internal/cli -run 'Test(ConfiguredFixture|RunMetadata|SourceSnapshot|FixtureHash|RunRecord|EvalTasks)' -count=1 # eval-edges measures reference resolution against SCIP indexes of pinned # repositories (benchmark/edges/repos.tsv) and updates # benchmark/edges/baseline.json. It needs network access and the SCIP # indexers (see benchmark/edges/run.sh); it is not part of CI. eval-edges: benchmark/edges/run.sh # bench-index measures indexing latency of the chronos indexer on a private # copy of this repo, and the graph tools' query latency over its index # (docs/chronos-indexer.md, "Measurement"). Indexing iterations are # expensive, so they run a fixed count; queries use -benchtime. BENCH_COUNT ?= 5 bench-index: go test ./indexer -tags "$(GRAMMAR_TAGS)" -run '^$$' -bench '^BenchmarkIndex' -benchtime=20x -count=$(BENCH_COUNT) -timeout 30m go test ./internal/graph -tags "$(GRAMMAR_TAGS)" -run '^$$' -bench '^BenchmarkScope' -benchtime=1s -count=$(BENCH_COUNT) -benchmem -timeout 30m fmt: gofmt -s -w . vet: go vet ./... tidy: go mod tidy clean: rm -rf $(BIN_DIR) install: CGO_ENABLED=$(CGO_ENABLED) go install -tags "$(GRAMMAR_TAGS)" -ldflags "$(LDFLAGS)" -trimpath ./cmd/chronos-code install-core: CGO_ENABLED=0 go install -tags "$(GRAMMAR_TAGS)" -ldflags "$(LDFLAGS)" -trimpath ./cmd/chronos-code |
| You are visitor 01402520 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |