-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile.toml
104 lines (85 loc) · 3.07 KB
/
Makefile.toml
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# Cargo Makefile
[env]
FEATURES_INTEGRATION_TESTING="integration"
NODE_FEATURES_TESTING="testing"
[tasks.format]
toolchain = "nightly"
command = "cargo"
args = ["fmt", "--all"]
[tasks.check-format]
toolchain = "nightly"
command = "cargo"
args = ["fmt", "--all", "--", "--check"]
[tasks.clippy-all]
dependencies = [
"clippy",
"clippy-integration-tests"
]
[tasks.clippy]
command = "cargo"
args = ["clippy","--workspace", "--all-targets", "--", "-D", "clippy::all", "-D", "warnings"]
[tasks.clippy-integration-tests]
command = "cargo"
args = ["clippy","--workspace", "--tests", "--features", "integration", "--", "-D", "clippy::all", "-D", "warnings"]
[tasks.docs]
env = { "RUSTDOCFLAGS" = "-D warnings" }
command = "cargo"
args = ["doc", "--all-features", "--keep-going", "--release"]
[tasks.test]
description = "Run the client testing suite"
command = "cargo"
args = ["nextest", "run", "--release", "--workspace"]
[tasks.integration-test]
description = "Run the integration test binary. Requires a node to connect to."
command = "cargo"
args = ["nextest", "run", "--release", "--test=integration", "--features", "${FEATURES_INTEGRATION_TESTING}"]
# Same commands as above but using ci profile for nextest
[tasks.ci-test]
description = "Run the client testing suite"
command = "cargo"
args = ["nextest", "run", "--profile", "ci-default", "--release", "--workspace"]
[tasks.ci-integration-test]
description = "Run the integration test binary. Requires a node to connect to."
command = "cargo"
args = ["nextest", "run", "--profile", "ci-default", "--release", "--test=integration", "--features", "${FEATURES_INTEGRATION_TESTING}"]
[tasks.lint]
dependencies = [
"check-format",
"clippy-all",
"docs"
]
[tasks.kill-node]
description = "Kill the miden-node process"
script = "pkill miden-node || echo 'process not running'"
[tasks.reset]
description = "Remove the miden-node directory"
command = "rm"
args = ["-rf", "miden-node"]
[tasks.node]
description = "Clone or update miden-node repository and clean up files"
script_runner = "bash"
script = [
'if [ -d miden-node ]; then cd miden-node ; else git clone https://github.com/0xPolygonMiden/miden-node.git && cd miden-node; fi',
'git checkout main && git pull origin main && cargo update',
'rm -rf miden-store.sqlite3 miden-store.sqlite3-wal miden-store.sqlite3-shm',
'cargo run --bin miden-node --features $NODE_FEATURES_TESTING -- make-genesis --inputs-path ../tests/integration/config/genesis.toml --force',
]
[tasks.start-node]
description = "Start the miden-node"
script_runner = "bash"
cwd = "./miden-node"
script = "cargo run --bin miden-node --features $NODE_FEATURES_TESTING -- start --config ../tests/integration/config/miden-node.toml node"
[tasks.docs-deps]
description = "Install documentation dependencies"
command = "pip3"
args = ["install", "-r", "scripts/docs_requirements.txt"]
[tasks.build-docs]
description = "Build documentation"
dependencies = ["docs-deps"]
command = "mkdocs"
args = ["build"]
[tasks.serve-docs]
description = "Serve documentation locally"
dependencies = ["docs-deps"]
command = "mkdocs"
args = ["serve"]