-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
58 lines (45 loc) · 1.59 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
all: test check build python wasm
fmt:
cargo fmt --check
# A collection of lints to catch common mistakes and improve your Rust code.
clippy:
cargo clippy -- -Dwarnings
cargo clippy --all-targets --features=python_binding -- -D warnings
clean:
cargo clean
# the following subfolder targets only appears when running `maturin develop --release`
cd src/heapz && cargo clean
cd src/highs/fuzz && cargo clean
cd src/highs && cargo clean
cd src/pheap && cargo clean
cd src/slp && cargo clean
clean-env: clean fmt
test: clean-env
cargo test
cargo test --release
cargo test --no-default-features --features rational_weight,embed_visualizer,qecp_integrate,progress_bar
cargo test -r --no-default-features --features rational_weight,embed_visualizer,qecp_integrate,progress_bar
ci_rust_test:
cargo test --release
cargo test -r --no-default-features --features rational_weight,embed_visualizer,qecp_integrate,progress_bar
build: clean-env
cargo build
cargo build --release
# build test binary
cargo test --no-run
cargo test --no-run --release
cargo test --no-run --features python_binding
cargo test --no-run --features python_binding --release
check: clean-env
cargo check
# cargo check --lib --no-default-features --features wasm_binding,rational_weight,embed_visualizer
cargo check --release
python: clean-env
maturin develop
# pytest tests/python
wasm: clean-env
wasm-pack build --no-default-features --features wasm_binding,rational_weight,embed_visualizer
# test code coverage: see https://lib.rs/crates/cargo-llvm-cov
coverage:
cargo llvm-cov --html
# open target/llvm-cov/html/index.html