-
Notifications
You must be signed in to change notification settings - Fork 2.2k
/
Makefile
45 lines (35 loc) · 1.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
GIT_COMMIT := $(shell git rev-parse HEAD)
GIT_DATE := $(shell git show -s --format='%ct')
LD_FLAGS_ARGS +=-X github.com/taikoxyz/taiko-mono/packages/taiko-client/version.GitCommit=$(GIT_COMMIT)
LD_FLAGS_ARGS +=-X github.com/taikoxyz/taiko-mono/packages/taiko-client/version.GitDate=$(GIT_DATE)
LD_FLAGS := -ldflags "$(LD_FLAGS_ARGS)"
build:
@GO111MODULE=on CGO_CFLAGS="-O -D__BLST_PORTABLE__" CGO_CFLAGS_ALLOW="-O -D__BLST_PORTABLE__" go build -v $(LD_FLAGS) -o bin/taiko-client cmd/main.go
clean:
@rm -rf bin/*
lint:
@go install golang.org/x/tools/cmd/goimports@latest \
&& go install github.com/golangci/golangci-lint/cmd/[email protected] \
&& goimports -local "github.com/taikoxyz/taiko-mono/packages/taiko-client" -w ./ \
&& golangci-lint run
test:
@PACKAGE=${PACKAGE} \
L2_NODE=$${L2_NODE:-l2_geth} \
RUN_TESTS=true \
./integration_test/entrypoint.sh
# HIVE_BASE_DIR(the path of [email protected]:taikoxyz/hive.git) is necessary when run hive_test in local environment.
hive_tests:
@sh ./integration_test/hive_tests.sh
dev_net:
@COMPILE_PROTOCOL=${COMPILE_PROTOCOL} \
./integration_test/entrypoint.sh
gen_bindings:
@TAIKO_GETH_DIR=${TAIKO_GETH_DIR} \
./scripts/gen_bindings.sh
.PHONY: build \
clean \
lint \
test \
hive_tests \
dev_net \
gen_bindings