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

feat: install dev dependencies in make file #815

Merged
merged 3 commits into from
Apr 11, 2023
Merged
Changes from 2 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
26 changes: 26 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,29 @@ miri:
ensure-disk-quota:
# ensure the target directory not to exceed 40GB
python3 ./scripts/clean-large-folder.py ./target 42949672960

# install dev dependencies
ifeq ($(shell uname), Darwin)
dev-setup:
echo "Detecting macOS system..."
brew --version >/dev/null 2>&1 || { echo "Error: Homebrew is not installed. Exiting..."; exit 1; }
echo "Installing dependencies using Homebrew..."
brew install git curl openssl protobuf cmake
else ifeq ($(shell uname), Linux)
dev-setup:
echo "Detecting Linux system..."
os_id=$(shell awk -F= '/^ID=/{print $$2}' /etc/os-release) && \
MichaelLeeHZ marked this conversation as resolved.
Show resolved Hide resolved
if [ "$$os_id" = "ubuntu" ]; then \
echo "Detected Ubuntu system..."; \
echo "Installing dependencies using apt-get..."; \
sudo apt-get update; \
sudo apt install -y git curl gcc g++ libssl-dev pkg-config protobuf-compiler cmake; \
else \
echo "Error: Unsupported Linux distribution. Exiting..."; \
exit 1; \
fi
else
dev-setup:
echo "Error: Unsupported OS. Exiting..."
exit 1
endif