/ rocksdb.nimble
rocksdb.nimble
 1  packageName = "rocksdb"
 2  version = "10.10.1.0"
 3  author = "Status Research & Development GmbH"
 4  description =
 5    "A wrapper for Facebook's RocksDB, an embeddable, persistent key-value store for fast storage"
 6  license = "Apache License 2.0 or GPLv2"
 7  skipDirs = @["examples", "tests"]
 8  mode = ScriptMode.Verbose
 9  installDirs = @["build"]
10  
11  ### Dependencies
12  requires "nim >= 2.0", "results", "tempfile", "unittest2 >= 0.2.5"
13  
14  template build() =
15    when defined(windows):
16      exec ".\\scripts\\build_dlls_windows.bat"
17    else:
18      exec "scripts/build_static_deps.sh"
19  
20  before install:
21    build()
22  
23  task format, "Format nim code using nph":
24    exec "nimble install nph@0.7.0"
25    exec "nph ."
26  
27  task test, "Run tests":
28    build()
29    when defined(windows):
30      exec "nim c -d:nimDebugDlOpen -r --mm:refc --threads:on tests/test_all.nim"
31      exec "nim c -d:nimDebugDlOpen -r --mm:orc --threads:on tests/test_all.nim"
32    else:
33      exec "nim c -r --mm:refc --threads:on tests/test_all.nim"
34      exec "nim c -r --mm:orc --threads:on tests/test_all.nim"