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"
|
2022-04-12 00:42:18 +00:00
|
|
|
binDir = "build"
|
|
|
|
srcDir = "."
|
2021-02-26 00:23:22 +00:00
|
|
|
|
2022-04-12 00:42:18 +00:00
|
|
|
requires "nim >= 1.2.0",
|
|
|
|
"asynctest >= 0.3.0 & < 0.4.0",
|
2021-02-26 00:23:22 +00:00
|
|
|
"bearssl >= 0.1.4",
|
|
|
|
"chronicles >= 0.7.2",
|
|
|
|
"chronos >= 2.5.2",
|
2022-04-12 00:42:18 +00:00
|
|
|
"confutils",
|
2022-04-19 15:59:24 +00:00
|
|
|
"ethers >= 0.1.5 & < 0.2.0",
|
2022-04-12 00:42:18 +00:00
|
|
|
"libbacktrace",
|
|
|
|
"libp2p",
|
2021-02-26 00:23:22 +00:00
|
|
|
"metrics",
|
2022-04-12 00:42:18 +00:00
|
|
|
"nimcrypto >= 0.4.1",
|
2022-05-09 08:52:12 +00:00
|
|
|
"nitro >= 0.5.1 & < 0.6.0",
|
2022-04-12 00:42:18 +00:00
|
|
|
"presto",
|
|
|
|
"protobuf_serialization >= 0.2.0 & < 0.3.0",
|
2022-05-09 08:52:12 +00:00
|
|
|
"questionable >= 0.10.2 & < 0.11.0",
|
2022-04-12 00:42:18 +00:00
|
|
|
"secp256k1",
|
|
|
|
"stew",
|
|
|
|
"upraises >= 0.1.0 & < 0.2.0"
|
|
|
|
|
|
|
|
when declared(namedBin):
|
|
|
|
namedBin = {
|
|
|
|
"dagger/dagger": "dagger"
|
|
|
|
}.toTable()
|
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"
|
|
|
|
|
2022-04-12 00:42:18 +00:00
|
|
|
proc test(name: string, srcDir = "tests/", lang = "c") =
|
|
|
|
buildBinary name, srcDir
|
2021-11-23 16:55:16 +00:00
|
|
|
exec "build/" & name
|
|
|
|
|
2022-04-21 14:33:20 +00:00
|
|
|
task dagger, "build dagger binary":
|
|
|
|
buildBinary "dagger"
|
|
|
|
|
2022-03-15 14:24:03 +00:00
|
|
|
task testDagger, "Build & run Dagger tests":
|
2022-04-12 00:42:18 +00:00
|
|
|
test "testDagger"
|
2022-03-15 14:24:03 +00:00
|
|
|
|
2022-03-21 10:37:47 +00:00
|
|
|
task testContracts, "Build & run Dagger Contract tests":
|
2022-04-12 00:42:18 +00:00
|
|
|
test "testContracts"
|
2022-03-21 10:37:47 +00:00
|
|
|
|
2022-04-21 14:33:20 +00:00
|
|
|
task testIntegration, "Run integration tests":
|
|
|
|
daggerTask()
|
|
|
|
test "testIntegration"
|
|
|
|
|
2022-03-28 08:18:53 +00:00
|
|
|
task test, "Run tests":
|
|
|
|
testDaggerTask()
|
|
|
|
|
|
|
|
task testAll, "Run all tests":
|
2022-03-15 14:24:03 +00:00
|
|
|
testDaggerTask()
|
|
|
|
testContractsTask()
|
2022-04-21 14:33:20 +00:00
|
|
|
testIntegrationTask()
|