-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
58 lines (41 loc) · 1.33 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
51
52
53
54
55
56
57
58
CARGO_ARGS?=
PYTEST_ARGS?=
.PHONY: default
default: build
build:
cargo build $(CARGO_ARGS)
.env:
python3 -m venv .env
. .env/bin/activate && pip install maturin pytest protobuf
wasm-binding:
$(MAKE_COMMAND) -C wasm wasm-binding
wasm-binding-release:
$(MAKE_COMMAND) -C wasm wasm-binding-release
python-binding: .env
. .env/bin/activate && cd python && maturin build $(CARGO_ARGS)
python-binding-release: .env
. .env/bin/activate && cd python && maturin build --release $(CARGO_ARGS)
wasm-example:
$(MAKE_COMMAND) -C wasm wasm-example
wasm-example-release:
$(MAKE_COMMAND) -C wasm wasm-example-release
.PHONY: all
all: wasm-binding python-binding build
run-tests:
RSCEL_TEST_PROTO=1 cargo test -q $(CARGO_ARGS)
run-no-feature-tests:
cargo test -q --no-default-features $(CARGO_ARGS)
run-python-tests: .env python-binding
. .env/bin/activate && \
pip install --force-reinstall target/wheels/$(shell ls target/wheels) && \
cd test && \
python -m pytest test_rscel.py $(PYTEST_ARGS)
run-all-python-tests: .env python-binding
. .env/bin/activate && \
pip install --force-reinstall target/wheels/$(shell ls target/wheels) && \
cd test && \
python -m pytest test*.py $(PYTEST_ARGS)
run-wasm-tests:
$(MAKE_COMMAND) -C wasm wasm-tests
.PHONY: run-all-tests
run-all-tests: run-tests run-no-feature-tests run-python-tests run-wasm-tests