-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
42 lines (31 loc) · 952 Bytes
/
Copy pathMakefile
File metadata and controls
42 lines (31 loc) · 952 Bytes
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
.PHONY: all build-cli test lint tidy clean pkgs
all: test-kem test-sha3 test-dsa lint
## List all packages
pkgs:
go list ./...
build-cli:
go build -mod=mod -o ./examples/fl/build/fl ./examples/fl/main.go
## Ensure go.mod is clean
tidy:
go mod tidy
git diff --exit-code
## Test all crypto packages
test-all: test-kem test-sha3 test-dsa
test-kem:
go test -C crypto -count=1 -v -race -cover ./kem/...
test-sha3:
go test -C crypto -count=1 -v -race -cover ./sha3/...
test-dsa:
go test -C crypto -count=1 -v -race -cover ./dsa/...
## Lint (requires golangci-lint installed)
LINT_BIN := $(shell go env GOPATH)/bin/golangci-lint
lint:
@if [ ! -f "$(LINT_BIN)" ]; then \
echo "==> Installing golangci-lint"; \
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh \
| sh -s -- -b $(shell go env GOPATH)/bin v1.64.8; \
fi
$(LINT_BIN) run ./...
## Clean build artifacts (optional)
clean:
go clean ./...