forked from IBM/idemix
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
37 lines (29 loc) · 1.03 KB
/
Copy pathMakefile
File metadata and controls
37 lines (29 loc) · 1.03 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
.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 ./...
.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 install github.com/google/addlicense@latest
.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
.PHONY: genprotos
genprotos:
go install github.com/bufbuild/buf/cmd/buf@v1.1.1
buf generate --template buf.gen.yaml