mirror of
https://github.com/SwingbyProtocol/tss-lib.git
synced 2026-01-10 06:18:03 -05:00
47 lines
1.2 KiB
Makefile
47 lines
1.2 KiB
Makefile
MODULE = github.com/binance-chain/tss-lib
|
|
PACKAGES = $(shell go list ./... | grep -v '/vendor/')
|
|
|
|
all: protob test
|
|
|
|
########################################
|
|
### Protocol Buffers
|
|
|
|
protob:
|
|
@echo "--> Building Protocol Buffers"
|
|
@for protocol in message signature ecdsa-keygen ecdsa-signing ecdsa-resharing eddsa-keygen eddsa-signing eddsa-resharing; do \
|
|
echo "Generating $$protocol.pb.go" ; \
|
|
protoc --go_out=. ./protob/$$protocol.proto ; \
|
|
done
|
|
|
|
build: protob
|
|
go fmt ./...
|
|
|
|
########################################
|
|
### Testing
|
|
|
|
test_unit:
|
|
@echo "--> Running Unit Tests"
|
|
@echo "!!! WARNING: This will take a long time :)"
|
|
go test -timeout 30m $(PACKAGES)
|
|
|
|
test_unit_race:
|
|
@echo "--> Running Unit Tests (with Race Detection)"
|
|
@echo "!!! WARNING: This will take a long time :)"
|
|
go test -timeout 30m -race $(PACKAGES)
|
|
|
|
test:
|
|
make test_unit
|
|
|
|
########################################
|
|
### Pre Commit
|
|
|
|
pre_commit: build test
|
|
|
|
########################################
|
|
|
|
# To avoid unintended conflicts with file names, always add to .PHONY
|
|
# # unless there is a reason not to.
|
|
# # https://www.gnu.org/software/make/manual/html_node/Phony-Targets.html
|
|
.PHONY: protob build test_unit test_unit_race test
|
|
|