2020-08-29 06:17:15 +08:00
|
|
|
######################
|
|
|
|
#
|
|
|
|
# public tasks:
|
2022-04-29 00:04:55 +08:00
|
|
|
# * checks-flow
|
|
|
|
# * lint
|
|
|
|
# * lint-release
|
|
|
|
# * format
|
|
|
|
# * test-flow
|
|
|
|
# * test
|
|
|
|
# * doc-test
|
|
|
|
# * website-test
|
2020-09-14 21:39:27 +08:00
|
|
|
#
|
2022-04-29 00:04:55 +08:00
|
|
|
# packages/yew also contains `clippy-feature-soundness` to ensure everything is fine
|
2020-09-14 21:39:27 +08:00
|
|
|
# Run `cargo make --list-all-steps` for more details.
|
2020-08-29 06:17:15 +08:00
|
|
|
#
|
|
|
|
######################
|
|
|
|
[config]
|
|
|
|
min_version = "0.32.4"
|
2022-04-29 00:04:55 +08:00
|
|
|
skip_core_tasks = true
|
2020-08-29 06:17:15 +08:00
|
|
|
default_to_workspace = false
|
|
|
|
|
|
|
|
[env]
|
|
|
|
CARGO_MAKE_EXTEND_WORKSPACE_MAKEFILE = true
|
|
|
|
CARGO_MAKE_CLIPPY_ARGS = "-- --deny=warnings"
|
2022-04-29 00:04:55 +08:00
|
|
|
CARGO_MAKE_WORKSPACE_SKIP_MEMBERS = [
|
|
|
|
"examples/*",
|
|
|
|
"tools/*",
|
|
|
|
]
|
2020-08-29 06:17:15 +08:00
|
|
|
|
|
|
|
[config.modify_core_tasks]
|
|
|
|
private = true
|
|
|
|
namespace = "core"
|
|
|
|
|
2022-04-29 00:04:55 +08:00
|
|
|
# checks
|
2020-08-29 06:17:15 +08:00
|
|
|
|
2020-09-14 21:39:27 +08:00
|
|
|
[tasks.lint]
|
|
|
|
category = "Checks"
|
2022-04-29 00:04:55 +08:00
|
|
|
description = "Runs clippy"
|
|
|
|
command = "cargo"
|
|
|
|
args = ["clippy", "--", "--deny=warnings"]
|
2020-08-29 06:17:15 +08:00
|
|
|
|
2021-09-22 23:57:14 +08:00
|
|
|
# Needed, because we have some code differences between debug and release builds
|
|
|
|
[tasks.lint-release]
|
|
|
|
category = "Checks"
|
|
|
|
command = "cargo"
|
|
|
|
args = ["clippy", "--all-targets", "--release", "--", "--deny=warnings"]
|
|
|
|
|
2022-04-29 00:04:55 +08:00
|
|
|
[tasks.format]
|
|
|
|
category = "Checks"
|
|
|
|
toolchain = "nightly"
|
|
|
|
env = { CARGO_MAKE_RUST_CHANNEL = "nightly" }
|
2020-08-29 06:17:15 +08:00
|
|
|
|
2022-04-29 00:04:55 +08:00
|
|
|
|
|
|
|
[tasks.checks-flow]
|
|
|
|
category = "Checks"
|
|
|
|
description = "Runs clippy in debug and release mode and format all the code"
|
|
|
|
run_task = { name = ["lint", "lint-release", "format"], fork = true }
|
|
|
|
|
|
|
|
# Tests
|
2020-09-14 21:39:27 +08:00
|
|
|
|
2020-08-29 06:17:15 +08:00
|
|
|
[tasks.test]
|
2020-09-14 21:39:27 +08:00
|
|
|
command = "cargo"
|
2022-03-06 11:37:07 +08:00
|
|
|
args = ["test", "--all-targets"]
|
2020-09-14 21:39:27 +08:00
|
|
|
workspace = true
|
|
|
|
|
|
|
|
[tasks.doc-test]
|
|
|
|
command = "cargo"
|
2022-04-29 00:04:55 +08:00
|
|
|
args = ["test", "--doc", "--all-features"]
|
|
|
|
workspace = true
|
2020-09-14 21:39:27 +08:00
|
|
|
|
2021-08-28 19:17:28 +08:00
|
|
|
[tasks.website-test]
|
2022-01-18 17:49:11 +08:00
|
|
|
command = "cargo"
|
|
|
|
args = ["test", "-p", "website-test"]
|
2021-08-28 19:17:28 +08:00
|
|
|
|
2022-04-29 00:04:55 +08:00
|
|
|
[tasks.test-flow]
|
|
|
|
category = "Testing"
|
|
|
|
description = "Run all tests"
|
|
|
|
run_task = { name = ["test", "doc-test", "website-test"], fork = true, parallel = true }
|
|
|
|
|
|
|
|
# misc
|
|
|
|
|
2021-11-30 02:02:04 +08:00
|
|
|
[tasks.generate-change-log]
|
|
|
|
category = "Maintainer processes"
|
|
|
|
toolchain = "stable"
|
|
|
|
command = "cargo"
|
2022-04-29 00:04:55 +08:00
|
|
|
args = ["run", "-p", "changelog", "--release", "${@}"]
|
2022-01-12 21:43:09 +08:00
|
|
|
|
2022-04-29 00:04:55 +08:00
|
|
|
[tasks.default]
|
|
|
|
#run_task = { name = ["checks-flow", "test-flow"], fork = true }
|
|
|
|
dependencies = ["checks-flow", "test-flow"]
|