-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
34 lines (22 loc) · 938 Bytes
/
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
PROJECT_ROOT := $(shell pwd)
OUTPUT_DIR := $(PROJECT_ROOT)/bin
all: clean worker workload sdk
clean:
rm -rf $(OUTPUT_DIR) && \
find $(PROJECT_ROOT)/workload -mindepth 1 -maxdepth 3 -type d -exec test -e {}/Makefile \; -exec make -C {} clean \;
find $(PROJECT_ROOT)/sdk -mindepth 1 -maxdepth 2 -type d -exec test -e {}/Makefile \; -exec make -C {} clean \;
worker:
go build -o $(OUTPUT_DIR)/worker \
$(PROJECT_ROOT)/cmd/worker/main.go
test: workload
go test -v $(PROJECT_ROOT)/test/...
workload: sdk
find $(PROJECT_ROOT)/workload -mindepth 1 -maxdepth 3 -type d -exec test -e {}/Makefile \; -exec echo "make -C {}" \; -exec make -C {} \;
sdk:
find $(PROJECT_ROOT)/sdk -mindepth 1 -maxdepth 2 -type d -exec test -e {}/Makefile \; -exec make -C {} \;
format_python:
isort -rc $(PROJECT_ROOT)/
format_golang:
gofmt -w .
format: format_python format_golang
.PHONY: all worker test workload clean sdk format_python format