nimbus-eth1/nimbus.nimble

52 lines
1.5 KiB
Plaintext
Raw Normal View History

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"
skipDirs = @["tests", "examples"]
# 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"]
2019-02-05 19:15:50 +00:00
requires "nim >= 0.19",
"chronicles",
2018-05-28 10:22:28 +00:00
"nimcrypto",
"stint",
"json_rpc",
"chronos",
2019-02-05 19:15:50 +00:00
"bncurve",
"eth",
2019-02-05 19:15:50 +00:00
"std_shims"
2018-01-30 10:51:13 +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)
exec "nim " & lang & " --out:./build/" & name & " " & extra_params & " " & srcDir & name & ".nim"
proc test(name: string, lang = "c") =
buildBinary name, "tests/", "-r -d:chronicles_log_level=ERROR"
task test, "Run tests":
# debugging tools don't have tests yet, but they should be compilable
for binary in [
"premix/premix",
"premix/persist",
"premix/debug",
"premix/dumper",
"premix/hunter",
"tests/tracerTestGen",
"tests/persistBlockTestGen",
]:
exec "nim c --verbosity:0 --hints:off --warnings:off " & binary
rmFile binary
test "all_tests"
task nimbus, "Build Nimbus":
buildBinary "nimbus", "nimbus/"