1
0

Makefile.toml 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. [config]
  2. default_to_workspace = false
  3. min_version = "0.32.4"
  4. [env]
  5. CARGO_MAKE_CLIPPY_ARGS = "-- --deny=warnings"
  6. CARGO_MAKE_EXTEND_WORKSPACE_MAKEFILE = true
  7. [config.modify_core_tasks]
  8. namespace = "core"
  9. private = true
  10. [tasks.tests-setup]
  11. private = true
  12. script = [
  13. """
  14. test_flags = array --headless --firefox
  15. dioxus_test_features = set wasm_test
  16. dioxus_test_flags = array_join ${test_flags} " "
  17. echo "running tests with flags: ${dioxus_test_flags} and features: ${dioxus_test_features}"
  18. set_env DIOXUS_TEST_FLAGS ${dioxus_test_flags}
  19. set_env DIOXUS_TEST_FEATURES ${dioxus_test_features}
  20. """,
  21. ]
  22. script_runner = "@duckscript"
  23. [tasks.format]
  24. command = "cargo"
  25. args = ["fmt", "--all"]
  26. [tasks.check]
  27. command = "cargo"
  28. args = ["check", "--workspace", "--examples", "--tests"]
  29. [tasks.clippy]
  30. command = "cargo"
  31. args = [
  32. "clippy",
  33. "--workspace",
  34. "--examples",
  35. "--tests",
  36. "--",
  37. "-D",
  38. "warnings",
  39. ]
  40. [tasks.tidy]
  41. category = "Formatting"
  42. dependencies = ["format", "check", "clippy"]
  43. description = "Format and Check workspace"
  44. [tasks.install-miri]
  45. toolchain = "nightly"
  46. install_crate = { rustup_component_name = "miri", binary = "cargo +nightly miri", test_arg = "--help" }
  47. private = true
  48. [tasks.miri-native]
  49. command = "cargo"
  50. toolchain = "nightly"
  51. dependencies = ["install-miri"]
  52. args = [
  53. "miri",
  54. "test",
  55. "--package",
  56. "dioxus-native-core",
  57. "--test",
  58. "miri_native",
  59. ]
  60. [tasks.miri-stress]
  61. command = "cargo"
  62. toolchain = "nightly"
  63. dependencies = ["install-miri"]
  64. args = ["miri", "test", "--package", "dioxus-core", "--test", "miri_stress"]
  65. [tasks.miri]
  66. dependencies = ["miri-native", "miri-stress"]
  67. [tasks.tests]
  68. category = "Testing"
  69. dependencies = ["tests-setup"]
  70. description = "Run all tests"
  71. env = { CARGO_MAKE_WORKSPACE_SKIP_MEMBERS = ["**/examples/*"] }
  72. run_task = { name = ["test-flow", "test-with-browser"], fork = true }
  73. [tasks.build]
  74. command = "cargo"
  75. args = ["build"]
  76. [tasks.test-flow]
  77. dependencies = ["test", "docs"]
  78. private = true
  79. [tasks.test]
  80. dependencies = ["build"]
  81. command = "cargo"
  82. args = [
  83. "test",
  84. "--lib",
  85. "--bins",
  86. "--tests",
  87. "--examples",
  88. "--workspace",
  89. # These tests run on Ubuntu without a screen. Desktop tests that require a screen fail, so we skip them
  90. "--exclude",
  91. "dioxus-desktop",
  92. "--exclude",
  93. "dioxus-mobile",
  94. ]
  95. private = true
  96. [tasks.docs]
  97. dependencies = ["build"]
  98. command = "cargo"
  99. args = [
  100. "test",
  101. "--doc",
  102. "--workspace",
  103. ]
  104. private = true
  105. [tasks.test-with-browser]
  106. env = { CARGO_MAKE_WORKSPACE_INCLUDE_MEMBERS = [
  107. "**/packages/router",
  108. "**/packages/desktop",
  109. ] }
  110. private = true
  111. workspace = true