-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathMakefile
54 lines (40 loc) · 1.39 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
RELEASE?=v0.7.2
.PHONY: proto
run: build
rm -rf _hod_
./hoddb
install-python-deps:
python -m pip install grpcio-tools googleapis-common-protos --user
proto: proto/log.proto
protoc -I proto -I proto/grpc-gateway/third_party/googleapis --go_out=plugins=grpc:proto --grpc-gateway_out=logtostderr=true:proto --swagger_out=logtostderr=true:viz proto/log.proto
#python3 -m grpc_tools.protoc -I proto -I proto/grpc-gateway/third_party/googleapis --python_out=. --grpc_python_out=. proto/log.proto
build:
go build -o hoddb
test:
# the -count=1 flag makes the test non-cacheable
rm -rf _log_test_
go test -count=1 -v ./hod ./lang ./p2p ./turtle
test-insert:
rm -rf _log_test_
go test -v -test.run=TestInsert ./...
bench:
go test -bench=. -test.run=xxxx -v ./...
bench-util:
go test -bench=Util -test.run=xxxx -v ./...
clean:
rm -rf _hod_
container: build
mv ./hoddb containers/hoddb
docker build -t mortar/hoddb:$(RELEASE) containers/hoddb
docker build -t mortar/hoddb:latest containers/hoddb
viz-container:
go build -o containers/viz/fileserver ./viz/fileserver
cp -r viz/ containers/viz/
docker build -t mortar/hodviz:$(RELEASE) containers/viz
docker build -t mortar/hodviz:latest containers/viz
push-container: container
docker push mortar/hoddb:$(RELEASE)
docker push mortar/hoddb:latest
push-viz-container: viz-container
docker push mortar/hodviz:$(RELEASE)
docker push mortar/hodviz:latest