ratatui/Makefile.toml

161 lines
2.7 KiB
Makefile
Raw Permalink Normal View History

[config]
skip_core_tasks = true
2021-11-11 14:56:37 +00:00
[tasks.ci]
run_task = [
{ name = "ci-unix", condition = { platforms = ["linux", "mac"] } },
{ name = "ci-windows", condition = { platforms = ["windows"] } },
]
2021-11-11 14:56:37 +00:00
[tasks.ci-unix]
private = true
dependencies = [
2021-11-11 14:56:37 +00:00
"fmt",
"check-crossterm",
"check-termion",
"test-crossterm",
"test-termion",
"clippy-crossterm",
"clippy-termion",
2021-11-11 14:56:37 +00:00
"test-doc",
]
2021-11-11 14:56:37 +00:00
[tasks.ci-windows]
private = true
dependencies = [
2021-11-11 14:56:37 +00:00
"fmt",
"check-crossterm",
"test-crossterm",
"clippy-crossterm",
"test-doc",
]
[tasks.fmt]
command = "cargo"
args = [
"fmt",
"--all",
"--",
"--check",
]
2021-11-11 14:56:37 +00:00
[tasks.check-crossterm]
env = { TUI_FEATURES = "serde,crossterm" }
run_task = "check"
[tasks.check-termion]
env = { TUI_FEATURES = "serde,termion" }
run_task = "check"
[tasks.check]
command = "cargo"
2021-11-11 14:56:37 +00:00
condition = { env_set = ["TUI_FEATURES"] }
args = [
"check",
"--no-default-features",
"--features",
"${TUI_FEATURES}",
"--all-targets",
]
2021-11-11 14:56:37 +00:00
[tasks.build-crossterm]
env = { TUI_FEATURES = "serde,crossterm" }
run_task = "build"
[tasks.build-termion]
env = { TUI_FEATURES = "serde,termion" }
run_task = "build"
[tasks.build]
command = "cargo"
2021-11-11 14:56:37 +00:00
condition = { env_set = ["TUI_FEATURES"] }
args = [
"build",
"--no-default-features",
"--features",
"${TUI_FEATURES}",
"--all-targets",
]
2021-11-11 14:56:37 +00:00
[tasks.clippy-crossterm]
env = { TUI_FEATURES = "serde,crossterm" }
run_task = "clippy"
[tasks.clippy-termion]
env = { TUI_FEATURES = "serde,termion" }
run_task = "clippy"
[tasks.clippy]
command = "cargo"
2021-11-11 14:56:37 +00:00
condition = { env_set = ["TUI_FEATURES"] }
args = [
"clippy",
2021-12-23 17:45:46 +00:00
"--all-targets",
"--no-default-features",
"--features",
"${TUI_FEATURES}",
"--",
"-D",
"warnings",
]
2021-11-11 14:56:37 +00:00
[tasks.test-crossterm]
env = { TUI_FEATURES = "serde,crossterm,all-widgets" }
2021-11-11 14:56:37 +00:00
run_task = "test"
[tasks.test-termion]
env = { TUI_FEATURES = "serde,termion,all-widgets" }
2021-11-11 14:56:37 +00:00
run_task = "test"
[tasks.test]
command = "cargo"
2021-11-11 14:56:37 +00:00
condition = { env_set = ["TUI_FEATURES"] }
args = [
"test",
"--no-default-features",
"--features",
2021-11-11 14:56:37 +00:00
"${TUI_FEATURES}",
"--lib",
"--tests",
"--examples",
]
[tasks.test-doc]
command = "cargo"
args = [
"test",
"--doc",
]
[tasks.run-example]
private = true
2021-11-11 14:56:37 +00:00
condition = { env_set = ["TUI_EXAMPLE_NAME"] }
command = "cargo"
args = [
"run",
"--release",
"--example",
"${TUI_EXAMPLE_NAME}"
]
[tasks.build-examples]
command = "cargo"
args = [
"build",
"--examples",
"--release"
]
[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}
2021-11-11 14:56:37 +00:00
cm_run_task run-example
end
'''