This repository has been archived by the owner on Oct 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 112
/
Copy pathMakefile
122 lines (74 loc) · 2.35 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
.PHONY: deps
deps: deps-go deps-js wasmbrowsertest
.PHONY: deps-go
deps-go:
dep ensure
.PHONY: deps-js
deps-js:
yarn install
# gobin allows us to install specific versions of binary tools written in Go.
.PHONY: gobin
gobin:
GO111MODULE=off go get -u github.com/myitcv/gobin
# wasmbrowsertest is required for running WebAssembly tests in the browser.
.PHONY: wasmbrowsertest
wasmbrowsertest: gobin
gobin github.com/agnivade/wasmbrowsertest@v0.3.0
# Installs dependencies without updating Gopkg.lock or yarn.lock
.PHONY: deps-no-lockfile
deps-no-lockfile: deps-go-no-lockfile deps-js-no-lockfile wasmbrowsertest
.PHONY: deps-go-no-lockfile
deps-go-no-lockfile:
dep ensure --vendor-only
.PHONY: deps-js-no-lockfile
deps-js-no-lockfile:
yarn install --frozen-lockfile
.PHONY: test-all
test-all: test-go test-wasm-node test-wasm-browser
.PHONY: test-go
test-go: test-go-parallel test-go-serial
.PHONY: test-go-parallel
test-go-parallel:
go test ./... -race -timeout 30s
.PHONY: test-go-serial
test-go-serial:
go test ./ethereum ./zeroex/ordervalidator ./zeroex/orderwatch -race -timeout 90s -p=1 --serial
.PHONY: test-integration
test-integration:
go test ./integration-tests -timeout 185s --integration
.PHONY: test-wasm-node
test-wasm-node:
export ZEROEX_MESH_ROOT_DIR=$$(pwd); GOOS=js GOARCH=wasm go test -exec="$$ZEROEX_MESH_ROOT_DIR/test-wasm/go_js_wasm_exec" ./...
.PHONY: test-wasm-browser
test-wasm-browser:
GOOS=js GOARCH=wasm go test -tags=browser -exec="$$GOPATH/bin/wasmbrowsertest" ./...
.PHONY: lint
lint:
golangci-lint run
.PHONY: mesh
mesh:
go install ./cmd/mesh
.PHONY: mesh-keygen
mesh-keygen:
go install ./cmd/mesh-keygen
.PHONY: mesh-bootstrap
mesh-bootstrap:
go install ./cmd/mesh-bootstrap
.PHONY: db-integrity-check
db-integrity-check:
go install ./cmd/db-integrity-check
.PHONY: cut-release
cut-release:
go run ./cmd/cut-release/main.go
.PHONY: all
all: mesh mesh-keygen mesh-bootstrap db-integrity-check
# Docker images
.PHONY: docker-mesh
docker-mesh:
docker build . -t 0xorg/mesh -f ./dockerfiles/mesh/Dockerfile
.PHONY: docker-mesh-bootstrap
docker-mesh-bootstrap:
docker build . -t 0xorg/mesh-bootstrap -f ./dockerfiles/mesh-bootstrap/Dockerfile
.PHONY: docker-mesh-fluent-bit
docker-mesh-fluent-bit:
docker build ./dockerfiles/mesh-fluent-bit -t 0xorg/mesh-fluent-bit -f ./dockerfiles/mesh-fluent-bit/Dockerfile