forked from cerc-io/laconicd-deprecated
fix: fix the make build
issue
This commit is contained in:
parent
fde19d25ad
commit
63b66c1ffc
12
Makefile
12
Makefile
@ -100,6 +100,12 @@ ifeq (,$(findstring nostrip,$(COSMOS_BUILD_OPTIONS)))
|
||||
BUILD_FLAGS += -trimpath
|
||||
endif
|
||||
|
||||
# Check for debug option
|
||||
ifeq (debug,$(findstring debug,$(COSMOS_BUILD_OPTIONS)))
|
||||
BUILD_FLAGS += -gcflags "all=-N -l"
|
||||
endif
|
||||
|
||||
all: tools build lint test
|
||||
# # The below include contains the tools and runsim targets.
|
||||
# include contrib/devtools/Makefile
|
||||
|
||||
@ -111,14 +117,16 @@ BUILD_TARGETS := build install
|
||||
|
||||
build: BUILD_ARGS=-o $(BUILDDIR)/
|
||||
build-linux:
|
||||
GOOS=linux GOARCH=amd64 LEDGER_ENABLED=false $(MAKE) build
|
||||
GOOS=linux GOARCH=$(if $(findstring aarch64,$(shell uname -m)) || $(findstring arm64,$(shell uname -m)),arm64,amd64) LEDGER_ENABLED=false $(MAKE) build
|
||||
|
||||
$(BUILD_TARGETS): go.sum $(BUILDDIR)/
|
||||
go $@ $(BUILD_FLAGS) $(BUILD_ARGS) ./...
|
||||
go $@ -mod=readonly $(BUILD_FLAGS) $(BUILD_ARGS) ./...
|
||||
|
||||
$(BUILDDIR)/:
|
||||
mkdir -p $(BUILDDIR)/
|
||||
|
||||
.PHONY: build build-linux cosmovisor
|
||||
|
||||
docker-build:
|
||||
# TODO replace with kaniko
|
||||
docker build -t ${DOCKER_IMAGE}:${DOCKER_TAG} .
|
||||
|
@ -35,7 +35,7 @@ cat $HOME/.chibaclonkd/config/genesis.json | jq '.app_state["mint"]["params"]["m
|
||||
"$PWD"/build/chibaclonkd validate-genesis
|
||||
|
||||
# Start the node (remove the --pruning=nothing flag if historical queries are not needed) in background and log to file
|
||||
"$PWD"/build/chibaclonkd start --pruning=nothing --rpc.unsafe --json-rpc.address="0.0.0.0:8545" --keyring-backend test > ethermintd.log 2>&1 &
|
||||
"$PWD"/build/chibaclonkd start --pruning=nothing --mode validator --rpc.unsafe --json-rpc.address="0.0.0.0:8545" --keyring-backend test > ethermintd.log 2>&1 &
|
||||
|
||||
# Give ethermintd node enough time to launch
|
||||
sleep 5
|
||||
|
@ -59,8 +59,8 @@ if [[ ! "$DATA_DIR" ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Compile ethermint
|
||||
echo "compiling ethermint"
|
||||
# Compile chibaclonk
|
||||
echo "compiling chibaclonk"
|
||||
make build
|
||||
|
||||
# PID array declaration
|
||||
@ -103,16 +103,16 @@ init_func() {
|
||||
}
|
||||
|
||||
start_func() {
|
||||
echo "starting ethermint node $i in background ..."
|
||||
echo "starting chibaclonk node $i in background ..."
|
||||
"$PWD"/build/chibaclonkd start --pruning=nothing --rpc.unsafe \
|
||||
--p2p.laddr tcp://$IP_ADDR:$NODE_P2P_PORT"$i" --address tcp://$IP_ADDR:$NODE_PORT"$i" --rpc.laddr tcp://$IP_ADDR:$NODE_RPC_PORT"$i" \
|
||||
--json-rpc.address=$IP_ADDR:$RPC_PORT"$i" \
|
||||
--json-rpc.api="eth,txpool,personal,net,debug,web3" \
|
||||
--keyring-backend test --home "$DATA_DIR$i" \
|
||||
--keyring-backend test --mode validator --home "$DATA_DIR$i" \
|
||||
>"$DATA_DIR"/node"$i".log 2>&1 & disown
|
||||
|
||||
ETHERMINT_PID=$!
|
||||
echo "started ethermint node, pid=$ETHERMINT_PID"
|
||||
echo "started chibaclonk node, pid=$ETHERMINT_PID"
|
||||
# add PID to array
|
||||
arr+=("$ETHERMINT_PID")
|
||||
|
||||
|
@ -6,7 +6,8 @@ chibaclonkd validate-genesis --home /chibaclonk
|
||||
echo "starting chibaclonk node $ID in background ..."
|
||||
chibaclonkd start \
|
||||
--home /chibaclonk \
|
||||
--keyring-backend test
|
||||
--keyring-backend test \
|
||||
--mode validator
|
||||
|
||||
echo "started ethermint node"
|
||||
tail -f /dev/null
|
@ -61,8 +61,8 @@ if [[ ! "$DATA_CLI_DIR" ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Compile ethermint
|
||||
echo "compiling ethermint"
|
||||
# Compile chibaclonk
|
||||
echo "compiling chibaclonk"
|
||||
make build
|
||||
|
||||
# PID array declaration
|
||||
@ -89,15 +89,15 @@ init_func() {
|
||||
}
|
||||
|
||||
start_func() {
|
||||
echo "starting ethermint node $i in background ..."
|
||||
echo "starting chibaclonk node $i in background ..."
|
||||
"$PWD"/build/chibaclonkd start --pruning=nothing --rpc.unsafe \
|
||||
--p2p.laddr tcp://$IP_ADDR:$NODE_P2P_PORT"$i" --address tcp://$IP_ADDR:$NODE_PORT"$i" --rpc.laddr tcp://$IP_ADDR:$NODE_RPC_PORT"$i" \
|
||||
--json-rpc.address=$IP_ADDR:$RPC_PORT"$i" \
|
||||
--keyring-backend test --home "$DATA_DIR$i" \
|
||||
--keyring-backend test --mode validator --home "$DATA_DIR$i" \
|
||||
>"$DATA_DIR"/node"$i".log 2>&1 & disown
|
||||
|
||||
ETHERMINT_PID=$!
|
||||
echo "started ethermint node, pid=$ETHERMINT_PID"
|
||||
echo "started chibaclonk node, pid=$ETHERMINT_PID"
|
||||
# add PID to array
|
||||
arr+=("$ETHERMINT_PID")
|
||||
}
|
||||
@ -123,7 +123,7 @@ if [[ -z $TEST || $TEST == "rpc" ]]; then
|
||||
|
||||
for i in $(seq 1 "$TEST_QTD"); do
|
||||
HOST_RPC=http://$IP_ADDR:$RPC_PORT"$i"
|
||||
echo "going to test ethermint node $HOST_RPC ..."
|
||||
echo "going to test chibaclonk node $HOST_RPC ..."
|
||||
MODE=$MODE HOST=$HOST_RPC go test ./tests/e2e/... -timeout=300s -v -short
|
||||
MODE=$MODE HOST=$HOST_RPC go test ./tests/rpc/... -timeout=300s -v -short
|
||||
|
||||
@ -136,7 +136,7 @@ stop_func() {
|
||||
ETHERMINT_PID=$i
|
||||
echo "shutting down node, pid=$ETHERMINT_PID ..."
|
||||
|
||||
# Shutdown ethermint node
|
||||
# Shutdown chibaclonk node
|
||||
kill -9 "$ETHERMINT_PID"
|
||||
wait "$ETHERMINT_PID"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user