forked from sprintertech/sygma-relayer
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
63 lines (47 loc) · 2.93 KB
/
Makefile
File metadata and controls
63 lines (47 loc) · 2.93 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
63
.PHONY: help run build install license example e2e-test
all: help
export GOLANG_PROTOBUF_REGISTRATION_CONFLICT=ignore
## license: Adds license header to missing files.
license:
@echo " > \033[32mAdding license headers...\033[0m "
GO111MODULE=off go get -u github.com/google/addlicense
addlicense -v -c "Sygma" -f ./scripts/header.txt -y 2021 -ignore ".idea/**" .
## license-check: Checks for missing license headers
license-check:
@echo " > \033[Checking for license headers...\033[0m "
GO111MODULE=off go get -u github.com/google/addlicense
addlicense -check -c "Sygma" -f ./scripts/header.txt -y 2021 -ignore ".idea/**" .
coverage:
go tool cover -func cover.out | grep total | awk '{print $3}'
test:
./scripts/tests.sh
genmocks:
mockgen -destination=./tss/ecdsa/common/mock/tss.go github.com/binance-chain/tss-lib/tss Message
mockgen -destination=./tss/ecdsa/common/mock/communication.go -source=./tss/ecdsa/common/base.go -package mock_tss
mockgen -destination=./tss/ecdsa/common/mock/fetcher.go -source=./tss/ecdsa/signing/signing.go -package mock_tss
mockgen --package mock_tss -destination=./tss/mock/ecdsa.go -source=./tss/ecdsa/keygen/keygen.go
mockgen -source=./tss/coordinator.go -destination=./tss/mock/coordinator.go
mockgen -source=./comm/communication.go -destination=./comm/mock/communication.go
mockgen -source=./chains/evm/calls/events/listener.go -destination=./chains/evm/calls/events/mock/listener.go
mockgen -source=./topology/topology.go -destination=./topology/mock/topology.go
mockgen -destination=./comm/p2p/mock/host/host.go github.com/libp2p/go-libp2p/core/host Host
mockgen -destination=./comm/p2p/mock/conn/conn.go github.com/libp2p/go-libp2p/core/network Conn
mockgen -destination=./comm/p2p/mock/stream/stream.go github.com/libp2p/go-libp2p/core/network Stream,Conn
mockgen -source=./chains/evm/message/across.go -destination=./chains/evm/message/mock/across.go
mockgen -source=./chains/evm/message/lifiEscrow.go -destination=./chains/evm/message/mock/lifiEscrow.go
mockgen -source=./chains/evm/message/confirmations.go -destination=./chains/evm/message/mock/confirmations.go
mockgen -source=./api/handlers/signing.go -destination=./api/handlers/mock/signing.go
mockgen -package mock_message -destination=./chains/evm/message/mock/pricing.go github.com/sprintertech/lifi-solver/pkg/pricing OrderPricer
mockgen -source=./chains/lighter/message/lighter.go -destination=./chains/lighter/message/mock/lighter.go
mockgen -source=./protocol/lifi/event.go -destination=./protocol/lifi/mock/event.go
e2e-test:
./scripts/e2e_tests.sh
example:
docker-compose --file=./example/docker-compose.yml up --build
PLATFORMS := linux/amd64 darwin/amd64 darwin/arm64 linux/arm
temp = $(subst /, ,$@)
os = $(word 1, $(temp))
arch = $(word 2, $(temp))
$(PLATFORMS):
GOOS=$(os) GOARCH=$(arch) go build -ldflags "-X google.golang.org/protobuf/reflect/protoregistry.conflictPolicy=ignore" -o 'build/${os}-${arch}/relayer'; \
build-all: $(PLATFORMS)