2018-01-23 00:23:07 +02: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 21:17:20 +02:00
|
|
|
skipDirs = @["tests", "examples"]
|
2018-12-24 17:03:27 +01: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-23 00:23:07 +02:00
|
|
|
|
2019-02-05 20:15:50 +01:00
|
|
|
requires "nim >= 0.19",
|
2018-12-24 17:03:27 +01:00
|
|
|
"chronicles",
|
2018-05-28 13:22:28 +03:00
|
|
|
"nimcrypto",
|
|
|
|
"stint",
|
2018-07-20 20:02:19 +03:00
|
|
|
"json_rpc",
|
2019-02-06 19:03:36 +01:00
|
|
|
"chronos",
|
2019-02-05 20:15:50 +01:00
|
|
|
"bncurve",
|
2019-02-06 19:03:36 +01:00
|
|
|
"eth",
|
2019-02-05 20:15:50 +01:00
|
|
|
"std_shims"
|
2018-01-30 12:51:13 +02:00
|
|
|
|
2018-09-25 01:25:17 +03:00
|
|
|
proc buildBinary(name: string, srcDir = ".", lang = "c") =
|
|
|
|
if not dirExists "build": mkDir "build"
|
|
|
|
switch("out", ("./build/" & name))
|
|
|
|
setCommand lang, srcDir & name & ".nim"
|
|
|
|
|
2018-05-07 14:41:54 +02:00
|
|
|
proc test(name: string, lang = "c") =
|
2018-12-24 17:03:27 +01:00
|
|
|
--define:"chronicles_log_level=ERROR"
|
2018-04-03 18:09:09 +02:00
|
|
|
--run
|
2018-12-07 00:16:34 +01:00
|
|
|
buildBinary name, "tests/"
|
2018-01-29 19:40:22 +02:00
|
|
|
|
2018-04-03 18:09:09 +02:00
|
|
|
task test, "Run tests":
|
|
|
|
test "all_tests"
|
2019-01-09 18:41:18 +07:00
|
|
|
# debugging tools don't yet have tests
|
|
|
|
# but they should be compilable
|
2019-02-23 20:27:01 +07:00
|
|
|
exec "nim c -r tests/test_rpc"
|
2019-01-11 13:53:18 +07:00
|
|
|
exec "nim c premix/premix"
|
|
|
|
exec "nim c premix/persist"
|
|
|
|
exec "nim c premix/debug"
|
|
|
|
exec "nim c premix/dumper"
|
2019-01-23 13:59:26 +01:00
|
|
|
exec "nim c premix/hunter"
|
2019-02-06 17:43:44 +07:00
|
|
|
exec "nim c tests/tracerTestGen"
|
|
|
|
exec "nim c tests/persistBlockTestGen"
|
2018-09-25 01:25:17 +03:00
|
|
|
|
|
|
|
task nimbus, "Build Nimbus":
|
|
|
|
buildBinary "nimbus", "nimbus/"
|
2018-12-24 17:03:27 +01:00
|
|
|
|