-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
69 lines (50 loc) · 2.5 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
build:
go build -v -o bin/flamed cmd/flamed/flamed.go
# @DRAGONBOAT_LOGDB=pebble go build -v -tags dragonboat_no_rocksdb -o bin/flamed cmd/flamed/flamed.go
build-darwin-amd64:
GOOS=darwin GOARCH=amd64 go build -v -o bin/flamed-darwin-amd64 cmd/flamed/flamed.go
#build-darwin-arm64:
# @GOOS=darwin GOARCH=arm64 go build -v -o bin/flamed-darwin-arm64 cmd/flamed/flamed.go
build-windows-amd64:
GOOS=windows GOARCH=amd64 go build -v -o bin/flamed-windows-amd64.exe cmd/flamed/flamed.go
#build-windows-arm64:
# @GOOS=windows GOARCH=arm64 go build -v -o bin/flamed-windows-arm64.exe cmd/flamed/flamed.go
build-linux-amd64:
GOOS=linux GOARCH=amd64 go build -v -o bin/flamed-linux-amd64 cmd/flamed/flamed.go
build-linux-arm64:
GOOS=linux GOARCH=arm64 go build -v -o bin/flamed-linux-arm64 cmd/flamed/flamed.go
build-all: build-darwin-amd64 build-windows-amd64 build-linux-amd64 build-linux-arm64
# @DRAGONBOAT_LOGDB=pebble go build -v -tags dragonboat_no_rocksdb -o bin/flamed cmd/flamed/flamed.go
run-server:
go run cmd/flamed/flamed.go run server --notify-commit true --node-id 1 --storage-path /tmp/data1 --http-server-address 0.0.0.0:8081 --raft-address 0.0.0.0:63001 --grpc-server-address 0.0.0.0:9091 --log-level debug
run-server-race:
go run -race cmd/flamed/flamed.go run server --notify-commit true --node-id 1 --storage-path /tmp/data1 --http-server-address 0.0.0.0:8081 --raft-address 0.0.0.0:63001 --grpc-server-address 0.0.0.0:9091 --log-level debug
test-v:
go test ./... -v
test:
go test ./...
cover:
go test ./... -coverprofile=cover.out -v
#test:
# @DRAGONBOAT_LOGDB=pebble go test -tags dragonboat_no_rocksdb ./... -v
#
#cover:
# @DRAGONBOAT_LOGDB=pebble go test -tags dragonboat_no_rocksdb ./... -coverprofile=cover.out -v
cover-html:
go tool cover -html=cover.out
protobuf:
protoc -I=./ -I=./pkg/pb --go_out=./pkg/pb flamed.proto
protoc -I=./ -I=./pkg/tp/intkey --go_out=./pkg/tp/intkey intkey.proto
protoc -I=./ -I=./pkg/tp/json --go_out=./pkg/tp/json json.proto
clean:
rm -rf bin/flamed
rm -rf .proto-dir
## Generate go protobuf files using symlinked modules
proto-link:
./protoimport
protoc -I ./.proto-dir -I=./pkg/app/grpc/service/graphql --go_out=plugins=grpc:./pkg/app/grpc/service/graphql graphql.proto
protoc -I ./.proto-dir -I=./pkg/app/grpc/service/admin --go_out=plugins=grpc:./pkg/app/grpc/service/admin admin.proto
protoc -I ./.proto-dir -I=./pkg/app/grpc/service/globaloperation --go_out=plugins=grpc:./pkg/app/grpc/service/globaloperation globaloperation.proto
push:
git push
git push github