2018-02-19 16:02:37 +01:00
|
|
|
packageName = "ethash"
|
2018-02-15 11:23:42 +01:00
|
|
|
version = "0.0.1"
|
|
|
|
author = "Status Research & Development GmbH"
|
2018-02-27 19:41:54 +02:00
|
|
|
description = "A Nim implementation of Ethash, the Ethereum proof-of-work hashing function"
|
|
|
|
license = "Apache License 2.0"
|
2018-02-15 11:23:42 +01:00
|
|
|
srcDir = "src"
|
|
|
|
|
|
|
|
### Dependencies
|
|
|
|
|
2018-02-27 19:31:25 +01:00
|
|
|
requires "nim >= 0.17.2", "keccak_tiny >= 0.1.0"
|
2018-02-19 15:17:41 +01:00
|
|
|
|
2018-02-19 16:02:37 +01:00
|
|
|
proc test(name: string, lang: string = "c") =
|
2018-02-19 15:17:41 +01:00
|
|
|
if not dirExists "build":
|
|
|
|
mkDir "build"
|
|
|
|
if not dirExists "nimcache":
|
|
|
|
mkDir "nimcache"
|
|
|
|
--run
|
|
|
|
--nimcache: "nimcache"
|
|
|
|
switch("out", ("./build/" & name))
|
|
|
|
setCommand lang, "tests/" & name & ".nim"
|
|
|
|
|
2018-02-27 11:29:46 +01:00
|
|
|
task test, "Run Proof-of-Work tests (without mining)":
|
|
|
|
test "all_tests"
|
|
|
|
|
|
|
|
task test_mining, "Run Proof-of-Work and mining tests (test in release mode)":
|
|
|
|
switch("define", "release")
|
|
|
|
switch("define", "ethash_mining")
|
2018-02-27 19:31:25 +01:00
|
|
|
test "all_tests"
|