-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
35 lines (24 loc) · 798 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
35
# Copyright © Johnnie Chen ( ki7chen@github ). All rights reserved.
# See accompanying files LICENSE.txt
PWD = $(shell pwd)
GOBIN = $(PWD)/bin
GO?=go
PATH := $(GOBIN):$(PATH)
PROTOC_FLAGS = --go_opt=paths=source_relative --go_out=. \
--go-vtproto_opt=paths=source_relative,features=marshal+unmarshal+size --go-vtproto_out=.
ALL_TEST_PKG=gopkg.in/svrkit.v1/...
.PHONY: clean test all
dep:
$(GO) mod tidy
$(GO) install -v github.com/golangci/golangci-lint/cmd/golangci-lint@v1.58.1
testdata:
@cd codec/testdata && protoc $(PROTOC_FLAGS) ./*.proto
vet:
$(GO) vet ${ALL_TEST_PKG}
test:
$(GO) test -v ${ALL_TEST_PKG} -cover -cpu=4
#$(GO) test -v -bench ${ALL_TEST_PKG} -run ^Benchmark$ -benchmem
lint:
cd src && golangci-lint run --timeout 10m ./... > golint.log
clean:
$(GO) clean