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