erigon-pulse/Makefile

155 lines
4.3 KiB
Makefile
Raw Normal View History

GOBIN = ./build/bin
2020-08-21 12:38:11 +00:00
GOBUILD = env GO111MODULE=on go build -trimpath
GOTEST = go test ./... -p 1
LATEST_COMMIT ?= $(shell git log -n 1 origin/master --pretty=format:"%H")
ifeq ($(LATEST_COMMIT),)
LATEST_COMMIT := $(shell git log -n 1 HEAD~1 --pretty=format:"%H")
endif
2020-08-21 12:38:11 +00:00
all: tg hack tester rpctest state restapi pics rpcdaemon integration
docker:
docker build -t turbo-geth:latest .
docker-alltools:
docker build -t turbo-geth-alltools:latest -f Dockerfile.alltools .
docker-compose:
docker-compose up
geth:
2020-08-21 12:38:11 +00:00
$(GOBUILD) -o $(GOBIN)/tg ./cmd/geth
@echo "Done building."
@echo "Run \"$(GOBIN)/tg\" to launch turbo-geth."
tg:
2020-08-21 12:38:11 +00:00
$(GOBUILD) -o $(GOBIN)/tg ./cmd/geth
@echo "Done building."
@echo "Run \"$(GOBIN)/tg\" to launch turbo-geth."
hack:
2020-08-21 12:38:11 +00:00
$(GOBUILD) -o $(GOBIN)/hack ./cmd/hack
@echo "Done building."
@echo "Run \"$(GOBIN)/hack\" to launch hack."
tester:
2020-08-21 12:38:11 +00:00
$(GOBUILD) -o $(GOBIN)/tester ./cmd/tester
@echo "Done building."
@echo "Run \"$(GOBIN)/tester\" to launch tester."
rpctest:
2020-08-21 12:38:11 +00:00
$(GOBUILD) -o $(GOBIN)/rpctest ./cmd/rpctest
@echo "Done building."
@echo "Run \"$(GOBIN)/rpctest\" to launch rpctest."
state:
2020-08-21 12:38:11 +00:00
$(GOBUILD) -o $(GOBIN)/state ./cmd/state
@echo "Done building."
@echo "Run \"$(GOBIN)/state\" to launch state."
2020-02-09 10:31:52 +00:00
restapi:
2020-08-21 12:38:11 +00:00
$(GOBUILD) -o $(GOBIN)/restapi ./cmd/restapi
2020-02-09 10:31:52 +00:00
@echo "Done building."
@echo "Run \"$(GOBIN)/restapi\" to launch restapi."
run-web-ui:
@echo 'Web: Turbo-Geth Debug Utility is launching...'
@cd debug-web-ui && yarn start
pics:
2020-08-21 12:38:11 +00:00
$(GOBUILD) -o $(GOBIN)/pics ./cmd/pics
@echo "Done building."
@echo "Run \"$(GOBIN)/pics\" to launch pics."
rpcdaemon:
2020-08-21 12:38:11 +00:00
$(GOBUILD) -o $(GOBIN)/rpcdaemon ./cmd/rpcdaemon
@echo "Done building."
@echo "Run \"$(GOBIN)/rpcdaemon\" to launch rpcdaemon."
semantics: semantics/z3/build/libz3.a
build/env.sh go run build/ci.go install ./cmd/semantics
@echo "Done building."
@echo "Run \"$(GOBIN)/semantics\" to launch semantics."
semantics/z3/build/libz3.a:
cd semantics/z3 && python scripts/mk_make.py --staticlib
cd semantics/z3/build && ${MAKE} -j8
cp semantics/z3/build/libz3.a .
integration:
2020-08-21 12:38:11 +00:00
$(GOBUILD) -o $(GOBIN)/integration ./cmd/integration
@echo "Done building."
@echo "Run \"$(GOBIN)/integration\" to launch integration tests."
test: semantics/z3/build/libz3.a
2020-08-21 12:38:11 +00:00
$(GOTEST)
test-lmdb: semantics/z3/build/libz3.a
2020-08-21 12:38:11 +00:00
TEST_DB=lmdb $(GOTEST)
test-bolt: semantics/z3/build/libz3.a
2020-08-21 12:38:11 +00:00
TEST_DB=bolt $(GOTEST)
lint: lintci
lintci: semantics/z3/build/libz3.a
@echo "--> Running linter for code diff versus commit $(LATEST_COMMIT)"
@./build/bin/golangci-lint run \
--new-from-rev=$(LATEST_COMMIT) \
--config ./.golangci/step1.yml \
--exclude "which can be annoying to use"
@./build/bin/golangci-lint run \
--new-from-rev=$(LATEST_COMMIT) \
--config ./.golangci/step2.yml
@./build/bin/golangci-lint run \
--new-from-rev=$(LATEST_COMMIT) \
--config ./.golangci/step3.yml
@./build/bin/golangci-lint run \
--new-from-rev=$(LATEST_COMMIT) \
--config ./.golangci/step4.yml
lintci-deps:
2019-11-06 12:34:35 +00:00
rm -f ./build/bin/golangci-lint
curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b ./build/bin v1.29.0
clean:
env GO111MODULE=on go clean -cache
rm -fr build/_workspace/pkg/ $(GOBIN)/*
2017-02-26 22:52:10 +00:00
# The devtools target installs tools required for 'go generate'.
# You need to put $GOBIN (or $GOPATH/bin) in your PATH to use 'go generate'.
devtools:
env GOBIN= go install golang.org/x/tools/cmd/stringer
env GOBIN= go install github.com/kevinburke/go-bindata/go-bindata
env GOBIN= go install github.com/fjl/gencodec
env GOBIN= go install ./cmd/abigen
@type "npm" 2> /dev/null || echo 'Please install node.js and npm'
@type "solc" 2> /dev/null || echo 'Please install solc'
@type "protoc" 2> /dev/null || echo 'Please install protoc'
2017-02-26 22:52:10 +00:00
bindings:
go generate ./tests/contracts/
2020-04-29 10:51:07 +00:00
go generate ./cmd/tester/contracts/
go generate ./core/state/contracts/
grpc:
# See also: ./cmd/hack/binary-deps/main.go
env GOBIN= go install google.golang.org/protobuf/cmd/protoc-gen-go # generates proto messages
env GOBIN= go install google.golang.org/grpc/cmd/protoc-gen-go-grpc # generates grpc services
2020-07-27 12:15:48 +00:00
go generate ./ethdb
simulator-genesis:
go run ./cmd/tester genesis > ./cmd/tester/simulator_genesis.json
2020-04-29 10:51:07 +00:00
prometheus:
2020-08-01 15:05:48 +00:00
docker-compose up prometheus grafana
escape:
2020-06-15 16:39:34 +00:00
cd $(path) && go test -gcflags "-m -m" -run none -bench=BenchmarkJumpdest* -benchmem -memprofile mem.out