forked from starkat99/widestring-rs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.toml
87 lines (75 loc) · 2.97 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
83
84
85
86
87
[config]
min_version = "0.35.0"
[env]
CI_CARGO_TEST_FLAGS = { value = "--locked -- --nocapture", condition = { env_true = [
"CARGO_MAKE_CI",
] } }
CARGO_MAKE_CARGO_ALL_FEATURES = { source = "${CARGO_MAKE_RUST_CHANNEL}", default_value = "--features=std", mapping = { "nightly" = "--all-features" } }
CARGO_MAKE_CLIPPY_ARGS = { value = "${CARGO_MAKE_CLIPPY_ALL_FEATURES_WARN}", condition = { env_true = [
"CARGO_MAKE_CI",
] } }
# Override for CI flag additions
[tasks.test]
args = [
"test",
"@@remove-empty(CARGO_MAKE_CARGO_VERBOSE_FLAGS)",
"@@split(CARGO_MAKE_CARGO_BUILD_TEST_FLAGS, )",
"@@split(CI_CARGO_TEST_FLAGS, )",
]
# Let clippy run on non-nightly CI
[tasks.clippy-ci-flow]
condition = { env_set = ["CARGO_MAKE_RUN_CLIPPY"] }
# Let format check run on non-nightly CI
[tasks.check-format-ci-flow]
condition = { env_set = ["CARGO_MAKE_RUN_CHECK_FORMAT"] }
[tasks.check-docs]
description = "Checks docs for errors."
category = "Documentation"
install_crate = false
env = { RUSTDOCFLAGS = "-D warnings" }
command = "cargo"
args = [
"doc",
"--workspace",
"--no-deps",
"@@remove-empty(CARGO_MAKE_CARGO_VERBOSE_FLAGS)",
"${CARGO_MAKE_CARGO_ALL_FEATURES}",
]
# Build & Test with no features enabled
[tasks.post-ci-flow]
run_task = [{ name = ["check-docs", "build-no-std", "test-no-std", "build-alloc", "test-alloc", "build-debugger-visualizer", "test-debugger-visualizer"]}]
[tasks.build-no-std]
description = "Build without any features"
category = "Build"
env = { CARGO_MAKE_CARGO_BUILD_TEST_FLAGS = "--no-default-features" }
run_task = "build"
[tasks.test-no-std]
description = "Run tests without any features"
category = "Test"
env = { CARGO_MAKE_CARGO_BUILD_TEST_FLAGS = "--no-default-features" }
run_task = "test"
[tasks.build-alloc]
description = "Build with only the alloc feature"
category = "Build"
env = { CARGO_MAKE_CARGO_BUILD_TEST_FLAGS = "--no-default-features --features=alloc" }
run_task = "build"
[tasks.test-alloc]
description = "Run tests with only the alloc feature"
category = "Test"
env = { CARGO_MAKE_CARGO_BUILD_TEST_FLAGS = "--no-default-features --features=alloc" }
run_task = "test"
[tasks.build-debugger-visualizer]
condition = { channels = ["nightly"] }
description = "Build with only the debugger_visualizer feature"
category = "Build"
env = { CARGO_MAKE_CARGO_BUILD_TEST_FLAGS = "--no-default-features --features=debugger_visualizer" }
run_task = "build"
# The debugger_visualizer tests rely on debug information being present.
# Update the debuginfo level for this task only.
[tasks.test-debugger-visualizer]
condition = { channels = ["nightly"] }
description = "Run tests with only the debugger_visualizer feature which includes the alloc feature"
category = "Test"
env = { CARGO_MAKE_CARGO_BUILD_TEST_FLAGS = "--test debugger_visualizer --no-default-features --features=debugger_visualizer", CI_CARGO_TEST_FLAGS = "--locked -- --nocapture --test-threads=1", CARGO_PROFILE_TEST_DEBUG = 2 }
run_task = "test"
dependencies = ["build-debugger-visualizer"]