-
Notifications
You must be signed in to change notification settings - Fork 6
/
rocksdb.nimble
47 lines (40 loc) · 1.49 KB
/
rocksdb.nimble
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
packageName = "rocksdb"
version = "0.5.0"
author = "Status Research & Development GmbH"
description =
"A wrapper for Facebook's RocksDB, an embeddable, persistent key-value store for fast storage"
license = "Apache License 2.0 or GPLv2"
skipDirs = @["examples", "tests"]
mode = ScriptMode.Verbose
### Dependencies
requires "nim >= 2.0", "results", "tempfile", "unittest2"
# Format only works with nim version 2
task format, "Format nim code using nph":
# Using the latest nph commit for now because the latest tagged version
# doesn't work with the latest nim 2 version
exec "nimble install [email protected]"
exec "nph ."
task clean, "Remove temporary files":
exec "rm -rf build"
exec "make -C vendor/rocksdb clean"
task test, "Run tests":
let runTests = "nim c -d:nimDebugDlOpen -r --threads:on tests/test_all.nim"
when defined(linux):
exec "export LD_LIBRARY_PATH=build; " & runTests
when defined(macosx):
exec "export DYLD_LIBRARY_PATH=build; " & runTests
when defined(windows):
exec runTests
task test_static, "Run tests after static linking dependencies":
when defined(windows):
echo "Static linking is not supported on windows"
quit(1)
exec "scripts/build_static_deps.sh"
exec "nim c -d:rocksdb_static_linking -r --threads:on tests/test_all.nim"
before install:
when defined(linux):
exec "scripts/build_shared_deps_linux.sh"
when defined(macosx):
exec "scripts/build_shared_deps_osx.sh"
when defined(windows):
exec ".\\scripts\\build_dlls_windows.bat"