-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy patharchivist.nimble
More file actions
59 lines (47 loc) · 1.85 KB
/
archivist.nimble
File metadata and controls
59 lines (47 loc) · 1.85 KB
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
48
49
50
51
52
53
54
55
56
57
58
59
version = "0.1.0"
author = "Archivist Team"
description = "data durability engine"
license = "MIT"
bin = @["archivist", "tools/cirdl/cirdl", "tools/setup/setup"]
binDir = "build"
import std/os
import "./vendor/nimble/deps.nims"
before build:
exec "nim vendor" / "nimble" / "install.nims"
task update, "Sync submodules to pinned commits (safe)":
exec "git submodule sync --recursive"
exec "git submodule update --init --recursive"
task updateUnsafe, "Reset and clean submodules to pinned commits (destructive)":
exec "git submodule sync --recursive"
exec "git submodule foreach --recursive 'git reset --hard'"
exec "git submodule foreach --recursive 'git clean -fdx'"
exec "git submodule update --init --recursive --force"
task test, "Run node tests":
exec "nim c -r tests" / "testNode"
task testContracts, "Run contract tests":
exec "nim c -r tests" / "testContracts"
task testIntegration, "Run integration tests":
exec "nim c" &
" --define:release" &
" --define:archivist_system_testing_options" &
" --out:build" / "integration-test" / "archivist-for-testing".toExe &
" archivist"
exec "nim c -r tests" / "testIntegration"
task testTools, "Run circuit downloader tests":
exec "nimble build"
exec "nim c -r tests" / "testTools"
task testAll, "Run all tests":
testTask()
testContractsTask()
testIntegrationTask()
testToolsTask()
task format, "Format code using NPH":
exec "nimble install https://github.com/durability-labs/nph@#version-0-6-2-prerelease" # TODO: update to version 0.6.2 once it is released
exec findExe("nph") & " archivist.nim"
exec findExe("nph") & " archivist/"
exec findExe("nph") & " tests/"
exec findExe("nph") & " tools/"
task addDep, "Add vendored Nim dependency (git submodule)":
addDepTask(thisDir())
task removeDep, "Remove vendored Nim dependency (git submodule)":
removeDepTask(thisDir())