Skip to content

Commit

Permalink
Easy make (#305)
Browse files Browse the repository at this point in the history
* Easy make

* Format
  • Loading branch information
AurevoirXavier authored Feb 27, 2023
1 parent b2b0305 commit 8ddcaa4
Showing 1 changed file with 113 additions and 0 deletions.
113 changes: 113 additions & 0 deletions Makefile.toml
Original file line number Diff line number Diff line change
@@ -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"

0 comments on commit 8ddcaa4

Please sign in to comment.