-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmakefile
37 lines (29 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
33
34
35
36
37
PKGS=./...
.PHONY: default
default: test
.PHONY: ci
ci: test benchmark
.PHONY: test
test:
$(MAKE) test-arch GOARCH=amd64
$(MAKE) test-arch GOARCH=386
.PHONY: test-coverage
test-coverage:
$(MAKE) test-coverage-arch GOARCH=amd64
$(MAKE) test-coverage-arch GOARCH=386
.PHONY: test-coverage-arch
test-coverage-arch:
go test -cover -coverprofile=coverage$(GOARCH).out github.com/tigrannajaryan/govariant/variant
.PHONY: test-arch
test-arch:
@echo ============================== Testing GOARCH=$(GOARCH) ==============================
go test -v ./...
.PHONY: benchmark
benchmark:
$(MAKE) benchmark-arch GOARCH=amd64
$(MAKE) benchmark-arch GOARCH=386
.PHONY: benchmark-arch
benchmark-arch:
@echo ============================== Benchmarking GOARCH=$(GOARCH) =========================
go test -bench . -benchmem $(PKGS) $(BENCHARGS) | tee benchmark/benchmark.log
sed -f benchmark/patch_results.sed benchmark/benchmark.log > benchmark/benchmark$(GOARCH).log