| 1 |
[config] |
| 2 |
min_version = "0.35.0" |
| 3 |
|
| 4 |
[env] |
| 5 |
CI_CARGO_TEST_FLAGS = { value = "--locked -- --nocapture", condition = { env_true = [ |
| 6 |
"CARGO_MAKE_CI", |
| 7 |
] } } |
| 8 |
CARGO_MAKE_CARGO_ALL_FEATURES = { source = "${CARGO_MAKE_RUST_CHANNEL}", default_value = "--features=std", mapping = { "nightly" = "--all-features" } } |
| 9 |
CARGO_MAKE_CLIPPY_ARGS = { value = "${CARGO_MAKE_CLIPPY_ALL_FEATURES_WARN}", condition = { env_true = [ |
| 10 |
"CARGO_MAKE_CI", |
| 11 |
] } } |
| 12 |
|
| 13 |
# Override for CI flag additions |
| 14 |
[tasks.test] |
| 15 |
args = [ |
| 16 |
"test", |
| 17 |
"@@remove-empty(CARGO_MAKE_CARGO_VERBOSE_FLAGS)", |
| 18 |
"@@split(CARGO_MAKE_CARGO_BUILD_TEST_FLAGS, )", |
| 19 |
"@@split(CI_CARGO_TEST_FLAGS, )", |
| 20 |
] |
| 21 |
|
| 22 |
# Let clippy run on non-nightly CI |
| 23 |
[tasks.clippy-ci-flow] |
| 24 |
condition = { env_set = ["CARGO_MAKE_RUN_CLIPPY"] } |
| 25 |
|
| 26 |
# Let format check run on non-nightly CI |
| 27 |
[tasks.check-format-ci-flow] |
| 28 |
condition = { env_set = ["CARGO_MAKE_RUN_CHECK_FORMAT"] } |
| 29 |
|
| 30 |
[tasks.check-docs] |
| 31 |
description = "Checks docs for errors." |
| 32 |
category = "Documentation" |
| 33 |
install_crate = false |
| 34 |
env = { RUSTDOCFLAGS = "-D warnings" } |
| 35 |
command = "cargo" |
| 36 |
args = [ |
| 37 |
"doc", |
| 38 |
"--workspace", |
| 39 |
"--no-deps", |
| 40 |
"@@remove-empty(CARGO_MAKE_CARGO_VERBOSE_FLAGS)", |
| 41 |
"${CARGO_MAKE_CARGO_ALL_FEATURES}", |
| 42 |
] |
| 43 |
|
| 44 |
# Build & Test with no features enabled |
| 45 |
[tasks.post-ci-flow] |
| 46 |
run_task = [{ name = ["check-docs", "build-no-std", "test-no-std", "build-alloc", "test-alloc", "build-debugger-visualizer", "test-debugger-visualizer"]}] |
| 47 |
|
| 48 |
[tasks.build-no-std] |
| 49 |
description = "Build without any features" |
| 50 |
category = "Build" |
| 51 |
env = { CARGO_MAKE_CARGO_BUILD_TEST_FLAGS = "--no-default-features" } |
| 52 |
run_task = "build" |
| 53 |
|
| 54 |
[tasks.test-no-std] |
| 55 |
description = "Run tests without any features" |
| 56 |
category = "Test" |
| 57 |
env = { CARGO_MAKE_CARGO_BUILD_TEST_FLAGS = "--no-default-features" } |
| 58 |
run_task = "test" |
| 59 |
|
| 60 |
[tasks.build-alloc] |
| 61 |
description = "Build with only the alloc feature" |
| 62 |
category = "Build" |
| 63 |
env = { CARGO_MAKE_CARGO_BUILD_TEST_FLAGS = "--no-default-features --features=alloc" } |
| 64 |
run_task = "build" |
| 65 |
|
| 66 |
[tasks.test-alloc] |
| 67 |
description = "Run tests with only the alloc feature" |
| 68 |
category = "Test" |
| 69 |
env = { CARGO_MAKE_CARGO_BUILD_TEST_FLAGS = "--no-default-features --features=alloc" } |
| 70 |
run_task = "test" |
| 71 |
|
| 72 |
[tasks.build-debugger-visualizer] |
| 73 |
condition = { channels = ["nightly"] } |
| 74 |
description = "Build with only the debugger_visualizer feature" |
| 75 |
category = "Build" |
| 76 |
env = { CARGO_MAKE_CARGO_BUILD_TEST_FLAGS = "--no-default-features --features=debugger_visualizer" } |
| 77 |
run_task = "build" |
| 78 |
|
| 79 |
# The debugger_visualizer tests rely on debug information being present. |
| 80 |
# Update the debuginfo level for this task only. |
| 81 |
[tasks.test-debugger-visualizer] |
| 82 |
condition = { channels = ["nightly"] } |
| 83 |
description = "Run tests with only the debugger_visualizer feature which includes the alloc feature" |
| 84 |
category = "Test" |
| 85 |
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 } |
| 86 |
run_task = "test" |
| 87 |
dependencies = ["build-debugger-visualizer"] |