-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
55 lines (45 loc) · 1.41 KB
/
Makefile
File metadata and controls
55 lines (45 loc) · 1.41 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
.PHONY: all
all: help
## help: Display this help message
.PHONY: help
help: Makefile
@echo
@echo " Choose a make command to run"
@echo
@sed -n 's/^##//p' $< | column -t -s ':' | sed -e 's/^/ /'
@echo
## test: Run tests with race detection and coverage
.PHONY: test
test: go-generate engines/extism/wasmdata/main.wasm
go test -race -cover ./...
## bench: Run performance benchmarks and create reports
.PHONY: bench
bench: go-generate
engines/benchmarks/run.sh
## bench-quick: Run benchmarks without creating reports
.PHONY: bench-quick
bench-quick: go-generate
go test -run=^$$ -bench=. -benchmem ./...
## lint: Run golangci-lint code quality checks
.PHONY: lint
lint: go-generate
golangci-lint run ./...
## lint-fix: Run golangci-lint with auto-fix for common issues
.PHONY: lint-fix
lint-fix: go-generate
golangci-lint fmt
golangci-lint run --fix ./...
# Build WASM module when needed
engines/extism/wasmdata/main.wasm: engines/extism/wasmdata/examples/main.go engines/extism/wasmdata/examples/go.mod engines/extism/wasmdata/examples/go.sum
$(MAKE) -C engines/extism/wasmdata main.wasm
## go-generate: Run code generation for type wrappers
.PHONY: go-generate
go-generate:
cd engines/types && go generate
## wasmdata-build: Build WASM test data
.PHONY: wasmdata-build
wasmdata-build: engines/extism/wasmdata/main.wasm
## clean: Clean up build artifacts
.PHONY: clean
clean:
$(MAKE) -C engines/extism/wasmdata clean