11# ############################ Main targets #############################
22# Rebuild binaries (used by Dockerfile).
3- bins : sandbox-worker-lambda workflow- starter workflow- worker backend -worker
3+ bins : examples-auto-suspend-starter examples-auto-suspend-worker examples-detached- sandbox-starter examples-detached-sandbox- worker examples-explicit-suspend-resume-starter examples-explicit-suspend-resume-worker examples-file-management- starter examples-file-management- worker examples-shared-sandbox-starter examples-shared-sandbox-worker examples-snapshot-fork-starter examples-snapshot-fork -worker
44
55# Install all tools, run all possible checks and tests (long but comprehensive).
66all : clean bins
@@ -17,37 +17,68 @@ COLOR := "\e[1;36m%s\e[0m\n"
1717RED := "\e[1;31m%s\e[0m\n"
1818
1919ALL_SRC := $(shell find . -name "* .go")
20- ALL_SRC += sdk/go.mod consumer /go.mod
20+ ALL_SRC += sdk/go.mod examples/auto-suspend/go.mod examples/detached-sandbox/go.mod examples/explicit-suspend-resume/go.mod examples/file-management/go.mod examples/shared-sandbox/go.mod examples/snapshot-fork /go.mod
2121
2222# #### Binaries #####
2323clean-bins :
2424 @printf $(COLOR ) " Delete old binaries..."
25- @rm -f backend/worker
26- @rm -f consumer/sandbox-worker-lambda.zip
27- @rm -f consumer/workflow-starter
28- @rm -f consumer/workflow-worker
29-
30- sandbox-worker-agentcore : $(ALL_SRC )
31- @printf $(COLOR ) " Build sandbox-worker-agentcore container image with ko..."
32- cd consumer && ko build ./cmd/sandbox-worker-agentcore
33-
34- sandbox-worker-ecs : $(ALL_SRC )
35- @printf $(COLOR ) " Build sandbox-worker-ecs container image with ko..."
36- cd consumer && ko build ./cmd/sandbox-worker-ecs
37-
38- sandbox-worker-lambda : $(ALL_SRC )
39- @printf $(COLOR ) " Build sandbox-worker-lambda with CGO_ENABLED=$( CGO_ENABLED) ..."
40- cd consumer && CGO_ENABLED=$(CGO_ENABLED ) GOOS=linux GOARCH=arm64 go build -tags lambda.norpc -o bootstrap ./cmd/sandbox-worker-lambda
41- cd consumer && zip sandbox-worker-lambda.zip bootstrap && rm bootstrap
42-
43- workflow-starter : $(ALL_SRC )
44- @printf $(COLOR ) " Build workflow-starter with CGO_ENABLED=$( CGO_ENABLED) for $( GOOS) /$( GOARCH) ..."
45- cd consumer && CGO_ENABLED=$(CGO_ENABLED ) go build $(BUILD_TAG_FLAG ) -o workflow-starter ./cmd/starter
46-
47- workflow-worker : $(ALL_SRC )
48- @printf $(COLOR ) " Build workflow-worker with CGO_ENABLED=$( CGO_ENABLED) for $( GOOS) /$( GOARCH) ..."
49- cd consumer && CGO_ENABLED=$(CGO_ENABLED ) go build $(BUILD_TAG_FLAG ) -o workflow-worker ./cmd/worker
50-
51- backend-worker : $(ALL_SRC )
52- @printf $(COLOR ) " Build backend-worker with CGO_ENABLED=$( CGO_ENABLED) for $( GOOS) /$( GOARCH) ..."
53- cd backend && CGO_ENABLED=$(CGO_ENABLED ) go build $(BUILD_TAG_FLAG ) -o worker ./cmd/worker
25+ @rm -f examples/auto-suspend/starter
26+ @rm -f examples/auto-suspend/worker
27+ @rm -f examples/detached-sandbox/starter
28+ @rm -f examples/detached-sandbox/worker
29+ @rm -f examples/explicit-suspend-resume/starter
30+ @rm -f examples/explicit-suspend-resume/worker
31+ @rm -f examples/file-management/starter
32+ @rm -f examples/file-management/worker
33+ @rm -f examples/shared-sandbox/starter
34+ @rm -f examples/shared-sandbox/worker
35+ @rm -f examples/snapshot-fork/starter
36+ @rm -f examples/snapshot-fork/worker
37+
38+ examples-auto-suspend-starter : $(ALL_SRC )
39+ @printf $(COLOR ) " Build examples-auto-suspend-starter with CGO_ENABLED=$( CGO_ENABLED) for $( GOOS) /$( GOARCH) ..."
40+ cd examples/auto-suspend && CGO_ENABLED=$(CGO_ENABLED ) go build $(BUILD_TAG_FLAG ) -o starter ./cmd/starter
41+
42+ examples-auto-suspend-worker : $(ALL_SRC )
43+ @printf $(COLOR ) " Build examples-auto-suspend-worker with CGO_ENABLED=$( CGO_ENABLED) for $( GOOS) /$( GOARCH) ..."
44+ cd examples/auto-suspend && CGO_ENABLED=$(CGO_ENABLED ) go build $(BUILD_TAG_FLAG ) -o worker ./cmd/worker
45+
46+ examples-detached-sandbox-starter : $(ALL_SRC )
47+ @printf $(COLOR ) " Build examples-detached-sandbox-starter with CGO_ENABLED=$( CGO_ENABLED) for $( GOOS) /$( GOARCH) ..."
48+ cd examples/detached-sandbox && CGO_ENABLED=$(CGO_ENABLED ) go build $(BUILD_TAG_FLAG ) -o starter ./cmd/starter
49+
50+ examples-detached-sandbox-worker : $(ALL_SRC )
51+ @printf $(COLOR ) " Build examples-detached-sandbox-worker with CGO_ENABLED=$( CGO_ENABLED) for $( GOOS) /$( GOARCH) ..."
52+ cd examples/detached-sandbox && CGO_ENABLED=$(CGO_ENABLED ) go build $(BUILD_TAG_FLAG ) -o worker ./cmd/worker
53+
54+ examples-explicit-suspend-resume-starter : $(ALL_SRC )
55+ @printf $(COLOR ) " Build examples-explicit-suspend-resume-starter with CGO_ENABLED=$( CGO_ENABLED) for $( GOOS) /$( GOARCH) ..."
56+ cd examples/explicit-suspend-resume && CGO_ENABLED=$(CGO_ENABLED ) go build $(BUILD_TAG_FLAG ) -o starter ./cmd/starter
57+
58+ examples-explicit-suspend-resume-worker : $(ALL_SRC )
59+ @printf $(COLOR ) " Build examples-explicit-suspend-resume-worker with CGO_ENABLED=$( CGO_ENABLED) for $( GOOS) /$( GOARCH) ..."
60+ cd examples/explicit-suspend-resume && CGO_ENABLED=$(CGO_ENABLED ) go build $(BUILD_TAG_FLAG ) -o worker ./cmd/worker
61+
62+ examples-shared-sandbox-starter : $(ALL_SRC )
63+ @printf $(COLOR ) " Build examples-shared-sandbox-starter with CGO_ENABLED=$( CGO_ENABLED) for $( GOOS) /$( GOARCH) ..."
64+ cd examples/shared-sandbox && CGO_ENABLED=$(CGO_ENABLED ) go build $(BUILD_TAG_FLAG ) -o starter ./cmd/starter
65+
66+ examples-shared-sandbox-worker : $(ALL_SRC )
67+ @printf $(COLOR ) " Build examples-shared-sandbox-worker with CGO_ENABLED=$( CGO_ENABLED) for $( GOOS) /$( GOARCH) ..."
68+ cd examples/shared-sandbox && CGO_ENABLED=$(CGO_ENABLED ) go build $(BUILD_TAG_FLAG ) -o worker ./cmd/worker
69+
70+ examples-file-management-starter : $(ALL_SRC )
71+ @printf $(COLOR ) " Build examples-file-management-starter with CGO_ENABLED=$( CGO_ENABLED) for $( GOOS) /$( GOARCH) ..."
72+ cd examples/file-management && CGO_ENABLED=$(CGO_ENABLED ) go build $(BUILD_TAG_FLAG ) -o starter ./cmd/starter
73+
74+ examples-file-management-worker : $(ALL_SRC )
75+ @printf $(COLOR ) " Build examples-file-management-worker with CGO_ENABLED=$( CGO_ENABLED) for $( GOOS) /$( GOARCH) ..."
76+ cd examples/file-management && CGO_ENABLED=$(CGO_ENABLED ) go build $(BUILD_TAG_FLAG ) -o worker ./cmd/worker
77+
78+ examples-snapshot-fork-starter : $(ALL_SRC )
79+ @printf $(COLOR ) " Build examples-snapshot-fork-starter with CGO_ENABLED=$( CGO_ENABLED) for $( GOOS) /$( GOARCH) ..."
80+ cd examples/snapshot-fork && CGO_ENABLED=$(CGO_ENABLED ) go build $(BUILD_TAG_FLAG ) -o starter ./cmd/starter
81+
82+ examples-snapshot-fork-worker : $(ALL_SRC )
83+ @printf $(COLOR ) " Build examples-snapshot-fork-worker with CGO_ENABLED=$( CGO_ENABLED) for $( GOOS) /$( GOARCH) ..."
84+ cd examples/snapshot-fork && CGO_ENABLED=$(CGO_ENABLED ) go build $(BUILD_TAG_FLAG ) -o worker ./cmd/worker
0 commit comments