-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathgoodfile
40 lines (34 loc) · 1.07 KB
/
goodfile
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
Build.dependencies({"git", "make", "rustc", "cargo"})
Build.metric(
"rust version",
string.gsub(Build.check_output({"rustc", "--version"}).stdout, '^%s*(.*)%s*$', '%1')
)
Step.start("zvm")
Step.push("bin")
Build.run({"cargo", "build", "-p", "zvm"})
Step.advance("lib")
Build.run({"cargo", "build", "-p", "zvm-stdlib"})
Step.advance("tools")
Build.run({"cargo", "build", "-p", "zvm-tools"})
Build.run({"cargo", "build", "-p", "zvm-cli"})
Step.start("test")
Build.run({"cargo", "test", "--workspace"})
Step.start("measurement")
Build.run({"cargo", "build", "-p", "zvm-cli", "--release"})
Build.metric(
"zvm binary size (bytes)",
Build.environment.size("target/release/zvm")
)
Build.artifact("target/release/zvm")
start = Build.now_ms()
Build.run({"./target/release/zvm", "./references/java/arithmetic.class", "add_int_int", "1", "2"})
Build.metric(
"add_int_int 1 2 eval time",
Build.now_ms() - start
)
start = Build.now_ms()
Build.run({"./target/release/zvm", "./references/java/fibonacci.class", "compute", "24"})
Build.metric(
"fibonacci.compute 24",
Build.now_ms() - start
)