2024-02-20 21:39:23 +00:00
|
|
|
mode = ScriptMode.Verbose
|
|
|
|
|
2018-02-19 15:02:37 +00:00
|
|
|
packageName = "ethash"
|
2018-02-15 10:23:42 +00:00
|
|
|
version = "0.0.1"
|
|
|
|
author = "Status Research & Development GmbH"
|
2018-02-27 17:41:54 +00:00
|
|
|
description = "A Nim implementation of Ethash, the Ethereum proof-of-work hashing function"
|
|
|
|
license = "Apache License 2.0"
|
2018-02-15 10:23:42 +00:00
|
|
|
srcDir = "src"
|
|
|
|
|
|
|
|
### Dependencies
|
|
|
|
|
2024-02-20 21:39:23 +00:00
|
|
|
requires "nim >= 1.6.0", "nimcrypto >= 0.1.0"
|
2018-02-19 14:17:41 +00:00
|
|
|
|
2024-02-20 21:39:23 +00:00
|
|
|
proc test(name: string, args: string) =
|
2018-02-19 14:17:41 +00:00
|
|
|
if not dirExists "build":
|
|
|
|
mkDir "build"
|
2024-02-20 21:39:23 +00:00
|
|
|
exec "nim c --styleCheck:usages --styleCheck:error --outdir:./build/ " & args & " --run tests/" & name & ".nim"
|
|
|
|
if (NimMajor, NimMinor) > (1, 6):
|
|
|
|
exec "nim c --styleCheck:usages --styleCheck:error --mm:refc --outdir:./build/ " & args & " --run tests/" & name & ".nim"
|
2018-02-19 14:17:41 +00:00
|
|
|
|
2018-02-27 10:29:46 +00:00
|
|
|
task test, "Run Proof-of-Work tests (without mining)":
|
2024-02-20 21:39:23 +00:00
|
|
|
test "all_tests", ""
|
2018-02-27 10:29:46 +00:00
|
|
|
|
2018-09-07 19:31:02 +00:00
|
|
|
task testRelease, "test release mode":
|
2024-02-20 21:39:23 +00:00
|
|
|
test "all_tests", "-d:release"
|
2018-09-07 19:31:02 +00:00
|
|
|
|
2018-02-28 17:46:28 +00:00
|
|
|
task test_mining, "Run Proof-of-Work and mining tests (test in release mode + OpenMP + march=native)":
|
2024-02-20 21:39:23 +00:00
|
|
|
test "all_tests", "-d:release -d:openmp -d:march_native -d:ethash_mining"
|