-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
49 lines (37 loc) · 1.34 KB
/
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
export PROJECT_DIR=$(CURDIR)
export PYTHON_VERSION=$(shell python3 -c 'import sys; print(f"cp{sys.version_info.major}{sys.version_info.minor}")')
.PHONY: docs build_savant build_savant_release clean tests bench reformat
dev: clean build_savant
release: clean build_savant_release
install:
pip install --force-reinstall $(PROJECT_DIR)/dist/*$(PYTHON_VERSION)*.whl
docs:
@echo "Building docs..."
make dev install
cd $(PROJECT_DIR)/docs && make clean html
tar --dereference --hard-dereference --directory $(PROJECT_DIR)/docs/build/html -cvf $(PROJECT_DIR)/docs-artifact.tar .
build_savant:
@echo "Building..."
utils/build.sh debug
build_savant_release:
@echo "Building..."
utils/build.sh release
clean:
@echo "Cleaning..."
rm -rf $(PROJECT_DIR)/dist/*.whl
pythontests:
@echo "Running tests..."
cd savant_python && cargo build && cargo test --no-default-features -- --test-threads=1 # --show-output --nocapture
core-tests:
@echo "Running core lib tests..."
cd savant_core && cargo build && cargo test -- --test-threads=1 # --show-output --nocapture
bench:
@echo "Running benchmarks..."
cd savant_core && cargo bench --no-default-features -- --show-output --nocapture
reformat:
unify --in-place --recursive python
unify --in-place --recursive savant_python/python
black python
black savant_python/python
isort python
isort savant_python/python