-
Notifications
You must be signed in to change notification settings - Fork 53
/
Makefile.toml
147 lines (130 loc) · 3.39 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
[config]
default_to_workspace = false
# --- test ---
[tasks.clean]
command = "cargo"
args = ["clean"]
[tasks.create-shape-json]
description = "Creates shape jsons for test"
script = [
"cd resources/shape",
"cargo run -p truck-modeling --example bottle",
"cargo run -p truck-modeling --example cube",
"cargo run -p truck-modeling --example cylinder",
"cargo run -p truck-modeling --example punched-cube",
"cargo run -p truck-modeling --example torus-punched-cube",
"cargo run -p truck-modeling --example cube-in-cube",
"cargo run -p truck-modeling --example torus",
"cargo run -p truck-modeling --example sphere",
"cargo run -p truck-modeling --example torus -- 500 100 large-torus.json",
"cargo run -p truck-shapeops --example punched-cube-shapeops",
]
[tasks.cpu-test]
description = "Tests using only CPU"
command = "cargo"
args = [
"test",
"-p", "truck-base",
"-p", "truck-geotrait",
"-p", "truck-geometry",
"-p", "truck-topology",
"-p", "truck-polymesh",
"-p", "truck-meshalgo",
"-p", "truck-modeling",
"-p", "truck-shapeops",
"-p", "truck-stepio",
"--features", "derive",
"--", "--nocapture",
]
[tasks.cpu-nightly-test]
description = "Tests using only CPU"
command = "rustup"
args = [
"run",
"nightly",
"cargo",
"test",
"-p", "truck-base",
"-p", "truck-geotrait",
"-p", "truck-geometry",
"-p", "truck-topology",
"-p", "truck-polymesh",
"-p", "truck-meshalgo",
"-p", "truck-modeling",
"-p", "truck-shapeops",
"-p", "truck-stepio",
"--features", "derive",
"--", "--nocapture",
]
[tasks.gpu-test]
description = "Tests using GPU"
command = "cargo"
args = [
"test",
"-p", "truck-platform",
"-p", "truck-rendimpl",
"--", "--nocapture", "--test-threads=1",
]
[tasks.gpu-release-build-test]
description = "Tests using GPU"
command = "cargo"
args = [
"test", "--release",
"-p", "truck-platform",
"-p", "truck-rendimpl",
"--", "--nocapture", "--test-threads=1",
]
[tasks.collect-gpu-artifacts]
description = "Collects artifacts for gpu tests"
script_runner = "@shell"
script = [
"mkdir images",
"mv truck-platform/output images/platform",
"mv truck-rendimpl/output images/rendimpl",
]
[tasks.ci-cpu-test]
dependencies = ["clean", "cpu-test"]
[tasks.ci-cpu-nightly-test]
dependencies = ["clean", "cpu-nightly-test"]
[tasks.ci-gpu-test]
dependencies = ["clean", "gpu-release-build-test", "collect-gpu-artifacts"]
[tasks.wasm-build]
description = "Build to wasm-target"
env = { "RUSTFLAGS" = "--cfg=web_sys_unstable_apis" }
command = "cargo"
args = ["build", "--target=wasm32-unknown-unknown"]
[tasks.webgl-build]
description = "Build to wasm-target with webgl feature"
env = { "RUSTFLAGS" = "--cfg=web_sys_unstable_apis" }
command = "cargo"
args = [
"build",
"--target=wasm32-unknown-unknown",
"--features", "webgl"
]
[tasks.build-wgpu-examples]
description = "Build wasms"
env = { "RUSTFLAGS" = "--cfg=web_sys_unstable_apis" }
command = "cargo"
args = ["run", "--bin", "example-pages-generator"]
[tasks.js-test]
description = "test for js"
script = [
"cd truck-js",
"wasm-pack build --target web",
"deno test -A tests/",
]
[tasks.adhoc-viewer]
description = "build adhoc viewer"
script_runner = "@shell"
script = [
"cd truck-js",
"wasm-pack build --target web",
"cp examples/index.html pkg/",
"cp examples/bootstrap.js pkg/",
"cp examples/script.js pkg/",
]
[tasks.wasm-test]
dependencies = ["wasm-build", "webgl-build", "js-test"]
[tasks.page-build]
dependencies = ["adhoc-viewer", "build-wgpu-examples"]