mirror of
https://github.com/ratatui-org/ratatui
synced 2024-11-10 07:04:17 +00:00
e2cb11cc30
Enables the all-widgets feature so that the calendar example runs correctly
173 lines
3 KiB
TOML
173 lines
3 KiB
TOML
# configuration for https://github.com/sagiegurari/cargo-make
|
|
|
|
[config]
|
|
skip_core_tasks = true
|
|
|
|
[env]
|
|
# all features except the backend ones
|
|
ALL_FEATURES = "all-widgets,macros,serde"
|
|
|
|
[tasks.default]
|
|
alias = "ci"
|
|
|
|
[tasks.ci]
|
|
dependencies = [
|
|
"style-check",
|
|
"clippy",
|
|
"check",
|
|
"test",
|
|
]
|
|
|
|
[tasks.style-check]
|
|
dependencies = ["fmt", "typos"]
|
|
|
|
[tasks.fmt]
|
|
toolchain = "nightly"
|
|
command = "cargo"
|
|
args = ["fmt", "--all", "--check"]
|
|
|
|
[tasks.typos]
|
|
install_crate = { crate_name = "typos-cli", binary = "typos", test_arg = "--version" }
|
|
command = "typos"
|
|
|
|
[tasks.check]
|
|
command = "cargo"
|
|
args = [
|
|
"check",
|
|
"--all-targets",
|
|
"--all-features"
|
|
]
|
|
|
|
[tasks.check.windows]
|
|
args = [
|
|
"check",
|
|
"--all-targets",
|
|
"--no-default-features", "--features", "${ALL_FEATURES},crossterm,termwiz"
|
|
]
|
|
|
|
[tasks.build]
|
|
command = "cargo"
|
|
args = [
|
|
"build",
|
|
"--all-targets",
|
|
"--all-features",
|
|
]
|
|
|
|
[tasks.build.windows]
|
|
args = [
|
|
"build",
|
|
"--all-targets",
|
|
"--no-default-features", "--features", "${ALL_FEATURES},crossterm,termwiz"
|
|
]
|
|
|
|
[tasks.clippy]
|
|
command = "cargo"
|
|
args = [
|
|
"clippy",
|
|
"--all-targets",
|
|
"--tests",
|
|
"--benches",
|
|
"--all-features",
|
|
"--",
|
|
"-D",
|
|
"warnings",
|
|
]
|
|
|
|
[tasks.clippy.windows]
|
|
args = [
|
|
"clippy",
|
|
"--all-targets",
|
|
"--tests",
|
|
"--benches",
|
|
"--no-default-features", "--features", "${ALL_FEATURES},crossterm,termwiz",
|
|
"--",
|
|
"-D",
|
|
"warnings",
|
|
]
|
|
|
|
[tasks.test]
|
|
dependencies = [
|
|
"test-doc",
|
|
]
|
|
command = "cargo"
|
|
args = [
|
|
"test",
|
|
"--all-targets",
|
|
"--all-features",
|
|
]
|
|
|
|
|
|
[tasks.test-windows]
|
|
dependencies = [
|
|
"test-doc",
|
|
]
|
|
args = [
|
|
"test",
|
|
"--all-targets",
|
|
"--no-default-features", "--features", "${ALL_FEATURES},crossterm,termwiz"
|
|
]
|
|
|
|
[tasks.test-doc]
|
|
command = "cargo"
|
|
args = [
|
|
"test", "--doc",
|
|
"--all-features",
|
|
]
|
|
|
|
[tasks.test-doc.windows]
|
|
args = [
|
|
"test", "--doc",
|
|
"--no-default-features", "--features", "${ALL_FEATURES},crossterm,termwiz"
|
|
]
|
|
|
|
[tasks.test-backend]
|
|
# takes a command line parameter to specify the backend to test (e.g. "crossterm")
|
|
command = "cargo"
|
|
args = [
|
|
"test",
|
|
"--all-targets",
|
|
"--no-default-features", "--features", "${ALL_FEATURES},${@}"
|
|
]
|
|
|
|
|
|
[tasks.coverage]
|
|
command = "cargo"
|
|
args = [
|
|
"llvm-cov",
|
|
"--lcov",
|
|
"--output-path", "target/lcov.info",
|
|
"--all-features",
|
|
]
|
|
|
|
[tasks.coverage.windows]
|
|
command = "cargo"
|
|
args = [
|
|
"llvm-cov",
|
|
"--lcov",
|
|
"--output-path", "target/lcov.info",
|
|
"--no-default-features",
|
|
"--features", "${ALL_FEATURES},crossterm,termwiz",
|
|
]
|
|
|
|
[tasks.run-example]
|
|
private = true
|
|
condition = { env_set = ["TUI_EXAMPLE_NAME"] }
|
|
command = "cargo"
|
|
args = ["run", "--release", "--example", "${TUI_EXAMPLE_NAME}", "--features", "all-widgets"]
|
|
|
|
[tasks.build-examples]
|
|
command = "cargo"
|
|
args = ["build", "--examples", "--release", "--features", "all-widgets"]
|
|
|
|
[tasks.run-examples]
|
|
dependencies = ["build-examples"]
|
|
script = '''
|
|
#!@duckscript
|
|
files = glob_array ./examples/*.rs
|
|
for file in ${files}
|
|
name = basename ${file}
|
|
name = substring ${name} -3
|
|
set_env TUI_EXAMPLE_NAME ${name}
|
|
cm_run_task run-example
|
|
end
|
|
'''
|