nimbus-eth2/beacon_chain.nimble

51 lines
1.4 KiB
Plaintext
Raw Normal View History

mode = ScriptMode.Verbose
import
2019-03-12 12:56:33 +00:00
beacon_chain/version as ver
2018-07-20 13:46:03 +00:00
packageName = "beacon_chain"
version = versionAsStr
2018-07-20 13:46:03 +00:00
author = "Status Research & Development GmbH"
2018-09-26 16:26:39 +00:00
description = "Eth2.0 research implementation of the beacon chain"
2018-07-20 13:46:03 +00:00
license = "MIT or Apache License 2.0"
installDirs = @["beacon_chain", "research"]
bin = @[
"beacon_chain/beacon_node",
"beacon_chain/validator_keygen",
"research/serialized_sizes",
"research/state_sim",
]
2018-07-20 13:46:03 +00:00
### Dependencies
2019-02-07 11:02:40 +00:00
requires "nim >= 0.19.0",
"eth",
2018-09-26 16:26:39 +00:00
"nimcrypto",
"blscurve",
2018-11-26 16:26:54 +00:00
"ranges",
"chronicles",
"confutils",
"serialization",
"json_serialization",
"json_rpc",
"chronos",
"yaml",
"libp2p",
"byteutils" # test only (BitField and bytes datatypes deserialization)
2018-07-20 13:46:03 +00:00
### Helper functions
proc buildBinary(name: string, srcDir = "./", params = "", lang = "c") =
2018-07-20 13:46:03 +00:00
if not dirExists "build":
mkDir "build"
# allow something like "nim test --verbosity:0 --hints:off beacon_chain.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"
2018-07-20 13:46:03 +00:00
### tasks
task test, "Run all tests":
# Mainnet config
buildBinary "all_tests", "tests/", "-r -d:release -d:chronicles_log_level=ERROR"
# Minimal config
buildBinary "all_tests", "tests/", "-r -d:release -d:chronicles_log_level=ERROR -d:const_preset=minimal"