-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile.toml
82 lines (71 loc) · 1.7 KB
/
Makefile.toml
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
[tasks.install-hooks]
script = '''
echo "Installing git hooks..."
cp .githooks/* .git/hooks
'''
script_runner = "@shell"
[tasks.install-nextest]
install_crate = "cargo-nextest"
[tasks.install-llvm-tools]
install_crate = { rustup_component_name = "llvm-tools-preview" }
dependencies = ["install-nextest"]
[tasks.install-llvm-cov]
install_crate = "cargo-llvm-cov"
dependencies = ["install-llvm-tools"]
[tasks.coverage]
env = { RUST_LOG = "trace" }
script = '''
cargo llvm-cov nextest --all-features --lcov --ignore-filename-regex ".cargo|.*_test\.rs" > ./target/debug/lcov.info
genhtml -o ./target/debug/coverage/ --show-details --highlight --ignore-errors source --legend ./target/debug/lcov.info
'''
clear = true
dependencies = ["install-llvm-cov"]
[tasks.view-coverage]
script = '''
xdg-open ./target/debug/coverage/index.html
'''
dependencies = ["coverage"]
[tasks.view-coverage.windows]
script = '''
./target/debug/coverage/index.html
'''
dependencies = ["coverage"]
script_runner = "@shell"
[tasks.test]
command = "cargo"
args = ["nextest", "run"]
clear = true
install_crate = "cargo-nextest"
[tasks.open-docs]
env = { RUSTDOCFLAGS = "--cfg docsrs -D warnings" }
toolchain = "nightly"
command = "cargo"
args = [
"doc",
"-Zunstable-options",
"-Zrustdoc-scrape-examples",
"--all-features",
"--no-deps",
"--open",
]
[tasks.watch-docs]
env = { RUSTDOCFLAGS = "--cfg docsrs -D warnings" }
toolchain = "nightly"
command = "watchexec"
args = [
"-r",
"-e",
"rs,md",
"--",
"cargo",
"+nightly",
"doc",
"-Zunstable-options",
"-Zrustdoc-scrape-examples",
"--all-features",
"--no-deps",
]
install_crate = "watchexec-cli"
[tasks.build-all]
command = "cargo"
args = ["build", "--all-features", "--examples"]