-
Notifications
You must be signed in to change notification settings - Fork 39
/
Makefile
37 lines (30 loc) · 1.15 KB
/
Makefile
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
GO_FILES := $(shell find . -type f -name '*.go') go.mod go.sum
ENGINE_TEMPLATES := $(shell find . -type f -path pkg/templates)
IAC_TEMPLATES := $(shell find . -type f -path pkg/infra/iac3/templates -and -not -path */node_modules/*)
engine: $(GO_FILES) $(ENGINE_TEMPLATES)
CGO_ENABLED=1 \
GOOS=linux \
GOARCH=amd64 \
CC="zig cc -target x86_64-linux-musl" \
CXX="zig c++ -target x86_64-linux-musl" \
go build --tags extended -o engine -ldflags="-s -w" ./cmd/engine
iac: $(GO_FILES) $(IAC_TEMPLATES)
CGO_ENABLED=1 \
GOOS=linux \
GOARCH=amd64 \
CC="zig cc -target x86_64-linux-musl" \
CXX="zig c++ -target x86_64-linux-musl" \
go build --tags extended -o iac -ldflags="-s -w" ./cmd/iac
.PHONY: clean_debug
clean_debug:
find . \( -name '*.gv' -or -name '*.gv.svg' \) -delete
.PHONY: engine_test
engine_test:
go test -race -timeout 5m -test.count 4 -run '^TestEngine$$' ./pkg/engine
.PHONY: regen_tests
regen_tests:
find pkg/engine/testdata -type f -name '*.input.yaml' -exec ./create_test.sh {} \;
find pkg/k2/testdata -mindepth 1 -maxdepth 1 -type d -exec ./create_k2_test.sh {} \;
.PHONY: cancel-all
cancel-all:
rm -rf ~/.k2/pulumi/state/.pulumi/locks