-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile.toml
170 lines (138 loc) · 3.4 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
extend= [
{ path = "coverage.toml" }
]
[config]
default_to_workspace = false
[env]
RUST_BACKTRACE = 0
[tasks.fix-all]
workspace = true
command = "cargo"
args = ["fix", "--all-features", "--allow-dirty"]
[tasks.fix-clippy]
workspace = true
command = "cargo"
args = ["clippy", "--fix", "--all-features"]
[tasks.fix]
dependencies = ["fix-clippy", "fix-all", "format"]
[tasks.format]
workspace = true
command = "cargo"
args = ["fmt"]
[tasks.format-check]
command = "cargo"
args = ["fmt", "--all", "--", "--check"]
[tasks.check]
command = "cargo"
args = ["hack", "check", "--all", "--each-feature"]
[tasks.clippy]
workspace = true
command = "cargo"
args = ["clippy", "--all-features"]
[tasks.clean]
workspace = true
command = "cargo"
args = ["clean"]
[tasks.build]
workspace = true
command = "cargo"
args = ["build"]
dependencies = ["clean"]
[tasks.release]
command = "cargo"
args = ["build", "--bins", "--all", "--release"]
[tasks.doc]
toolchain = "nightly"
command = "cargo"
args = ["doc", "--workspace", "--open", "--no-deps", "--all-features"]
[tasks.unit]
command = "cargo"
args = ["test", "--all", "--lib"]
[tasks.integration]
command = "cargo"
args = ["test", "integration", "--all-features"]
[tasks.test]
dependencies = ["unit", "integration"]
[tasks.dev]
dependencies = ["check-wasm", "test", "format"]
[tasks.wasm-bindings]
script = '''
cd bindings/webassembly
wasm-pack build --target web --scope mpc-sdk --features full
'''
[tasks.wasm-signers]
script = '''
cd bindings/webassembly
wasm-pack build --target web --scope mpc-sdk --features signers
'''
[tasks.wasm-bindings-debug]
script = '''
cd bindings/webassembly
wasm-pack build --target web --scope mpc-sdk --features tracing,full
'''
[tasks.gen-server-key]
script = '''
cargo run -- generate-keypair server.pem
'''
[tasks.gen-keys]
script = '''
cargo run -- generate-keypair tests/test.pem --public-key tests/server_public_key.txt
cargo run -- generate-keypair conformance/signers/webassembly-cggmp/p1.pem
cargo run -- generate-keypair conformance/signers/webassembly-cggmp/p2.pem
cargo run -- generate-keypair conformance/signers/webassembly-cggmp/p3.pem
'''
dependencies = ["gen-server-key"]
[tasks.gen-e2e]
script = '''
cd tools
cargo run --bin gen-e2e
'''
[tasks.test-server]
script = '''
cargo run -- start -b 127.0.0.1:8008 integration_tests/tests/config.toml
'''
[tasks.e2e-server]
script = '''
cargo run -- start -b 127.0.0.1:8008 conformance/signers/webassembly-cggmp/config.toml
'''
[tasks.dev-server]
script = '''
cd tools
cargo run --bin dev-server
'''
[tasks.check-wasm]
command = "cargo"
args = [
"check",
"--all-features",
"--target",
"wasm32-unknown-unknown",
"-p",
"mpc-client",
"-p",
"mpc-driver",
"-p",
"mpc-bindings",
]
[tasks.genhtml]
script = '''
grcov ${COVERAGE_PROF_OUTPUT} -s . --binary-path ./target/cover/debug -t html --branch --ignore-not-existing -o ./target/coverage/ --ignore '*/build.rs' --ignore 'tests/*' --ignore 'target/*' --ignore 'src/*'
'''
[tasks.coverage]
alias = "coverage_grcov"
dependencies = ["clean-profraw"]
[tasks.clean-profraw]
script = '''
rm -f *.profraw
rm -f client/*.profraw
rm -f protocol/*.profraw
rm -f server/*.profraw
'''
[tasks.clean-coverage]
command = "cargo"
args = ["clean", "--target-dir", "target/coverage"]
[tasks.clean-cover]
command = "cargo"
args = ["clean", "--target-dir", "target/cover"]
[tasks.cover]
dependencies = ["clean-cover", "clean-coverage", "coverage", "genhtml", "clean-profraw"]