-
Notifications
You must be signed in to change notification settings - Fork 60
/
Makefile
45 lines (39 loc) · 1.25 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
.PHONY: lint
lint:
cargo fmt -- --check
cargo clippy --all-targets --all-features -- -W clippy::unwrap_used -W clippy::expect_used -W clippy::panic -D warnings
cd webapp && npm install && npm run check
.PHONY: format
format:
cargo fmt
.PHONY: tests
tests: lint
cargo test
make remove-artifacts
# Regretabbly we need to build the wasm twice, once for the nodejs tests
# and a second one for the vitest.
cd bindings/wasm/ && wasm-pack build --target nodejs && node tests/test.mjs && make
cd webapp && npm run test
cd bindings/python && ./run_tests.sh && ./run_examples.sh
.PHONY: remove-artifacts
remove-artifacts:
rm -f xlsx/hello-calc.xlsx
rm -f xlsx/hello-styles.xlsx
rm -f xlsx/widths-and-heights.xlsx
.PHONY: clean
clean: remove-artifacts
cargo clean
rm -r -f base/target
rm -r -f xlsx/target
rm -r -f bindings/python/target
rm -r -f bindings/wasm/targets
rm -f cargo-test-*
rm -f base/cargo-test-*
rm -f xlsx/cargo-test-*
.PHONY: coverage
coverage:
CARGO_INCREMENTAL=0 RUSTFLAGS='-C instrument-coverage' LLVM_PROFILE_FILE='cargo-test-%p-%m.profraw' cargo test
grcov . --binary-path ./target/debug/deps/ -s . -t html --branch --ignore-not-existing --ignore '../*' --ignore "/*" -o target/coverage/html
.PHONY: docs
docs:
cargo doc --no-deps