forked from iotaledger/wasp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
50 lines (35 loc) · 1.27 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
GIT_COMMIT_SHA := $(shell git rev-list -1 HEAD)
BUILD_TAGS = rocksdb,builtin_static
BUILD_LD_FLAGS = "-X github.com/iotaledger/wasp/packages/wasp.VersionHash=$(GIT_COMMIT_SHA)"
#
# You can override these e.g. as
# make test TEST_PKG=./packages/vm/core/testcore/ TEST_ARG="-v --run TestAccessNodes"
#
TEST_PKG=./...
TEST_ARG=
all: build-lint
build:
go build -o . -tags $(BUILD_TAGS) -ldflags $(BUILD_LD_FLAGS) ./...
build-windows:
go build -o . -tags $(BUILD_TAGS) -ldflags $(BUILD_LD_FLAGS) -buildmode=exe ./...
build-lint: build lint
test-full: install
go test -tags $(BUILD_TAGS),runheavy ./... --timeout 60m --count 1 -failfast
test: install
go test -tags $(BUILD_TAGS) $(TEST_PKG) --timeout 30m --count 1 -failfast $(TEST_ARG)
test-short:
go test -tags $(BUILD_TAGS) --short --count 1 -failfast ./...
install:
go install -tags $(BUILD_TAGS) -ldflags $(BUILD_LD_FLAGS) ./...
install-windows:
go install -tags $(BUILD_TAGS) -ldflags $(BUILD_LD_FLAGS) -buildmode=exe ./...
lint:
golangci-lint run
gofumpt-list:
gofumpt -l ./
docker-build:
docker build \
--build-arg BUILD_TAGS=${BUILD_TAGS} \
--build-arg BUILD_LD_FLAGS='${BUILD_LD_FLAGS}' \
.
.PHONY: all build build-windows build-lint test test-short test-full install install-windows lint gofumpt-list docker-build