2024-06-26 15:00:10 +00:00
|
|
|
packageName = "rocksdb"
|
2024-06-26 17:31:39 +00:00
|
|
|
version = "0.5.0"
|
2024-06-26 15:00:10 +00:00
|
|
|
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
|
2018-01-27 16:18:38 +00:00
|
|
|
|
|
|
|
### Dependencies
|
2024-06-26 15:00:10 +00:00
|
|
|
requires "nim >= 1.6", "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 nph@#head"
|
|
|
|
exec "nph ."
|
2018-02-03 23:55:41 +00:00
|
|
|
|
2024-03-27 06:18:21 +00:00
|
|
|
task clean, "Remove temporary files":
|
|
|
|
exec "rm -rf build"
|
|
|
|
exec "make -C vendor/rocksdb clean"
|
2018-02-03 23:55:41 +00:00
|
|
|
|
2019-01-10 23:39:17 +00:00
|
|
|
task test, "Run tests":
|
2024-07-03 03:34:40 +00:00
|
|
|
let runTests = "nim c -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
|
2018-06-24 23:13:10 +00:00
|
|
|
|
2024-03-27 06:18:21 +00:00
|
|
|
task test_static, "Run tests after static linking dependencies":
|
2024-07-03 03:34:40 +00:00
|
|
|
when defined(windows):
|
|
|
|
echo "Static linking is not supported on windows"
|
|
|
|
quit(1)
|
|
|
|
|
|
|
|
exec "scripts/build_static_deps.sh"
|
2024-03-27 06:18:21 +00:00
|
|
|
exec "nim c -d:rocksdb_static_linking -r --threads:on tests/test_all.nim"
|
2024-07-03 03:34:40 +00:00
|
|
|
|
|
|
|
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"
|