forked from EspressoSystems/tagged-base64
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
46 lines (38 loc) · 1.03 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
# Copyright © 2022 Translucence Research, Inc. All rights reserved.
.PHONY: build
build:
cargo build --release
wasm-pack build
.PHONY: clean
clean:
cargo clean
cargo clean --release
rm -rf ./target grcov-*.profraw
.PHONY: check
check:
cargo check
.PHONY: test
test:
cargo test --release
wasm-pack test --headless --firefox --chrome
.PHONY: doc
doc:
cargo doc --no-deps
.PHONY: coverage
coverage: export RUSTUP_TOOLCHAIN=nightly
coverage: export LLVM_PROFILE_FILE=grcov-%p-%m.profraw
coverage: export RUSTFLAGS=-Zinstrument-coverage
coverage:
rm -rf grcov-*.profraw default.profraw
cargo test
grcov . \
--binary-path ./target/debug/ \
-s . \
-t html \
--branch \
--ignore-not-existing \
-o ./coverage/ && \
echo "See file://${PWD}/coverage/index.html for coverage."
.PHONY: setup
setup:
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh