This repository has been archived by the owner on Apr 11, 2024. It is now read-only.
forked from sygmaprotocol/sygma-relayer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
57 lines (42 loc) · 2.44 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
.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/common/mock/tss.go github.com/binance-chain/tss-lib/tss Message
mockgen -destination=./tss/common/mock/communication.go -source=./tss/common/base.go -package mock_tss
mockgen -destination=./tss/keygen/mock/storer.go -source=./tss/keygen/keygen.go
mockgen -destination=./tss/keygen/mock/storer.go -source=./tss/keygen/keygen.go
mockgen --package mock_tss -destination=./tss/mock/storer.go -source=./tss/resharing/resharing.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/listener/event-handler.go -destination=./chains/evm/listener/mock/listener.go
mockgen -source=./chains/evm/calls/events/listener.go -destination=./chains/evm/calls/events/mock/listener.go
mockgen -source=./chains/substrate/listener/listener.go -destination=./chains/substrate/listener/mock/listener.go
mockgen -source=./chains/substrate/listener/event-handlers.go -destination=./chains/substrate/listener/mock/handlers.go
mockgen -destination=chains/evm/listener/mock/core/listener.go github.com/ChainSafe/chainbridge-core/chains/evm/listener EventListener,DepositHandler
mockgen -source=./topology/topology.go -destination=./topology/mock/topology.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)