-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
58 lines (51 loc) · 1.71 KB
/
Makefile
File metadata and controls
58 lines (51 loc) · 1.71 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
GOMODULES = . cmd/neblictl cmd/kafka-sampler
.PHONY: gobuild
gobuild:
for gomod in $(GOMODULES); do \
echo "Building $$gomod" && \
cd $$gomod && \
go build ./... && \
cd -; \
done
.PHONY: gotest
gotest:
for gomod in $(GOMODULES); do \
echo "Testing $$gomod" && \
cd $$gomod && \
go test ./... || exit 1 && \
cd -; \
done
.PHONY: alltest
alltest: gotest
cd sampler/test/docs/java/sampler_example && ./gradlew build
.PHONY: gomod-update-all
gomod-update-all:
for gomod in $(GOMODULES); do \
echo "Updating $$gomod" && \
cd $$gomod && \
go get -u ./... && \
go mod tidy && \
cd -; \
done
.PHONY: docs-serve
docs-serve:
mkdocs serve -f docs/mkdocs.yaml
.PHONY: gen-proto
gen-proto:
docker run --rm -v${PWD}:${PWD} -w${PWD} otel/build-protobuf \
-I/usr/include/google/protobuf --proto_path=${PWD} \
--go_opt=module=github.com/neblic/platform/controlplane --go_out=${PWD}/controlplane \
--go-grpc_opt=module=github.com/neblic/platform/controlplane --go-grpc_out=${PWD}/controlplane \
${PWD}/protos/controlplane.proto
docker run --rm -v${PWD}:${PWD} -w${PWD} otel/build-protobuf \
-I/usr/include/google/protobuf --proto_path=${PWD} \
--go_opt=module=github.com/neblic/platform/dataplane --go_out=${PWD}/dataplane \
--go-grpc_opt=module=github.com/neblic/platform/dataplane --go-grpc_out=${PWD}/dataplane \
${PWD}/protos/dataplane.proto
docker run --rm -v${PWD}:${PWD} -w${PWD} otel/build-protobuf \
-I/usr/include/google/protobuf --proto_path=${PWD} \
--go_opt=module=github.com/neblic/platform/dataplane --go_out=${PWD}/dataplane \
${PWD}/protos/test/test.proto
.PHONY: bench
bench:
go test -bench=. -benchmem -run=^$$ ./sampler/internal/sampler/ | tee sampler/test/docs/bench/results.txt