2021-11-23 16:55:16 +00:00
|
|
|
mode = ScriptMode.Verbose
|
|
|
|
|
2021-02-26 00:23:22 +00:00
|
|
|
version = "0.1.0"
|
|
|
|
author = "Dagger Team"
|
2021-10-29 19:30:52 +00:00
|
|
|
description = "p2p data durability engine"
|
2021-02-26 00:23:22 +00:00
|
|
|
license = "MIT"
|
|
|
|
|
2021-10-29 19:30:52 +00:00
|
|
|
requires "libp2p#unstable",
|
2021-02-26 00:23:22 +00:00
|
|
|
"nimcrypto >= 0.4.1",
|
|
|
|
"bearssl >= 0.1.4",
|
|
|
|
"chronicles >= 0.7.2",
|
|
|
|
"chronos >= 2.5.2",
|
|
|
|
"metrics",
|
|
|
|
"secp256k1",
|
|
|
|
"stew#head",
|
|
|
|
"protobufserialization >= 0.2.0 & < 0.3.0",
|
2021-04-15 09:23:49 +00:00
|
|
|
"https://github.com/status-im/nim-nitro >= 0.4.0 & < 0.5.0",
|
2021-05-10 07:42:38 +00:00
|
|
|
"questionable >= 0.9.1 & < 0.10.0",
|
2021-04-07 10:22:02 +00:00
|
|
|
"upraises >= 0.1.0 & < 0.2.0",
|
2021-10-29 19:30:52 +00:00
|
|
|
"asynctest >= 0.3.0 & < 0.4.0"
|
2021-11-23 16:55:16 +00:00
|
|
|
|
|
|
|
### Helper functions
|
|
|
|
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, params = "-d:chronicles_log_level=DEBUG", lang = "c") =
|
|
|
|
buildBinary name, "tests/", params
|
|
|
|
exec "build/" & name
|
|
|
|
|
|
|
|
task testAll, "Build & run Waku v1 tests":
|
|
|
|
test "testAll", "-d:chronicles_log_level=WARN"
|