-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
28 lines (23 loc) · 965 Bytes
/
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
help:
@awk -F ':|##' '/^[^\t].+:.*##/ { printf "\033[36mmake %-28s\033[0m -%s\n", $$1, $$NF }' $(MAKEFILE_LIST) | sort
env: ## install env requirements
echo "installing python packages..." && \
pip install -r requirements.txt
.PHONY: build
GENERATED_DIR := ./keysight_chakra/generated
build: ## compile all .proto files and generate artifacts
curl -L -o ./protos/et_def.proto https://raw.githubusercontent.com/mlcommons/chakra/main/schema/protobuf/et_def.proto
rm -rf $(GENERATED_DIR) || true
mkdir -p $(GENERATED_DIR)
python3 -m grpc_tools.protoc \
--proto_path=./protos \
--python_out=$(GENERATED_DIR) \
--pyi_out=$(GENERATED_DIR) \
--grpc_python_out=$(GENERATED_DIR) \
et_def.proto infra.proto bind.proto service.proto
python3 -m pip uninstall -y keysight-chakra
python3 setup.py bdist_wheel
python3 -m pip install --no-cache .
.PHONY: test
test: build ## run sanity tests on the distribution
python3 -m pytest -s keysight_chakra/tests