2018-11-19 02:52:11 +00:00
|
|
|
mode = ScriptMode.Verbose
|
|
|
|
|
2018-11-19 04:03:23 +00:00
|
|
|
packageName = "libp2p"
|
2019-11-06 11:01:16 +00:00
|
|
|
version = "0.0.2"
|
2018-11-19 02:52:11 +00:00
|
|
|
author = "Status Research & Development GmbH"
|
|
|
|
description = "LibP2P implementation"
|
|
|
|
license = "MIT"
|
2018-11-27 12:20:05 +00:00
|
|
|
skipDirs = @["tests", "examples", "Nim"]
|
2018-11-19 02:52:11 +00:00
|
|
|
|
2020-04-14 05:26:12 +00:00
|
|
|
requires "nim >= 1.2.0",
|
|
|
|
"nimcrypto >= 0.4.1",
|
2020-03-06 19:19:43 +00:00
|
|
|
"bearssl >= 0.1.4",
|
2020-04-21 01:24:42 +00:00
|
|
|
"chronicles >= 0.7.2",
|
2020-04-14 13:27:07 +00:00
|
|
|
"chronos >= 2.3.8",
|
|
|
|
"metrics",
|
|
|
|
"secp256k1",
|
2019-12-13 09:42:47 +00:00
|
|
|
"stew"
|
2018-11-19 02:52:11 +00:00
|
|
|
|
2020-04-23 01:27:29 +00:00
|
|
|
proc runTest(filename: string, secure: string = "secio") =
|
2020-04-14 13:21:16 +00:00
|
|
|
exec "nim c -r --opt:speed -d:debug --verbosity:0 --hints:off tests/" & filename
|
|
|
|
rmFile "tests/" & filename.toExe
|
2019-03-14 02:55:47 +00:00
|
|
|
|
2020-04-19 05:04:53 +00:00
|
|
|
proc buildSample(filename: string) =
|
|
|
|
exec "nim c --opt:speed --threads:on -d:debug --verbosity:0 --hints:off examples/" & filename
|
|
|
|
rmFile "examples" & filename.toExe
|
|
|
|
|
2018-11-19 21:03:50 +00:00
|
|
|
task test, "Runs the test suite":
|
2020-04-23 01:27:29 +00:00
|
|
|
runTest("testnative")
|
|
|
|
runTest("testnative", "noise")
|
|
|
|
runTest("testdaemon")
|
|
|
|
runTest("testinterop")
|
2020-04-19 05:04:53 +00:00
|
|
|
|
|
|
|
task examples_build, "Build the samples":
|
2020-04-23 01:27:29 +00:00
|
|
|
buildSample("directchat")
|