forked from IBM/idemix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
32 lines (25 loc) · 969 Bytes
/
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
.PHONY: all
all: checks unit-tests unit-tests-race
.PHONY: checks
checks: check-deps
@test -z $(shell gofmt -l -s $(shell go list -f '{{.Dir}}' ./... | grep -v mpc) | tee /dev/stderr) || (echo "Fix formatting issues"; exit 1)
@go vet -all $(shell go list -f '{{.Dir}}' ./... | grep -v mpc)
find . -name '*.go' | xargs addlicense -check || (echo "Missing license headers"; exit 1)
.PHONY: unit-tests
unit-tests:
@go test -timeout 480s -cover $(shell go list ./...)
.PHONY: unit-tests-race
unit-tests-race:
@export GORACE=history_size=7; go test -timeout 960s -race -cover $(shell go list ./...)
.PHONY: check-deps
check-deps:
@go get -u github.com/google/addlicense
.PHONY: idemixgen
idemixgen:
@go install ./tools/idemixgen
.PHONY: binaries
binaries:
mkdir -p bin/amd64
GOOS=linux GOARCH=amd64 go build -o bin/amd64/idemixgen tools/idemixgen/main.go
mkdir -p bin/arm64
GOOS=darwin GOARCH=arm64 go build -o bin/arm64/idemixgen tools/idemixgen/main.go