2018-01-22 22:23:07 +00:00
|
|
|
mode = ScriptMode.Verbose
|
|
|
|
|
|
|
|
packageName = "nimbus"
|
|
|
|
version = "0.1.0"
|
|
|
|
author = "Status Research & Development GmbH"
|
|
|
|
description = "An Ethereum 2.0 Sharding Client for Resource-Restricted Devices"
|
|
|
|
license = "Apache License 2.0"
|
2018-06-19 19:17:20 +00:00
|
|
|
skipDirs = @["tests", "examples"]
|
2018-12-24 16:03:27 +00:00
|
|
|
# we can't have the result of a custom task in the "bin" var - https://github.com/nim-lang/nimble/issues/542
|
|
|
|
# bin = @["build/nimbus"]
|
2018-01-22 22:23:07 +00:00
|
|
|
|
2019-02-05 19:15:50 +00:00
|
|
|
requires "nim >= 0.19",
|
2018-12-24 16:03:27 +00:00
|
|
|
"chronicles",
|
2018-05-28 10:22:28 +00:00
|
|
|
"nimcrypto",
|
|
|
|
"stint",
|
2018-07-20 17:02:19 +00:00
|
|
|
"json_rpc",
|
2019-02-06 18:03:36 +00:00
|
|
|
"chronos",
|
2019-02-05 19:15:50 +00:00
|
|
|
"bncurve",
|
2019-02-06 18:03:36 +00:00
|
|
|
"eth",
|
2019-07-07 10:12:01 +00:00
|
|
|
"stew"
|
2018-01-30 10:51:13 +00:00
|
|
|
|
2019-02-16 21:23:17 +00:00
|
|
|
proc buildBinary(name: string, srcDir = "./", params = "", lang = "c") =
|
|
|
|
if not dirExists "build":
|
|
|
|
mkDir "build"
|
|
|
|
# allow something like "nim nimbus --verbosity:0 --hints:off nimbus.nims"
|
|
|
|
var extra_params = params
|
|
|
|
for i in 2..<paramCount():
|
|
|
|
extra_params &= " " & paramStr(i)
|
2019-09-05 17:26:16 +00:00
|
|
|
exec "nim " & lang & " --out:build/" & name & " " & extra_params & " " & srcDir & name & ".nim"
|
2018-09-24 22:25:17 +00:00
|
|
|
|
2018-05-07 12:41:54 +00:00
|
|
|
proc test(name: string, lang = "c") =
|
2019-09-05 17:26:16 +00:00
|
|
|
buildBinary name, "tests/", "-d:release -d:chronicles_log_level=ERROR"
|
|
|
|
exec "build/" & name
|
2018-01-29 17:40:22 +00:00
|
|
|
|
2018-04-03 16:09:09 +00:00
|
|
|
task test, "Run tests":
|
2019-02-15 02:11:20 +00:00
|
|
|
test "all_tests"
|
2019-02-21 23:02:31 +00:00
|
|
|
test "test_rpc"
|
2019-04-24 20:45:29 +00:00
|
|
|
test "test_rpc_whisper"
|
2018-09-24 22:25:17 +00:00
|
|
|
|
|
|
|
task nimbus, "Build Nimbus":
|
2019-03-20 13:41:25 +00:00
|
|
|
buildBinary "nimbus", "nimbus/", "-d:chronicles_log_level=TRACE"
|
2018-12-24 16:03:27 +00:00
|
|
|
|
2020-01-14 22:35:47 +00:00
|
|
|
task wakunode, "Build Waku node":
|
2019-12-12 18:40:34 +00:00
|
|
|
buildBinary "wakunode", "waku/", "-d:chronicles_log_level=TRACE"
|
2020-01-14 22:35:47 +00:00
|
|
|
|
2020-01-17 16:52:34 +00:00
|
|
|
task wakusim, "Build Waku simulation tools":
|
2020-01-14 22:35:47 +00:00
|
|
|
buildBinary "quicksim", "waku/", "-d:chronicles_log_level=INFO"
|
2020-01-17 16:52:34 +00:00
|
|
|
buildBinary "start_network", "waku/", "-d:chronicles_log_level=DEBUG"
|