-
-
Notifications
You must be signed in to change notification settings - Fork 525
/
Makefile
61 lines (40 loc) · 1.02 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
.PHONY: all test
all: build
proto:
@./buildall.sh
build:
@go build ./...
# {{{ test
PACKAGES := $(shell go list ./... | grep -v "/examples/" | grep -v "/persistence" | grep -v "/scheduler")
test:
@go test $(PACKAGES) -timeout=30s
test2:
@go install gotest.tools/gotestsum@latest
@gotestsum --format testname $(PACKAGES)
test-short:
@go test $(PACKAGES) -timeout=30s -short
test-race:
@go test $(PACKAGES) -timeout=30s -race
lint:
@go install github.com/mgechev/revive@latest
@revive -formatter friendly $(PACKAGES)
vet:
@go vet $(PACKAGES)
bench:
@go test $(PACKAGES) -bench=.
# }}} test
# {{{ benchmark
packages_benchmark := $(shell go list ./... | grep -v "/log")
benchmark:
go test -benchmem -run=^$ $(packages_benchmark) -bench ^Benchmark$(t).*$
# }}}
# {{{ docker-env
root_dir := $(abspath $(CURDIR)/)
docker-env:
sudo docker run -it --rm \
-v $(root_dir)/:/go/src/AsncronIT/protoactor-go \
-w /go/src/AsncronIT/protoactor-go \
-e GOPATH=/go \
--entrypoint /bin/bash \
cupen/protoc:3.9.1-1
# }}}