Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Makefile #72

Merged
merged 1 commit into from
Apr 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 31 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,38 @@
.PHONY: update_system install_packages clone_repos setup_venv download_cometbft configure_node_local install test dev clean wipe up down restart init node-id dwu pull pull-and-install

update_system:
sudo apt-get update
sudo add-apt-repository ppa:deadsnakes/ppa -y
sudo apt-get update

install_packages:
sudo apt-get install pkg-config python3.11 python3.11-dev python3.11-venv libhdf5-dev build-essential

clone_repos:
git clone https://github.com/xian-network/xian-core.git
cd xian-core && git clone https://github.com/xian-network/contracting.git

setup_venv:
cd xian-core && python3.11 -m venv xian_venv
cd xian-core && source xian_venv/bin/activate && pip install -e contracting/ -e .

download_cometbft:
wget https://github.com/cometbft/cometbft/releases/download/v0.38.6/cometbft_0.38.6_linux_amd64.tar.gz
tar -xf cometbft_0.38.6_linux_amd64.tar.gz
rm cometbft_0.38.6_linux_amd64.tar.gz
./cometbft init

configure_node_local:
cd xian-core && source xian_venv/bin/activate && python src/xian/tools/configure.py --moniker "Node" --copy-genesis True --genesis-file-name genesis.json --validator-privkey "cd6cc45ffe7cebf09c6c6025575d50bb42c6c70c07e1dbc5150aaadc98705c2b"

install: update_system install_packages clone_repos setup_venv download_cometbft configure_node_local
@echo "Installation and setup for local node completed. Use 'make up' to start the node and 'make down' to stop it."

test:
pytest .

dev:
pip install --editable '.[dev]'
cd xian-core && source xian_venv/bin/activate && pip install --editable '.[dev]'

clean:
@rm -Rf dist/
Expand Down Expand Up @@ -37,13 +66,9 @@ dwu:
make up

pull:
cd ./contracting && git pull && cd ..
cd ./xian-core/contracting && git pull && cd ../..
git pull

install:
pip install -e ./contracting
pip install -e .

pull-and-install:
make pull
make install