-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile.toml
More file actions
107 lines (92 loc) · 2.64 KB
/
Makefile.toml
File metadata and controls
107 lines (92 loc) · 2.64 KB
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
[env]
CFG_LOOM = "--cfg loom"
CLIPPY_FLAGS = "-D clippy::pedantic -D clippy::nursery"
CLIPPY_FLAGS_LOOM = "${CFG_LOOM} ${CLIPPY_FLAGS}"
# Don't run these tasks for all crates in the workspace.
[config]
default_to_workspace = false
# Install a "no_std" target.
[tasks.install-no-std-target]
command = "rustup"
args = ["target", "add", "thumbv7m-none-eabi"]
# Build package for no_std environment.
[tasks.no-std]
command = "cargo"
args = [
"hack",
"build",
"--target",
"thumbv7m-none-eabi",
"--feature-powerset",
"--no-dev-deps",
"--skip",
"yield,thread_local",
]
dependencies = ["install-no-std-target"]
# Build docs for docs.rs.
[tasks.docsrs]
toolchain = "nightly"
command = "cargo"
env = { "RUSTDOCFLAGS" = "--cfg docsrs" }
args = ["rustdoc", "--all-features", "--open", "--", "--default-theme", "ayu"]
# Check MSRV.
[tasks.msrv]
toolchain = "1.85"
command = "cargo"
args = ["check", "--all-features"]
# Check semver viloations.
[tasks.semver]
command = "cargo"
args = ["semver-checks", "${@}"]
# Run all documentation snippets.
[tasks.doc-test]
command = "cargo"
args = ["test", "--doc", "--all-features"]
# Lint all feature combinations with cargo-hack.
[tasks.lint]
command = "cargo"
env = { "RUSTFLAGS" = "${CLIPPY_FLAGS}" }
args = ["hack", "clippy", "--feature-powerset", "--no-dev-deps"]
# Run example.
[tasks.example]
command = "cargo"
env = { "RUSTFLAGS" = "${CLIPPY_FLAGS}" }
args = ["run", "--example", "${@}", "--all-features"]
# Lint all feature combinations with carg-hack on test profile.
[tasks.test-lint]
command = "cargo"
env = { "RUSTFLAGS" = "${CLIPPY_FLAGS}" }
args = [
"hack",
"clippy",
"--profile",
"test",
"--feature-powerset",
"--no-dev-deps",
]
# Run tests under miri.
# NOTE: must run as: `cargo +nightly make miri`.
[tasks.miri-test]
toolchain = "nightly"
install_crate = { rustup_component_name = "miri" }
command = "cargo"
args = ["miri", "nextest", "run", "--all-features", "${@}"]
# Check code coverage with tarpaulin (all features).
[tasks.tarpaulin]
command = "cargo"
args = ["tarpaulin", "--all-features", "--engine", "llvm", "--out", "xml"]
# Run Loom tests.
[tasks.loom-test]
command = "cargo"
env = { "RUSTFLAGS" = "${CFG_LOOM}" }
args = ["test", "--lib", "--release", "--all-features", "${@}"]
# Check Loom cfg (faster if using the same flags for rust-analyzer).
[tasks.loom-check]
command = "cargo"
env = { "RUSTFLAGS" = "${CFG_LOOM}" }
args = ["check", "--profile", "test", "--all-features"]
# Lint all feature combinations with cargo-hack on test profile and Loom cfg.
[tasks.loom-lint]
command = "cargo"
env = { "RUSTFLAGS" = "${CLIPPY_FLAGS_LOOM}" }
args = ["hack", "clippy", "--profile", "test", "--feature-powerset"]