-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
50 lines (34 loc) · 1.23 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
50
DRIVER_TARGETS = $(subst contrib/drivers/,driver-,$(wildcard contrib/drivers/*))
LIB_TARGETS = $(subst contrib/libs/,lib-,$(wildcard contrib/libs/*))
EXAMPLE_TARGETS = $(subst examples/,example-,$(wildcard examples/*))
DOC_LISTEN ?= --host 127.0.0.1
default: build
docs:
uv run --isolated --all-packages --group docs $(MAKE) -C docs html
serve-docs:
uv run --isolated --all-packages --group docs $(MAKE) -C docs serve HOST="$(DOC_LISTEN)"
clean-docs:
uv run --isolated --all-packages --group docs $(MAKE) -C docs clean
test-jumpstarter:
uv run --isolated --package jumpstarter pytest jumpstarter tests
test-driver-%: contrib/drivers/%
uv run --isolated --directory $< pytest
test-lib-%: contrib/libs/%
uv run --isolated --directory $< pytest
test-contrib: $(addprefix test-,$(DRIVER_TARGETS))
clean-venv:
-rm -rf ./.venv
-find . -type d -name __pycache__ -exec rm -r {} \+
clean-build:
-rm -rf dist
clean-test:
-rm .coverage
-rm coverage.xml
-rm -rf htmlcov
sync:
uv sync --all-packages --all-extras
test: test-jumpstarter test-contrib
build:
uv build --all --out-dir dist
clean: clean-docs clean-venv clean-build clean-test
.PHONY: sync docs test test-jumpstarter test-contrib build clean-test clean-docs clean-venv clean-build