-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
59 lines (46 loc) · 1.16 KB
/
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# Copyright © 2019, Oleksandr Krykovliuk <k33nice@gmail.com>.
# Use of this source code is governed by the
# MIT license that can be found in the LICENSE file.
SHELL = bash
GO ?= go
arch ?= amd64
.PHONY: all
all: all-tests
@echo "Done!"
.PHONY: get
get:
@echo "Resolve dependencies..."
@$(GO) get -v .
.PHONY: all-tests
all-tests:
@echo "Run tests..."
@$(GO) test .
.PHONY: benchmark
benchmark:
@echo "Run benchmarks..."
@$(GO) test -v -benchmem -bench=. -run=^a
.PHONY: test-race
test-race:
@echo "Run tests with race condition..."
@$(GO) test --race -v .
.PHONY: test-cover-builder
test-cover-builder:
@$(GO) test -covermode=count -coverprofile=/tmp/libart.out .
@rm -f /tmp/art_coverage.out
@echo "mode: count" > /tmp/art_coverage.out
@cat /tmp/libart.out | tail -n +2 >> /tmp/art_coverage.out
@rm /tmp/libart.out
.PHONY: test-cover
test-cover: test-cover-builder
@$(GO) tool cover -html=/tmp/art_coverage.out
.PHONY: build
build:
@echo "Build project..."
@$(GO) build -v .
.PHONY: build-asm
build-asm:
@$(GO) build -a -work -v -gcflags="-S -B -C" .
.PHONY: build-race
build-race:
@echo "Build project with race condition..."
@$(GO) build --race -v .