-
-
Notifications
You must be signed in to change notification settings - Fork 49
Expand file tree
/
Copy pathMakefile
More file actions
56 lines (41 loc) · 1.07 KB
/
Makefile
File metadata and controls
56 lines (41 loc) · 1.07 KB
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
50
51
52
53
54
55
56
REQUIREMENT = requirements.txt
VER = $(word 2, $(shell python3 --version 2>&1))
SRC = app.py app_test.py
PY36 = $(shell expr $(VER) \>= 3.6)
.PHONY: all docs deps pytest build test format clean rust-test
all: build test
docs:
cd docs && make html
build:
./build.sh
cuda:
./build.sh --cuda
test: build
cd build && ctest --output-on-failure
rust-test:
cd src/rust && cargo test
test-all: test rust-test
test-cuda: cuda
cd build && ctest --output-on-failure
pytest: clean docs
pycodestyle $(SRC)
pydocstyle $(SRC)
bandit app.py
coverage run app_test.py && coverage report --fail-under=100 -m $(SRC)
ifeq ($(PY36), 1)
black --quiet --diff --check --line-length 79 $(SRC)
endif
deps:
pip install -r requirements.txt
ifeq ($(PY36), 1)
pip install black==22.3.0
endif
format:
find . -type f -name "*.cc" -o -name "*.h" -o -name "*.cu" -o -name "*.cuh" -o -name "*.cppm" -o -name "*.cpp" | xargs -I{} clang-format -style=file -i {}
cd src/rust && cargo fmt
clean:
rm -rf build
cd docs && make clean
.PHONY: sqush
sqush: clean
./enroot.sh -n cuda -f ${PWD}/Dockerfile