diff --git a/Makefile.toml b/Makefile.toml new file mode 100644 index 000000000..51c489a7e --- /dev/null +++ b/Makefile.toml @@ -0,0 +1,113 @@ +[config] +default_to_workspace = false + +[env] +WASM_BUILD_WORKSPACE_HINT = "${CARGO_MAKE_WORKING_DIRECTORY}" + +[tasks.fmt] +args = ["fmt"] +command = "cargo" +install_crate = "rustfmt" + +[tasks.check] +args = ["check"] +command = "cargo" +dependencies = ["format"] +env = { "SKIP_WASM_BUILD" = "1" } + +[tasks.clippy] +args = ["clippy"] +command = "cargo" +dependencies = ["format"] +env = { "SKIP_WASM_BUILD" = "1" } + +[tasks.common-build] +args = [ + "build", + "--locked", + "-p", + "darwinia", + "--release", + "--no-default-features", + "--features", + "@@split(FEATURES, )", +] +[tasks.common-run] +args = [ + "--unsafe-ws-external", + "--unsafe-rpc-external", + "--rpc-methods", + "unsafe", + "--rpc-cors", + "all", + "--tmp", + "--alice", + "--collator", + "@@split(FLAGS, )", +] + +[tasks.build-darwinia] +command = "cargo" +env = { "FEATURES" = "darwinia-native" } +extend = "common-build" +[tasks.cbuild-darwinia] +command = "cross" +env = { "FEATURES" = "darwinia-native" } +extend = "common-build" +[tasks.run-darwinia] +command = "target/release/darwinia" +env = { "FLAGS" = "--chain darwinia-dev" } +extend = "common-run" + +[tasks.build-crab] +command = "cargo" +env = { "FEATURES" = "crab-native" } +extend = "common-build" +[tasks.cbuild-crab] +command = "cross" +env = { "FEATURES" = "crab-native" } +extend = "common-build" +[tasks.run-crab] +command = "target/release/darwinia" +env = { "FLAGS" = "--chain crab-dev" } +extend = "common-run" + +[tasks.build-pangoro] +command = "cargo" +env = { "FEATURES" = "pangoro-native" } +extend = "common-build" +[tasks.cbuild-pangoro] +command = "cross" +env = { "FEATURES" = "pangoro-native" } +extend = "common-build" +[tasks.run-pangoro] +command = "target/release/darwinia" +env = { "FLAGS" = "--chain pangoro-dev" } +extend = "common-run" + +[tasks.build-pangolin] +command = "cargo" +env = { "FEATURES" = "pangolin-native" } +extend = "common-build" +[tasks.cbuild-pangolin] +command = "cross" +env = { "FEATURES" = "pangolin-native" } +extend = "common-build" +[tasks.run-pangolin] +command = "target/release/darwinia" +env = { "FLAGS" = "--chain pangolin-dev" } +extend = "common-run" + +[tasks.build-bench] +command = "cargo" +env = { "FEATURES" = "all-natives runtime-benchmarks" } +extend = "common-build" + +[tasks.build-trt] +command = "cargo" +env = { "FEATURES" = "all-natives try-runtime" } +extend = "common-build" + +[tasks.build-all] +args = ["build", "--locked", "--release", "--all-features"] +command = "cargo"