forked from p2pderivatives/cfd-go
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
62 lines (47 loc) · 1.14 KB
/
Makefile
File metadata and controls
62 lines (47 loc) · 1.14 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
59
60
61
62
.PHONY: all
all: generate format
# for docker
get-cache:
go install golang.org/x/tools/cmd/goimports@v0.17.0
go install go.uber.org/mock/mockgen@v0.4.0
go mod download
update:
go mod tidy
generate:
go generate ./apis/... ./service/...
format:
go run golang.org/x/tools/cmd/goimports@v0.17.0 -w .
go vet . ./types/... ./errors ./utils ./config ./apis/... ./service/... ./tests
go run github.com/google/yamlfmt/cmd/yamlfmt@v0.10.0
go mod tidy
lint:
go run github.com/golangci/golangci-lint/cmd/golangci-lint@v1.55.2 run
lint-fix:
go run github.com/golangci/golangci-lint/cmd/golangci-lint@v1.55.2 run --fix
build-lib:
echo "build for Linux/MacOS"
./tools/simple_build.sh
build-lib-win:
echo "build for Windows"
.\tools\build_mingw.bat
build-all: cleanup build-lib
build-all-win: cleanup-win build-lib-win
cleanup:
echo "cleanup for Linux/MacOS"
./tools/cmake_cleanup.sh
cleanup-win:
echo "cleanup for Windows"
.\tools\cmake_cleanup.bat
test:
echo "test for Linux/MacOS"
go version
go mod download
./go_test.sh
test-win:
echo "test for Windows"
go version
go mod download
go_test.bat
gen-swig:
./tools/gen_swig.sh
make format