-
Notifications
You must be signed in to change notification settings - Fork 187
/
Makefile
92 lines (72 loc) · 2.28 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
.PHONY: compile-el compile-dl clean protoc lint build unit-tests integration-tests-churner integration-tests-indexer integration-tests-inabox integration-tests-inabox-nochurner integration-tests-graph-indexer
ifeq ($(wildcard .git/*),)
$(warning semver disabled - building from release zip)
GITCOMMIT := ""
GITSHA := ""
GITDATE := ""
BRANCH := ""
SEMVER := $(shell basename $(CURDIR))
else
GITCOMMIT := $(shell git rev-parse --short HEAD)
GITDATE := $(shell git log -1 --format=%cd --date=unix)
GITSHA := $(shell git rev-parse HEAD)
BRANCH := $(shell git rev-parse --abbrev-ref HEAD | sed 's/[^[:alnum:]\.\_\-]/-/g')
SEMVER := $(shell docker run --rm --volume "$(PWD):/repo" gittools/gitversion:5.12.0 /repo -output json -showvariable SemVer)
ifeq ($(SEMVER), )
$(warning semver disabled - docker not installed)
SEMVER := "0.0.0"
endif
endif
RELEASE_TAG := $(or $(RELEASE_TAG),latest)
compile-el:
cd contracts && ./compile.sh compile-el
compile-dl:
cd contracts && ./compile.sh compile-dl
clean:
./api/builder/clean.sh
# Builds the protobuf files inside a docker container.
protoc: clean
./api/builder/protoc-docker.sh
./api/builder/generate-docs.sh
# Builds the protobuf files locally (i.e. without docker).
protoc-local: clean
./api/builder/protoc.sh
lint:
golint -set_exit_status ./...
go tool fix ./..
golangci-lint run
build:
cd operators/churner && make build
cd disperser && make build
cd node && make build
cd retriever && make build
cd tools/traffic && make build
cd tools/kzgpad && make build
cd relay && make build
dataapi-build:
cd disperser && go build -o ./bin/dataapi ./cmd/dataapi
unit-tests:
./test.sh
integration-tests-churner:
go test -v ./churner/tests
integration-tests-indexer:
go test -v ./core/indexer
integration-tests-node-plugin:
go test -v ./node/plugin/tests
integration-tests-inabox:
make build
cd inabox && make run-e2e
integration-tests-inabox-nochurner:
make build
cd inabox && make run-e2e-nochurner
integration-tests-graph-indexer:
make build
go test -v ./core/thegraph
integration-tests-dataapi:
make dataapi-build
go test -v ./disperser/dataapi
docker-release-build:
BUILD_TAG=${SEMVER} SEMVER=${SEMVER} GITDATE=${GITDATE} GIT_SHA=${GITSHA} GIT_SHORT_SHA=${GITCOMMIT} \
docker buildx bake node-group-release ${PUSH_FLAG}
semver:
echo "${SEMVER}"