This repository has been archived by the owner on Feb 1, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathMakefile.toml
223 lines (182 loc) · 6.26 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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
# Cargo Make config https://github.com/sagiegurari/cargo-make
[env]
ON = "1"
OFF = "0"
RUST_BACKTRACE = "${ON}"
[tasks.format]
install_crate = "rustfmt" # https://github.com/rust-lang-nursery/rustfmt
command = "cargo"
args = ["fmt", "--all", "--", "--write-mode=diff", "--verbose"]
[tasks.clean]
command = "cargo"
args = ["clean"]
[tasks.build]
command = "cargo"
args = ["build"]
dependencies = ["clean"]
[tasks.build-with-verbose]
command = "cargo"
args = ["build", "--verbose", "--all-features"]
dependencies = ["clean"]
[tasks.test-all]
script = [
"echo \"Running all tests\"",
"cargo test", # Diamond Drops Main package
"cd cli && cargo test && cd ..", # Diamond Drops CLI library
"cd env && cargo test && cd ..", # Diamond Drops Environment library
"cd node && cargo test && cd .." # Diamond Drops Sharding Node library
]
dependencies = ["clean", "build-with-verbose"]
[tasks.t]
alias = "test-all"
[tasks.test-node]
script = [
"echo \"Running node tests\"",
"cd node && cargo test" # Diamond Drops Sharding Node library
]
dependencies = ["clean", "build-with-verbose"]
[tasks.test-cli]
script = [
"echo \"Running cli tests\"",
"cd cli && cargo test" # Diamond Drops Sharding cli library
]
dependencies = ["clean", "build-with-verbose"]
[tasks.test-env]
script = [
"echo \"Running cli tests\"",
"cd env && cargo test" # Diamond Drops Sharding env library
]
dependencies = ["clean", "build-with-verbose"]
[tasks.test-all-watch]
script = [
"echo \"Running all tests\"",
"cargo test", # Diamond Drops Main package
"cd cli && cargo test && cd ..", # Diamond Drops CLI library
"cd env && cargo test && cd ..", # Diamond Drops Environment library
"cd node && cargo test && cd .." # Diamond Drops Sharding Node library
]
[tasks.watch]
script = ["cargo watch --watch . --clear --debug -s=\"cargo make test-all-watch\""]
[tasks.run-proposer]
script = ["cargo run -- -l 4 mode -p"]
[tasks.run-notary]
script = ["cargo run -- -l 4 mode -n"]
[tasks.run-both]
script = ["cargo run -- -l 4 mode -b"]
[tasks.p]
alias = "run-proposer"
[tasks.n]
alias = "run-notary"
[tasks.b]
alias = "run-both"
[tasks.run-all]
script = [
"echo \"Running all modes\"",
"cargo run -- -l 4 mode -p", # Proposer Mode Only
"cargo run -- -l 4 mode -n", # Notary Mode Only
"cargo run -- -l 4 mode -b" # Both Proposer and Notary Modes
]
dependencies = ["clean"]
[tasks.all]
alias = "run-all"
[tasks.run-all-with-collation]
script = [
"echo \"Running all modes with collation active\"",
"cargo run -- --collation -l 4 mode -p", # Proposer Mode Only with Collation Active
"cargo run -- --collation -l 4 mode -n", # Notary Mode Only with Collation Active
"cargo run -- --collation -l 4 mode -b" # Both Proposer and Notary Modes with Collation Active
]
dependencies = ["clean"]
[tasks.all-with-collation]
alias = "run-all-with-collation"
[tasks.run-all-with-bin]
script = [
"echo \"Running all modes\"",
"cargo run --bin cli -- -l 4 mode -p", # Proposer Mode Only
"cargo run --bin cli -- -l 4 mode -n", # Notary Mode Only
"cargo run --bin cli -- -l 4 mode -b" # Both Proposer and Notary Modes
]
dependencies = ["clean"]
[tasks.flow-full]
dependencies = [
"build-with-verbose",
"test-all"
]
[tasks.docs]
command = "cargo"
args = ["doc", "--open"]
dependencies = ["build"]
[tasks.uml-default-recommended]
script = ["cd diagrams && sudo ./openml.sh && xdg-open ./ml.svg && cd .."]
#linux_alias = "linux-uml-default"
#windows_alias = "windows-uml-default"
#mac_alias = "mac-uml-default"
[tasks.linux-uml-default]
command = "cd diagrams && ./openml.sh && xdg-open && cd .." # this also works with OS X or any freedesktop compatible environment.
# https://superuser.com/a/39013/410684
# can't specify, chooses a default app,
# has opened an empty text file or with an error on different systems
args = ["./ml.svg"] #will just use the default svg application, chrome.desktop needs to be configured
# Could just manually open the file or use xdg-mime or another alternative
dependencies = ["build"]
[tasks.mac-uml-default]
command = "open"
args = ["./diagrams/ml.svg"]
dependencies = ["build"]
[tasks.windows-uml-default]
command = "start"
args = ["./diagrams/ml.svg"]
dependencies = ["build"]
[tasks.uml-chrome]
linux_alias = "linux_uml_chrome"
windows_alias = "windows_uml_chrome"
mac_alias = "mac_uml_chrome"
[tasks.linux_uml_chrome]
command = "xdg-open" # this also works with OS X or any freedesktop compatible environment.
# https://superuser.com/a/39013/410684
# can't specify, chooses a default app,
# has opened an empty text file or with an error on different systems
args = ["./diagrams/ml.svg"] #will just use the default svg application, chrome.desktop needs to be configured
# The default application for SVG files may need to be configured
dependencies = ["build"]
# Show list of applications installed `ls /Applications`
[tasks.mac_uml_chrome]
command = "open"
args = ["-a", "Google Chrome", "./diagrams/ml.svg"]
dependencies = ["build"]
[tasks.windows_uml_chrome]
command = "start"
args = ["./diagrams/ml.svg"] # will just use the default svg application
dependencies = ["build"]
[tasks.uml-firefox]
linux_alias = "linux_uml_firefox"
windows_alias = "windows_uml_firefox"
mac_alias = "mac_uml_firefox"
[tasks.linux_uml_firefox]
command = "xdg-open"
args = ["./diagrams/ml.svg"] #will just use the default svg application, firefox.desktop needs to be configured
dependencies = ["build"]
[tasks.mac_uml_firefox]
command = "open"
args = ["-a", "Firefox", "./diagrams/ml.svg"]
dependencies = ["build"]
[tasks.windows_uml_firefox]
command = "start"
args = ["./diagrams/ml.svg"] # will just use the default svg application
dependencies = ["build"]
[tasks.uml-brave]
linux_alias = "linux_uml_brave"
windows_alias = "windows_uml_brave"
mac_alias = "mac_uml_brave"
[tasks.linux_uml_brave]
command = "xdg-open"
args = ["./diagrams/ml.svg"] #will just use the default svg application, brave.desktop needs to be configured
dependencies = ["build"]
[tasks.mac_uml_brave]
command = "open"
args = ["-a", "Brave", "./diagrams/ml.svg"]
dependencies = ["build"]
[tasks.windows_uml_brave]
command = "start"
args = ["./diagrams/ml.svg"] # will just use the default svg application
dependencies = ["build"]