forked from warycat/rustgym
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.toml
90 lines (68 loc) · 1.99 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
env_files = ["infra/ignore.env", "infra/const.env"]
[config]
default_to_workspace = false
[tasks.uap]
script = "git submodule update --init"
[tasks.rm_sqlite]
script = ["rm rustgym.sqlite"]
[tasks.print-schema]
script = [
"diesel print-schema run --database-url rustgym.sqlite >> schema/schema.rs"
]
[tasks.migration]
script = ["diesel migration run --database-url rustgym.sqlite"]
[tasks.readme]
script = ["cargo run --bin rustgym-readme"]
dependencies = ["rm_sqlite", "migration"]
[tasks.copy-server]
script = 'cp target/release/rustgym-server rustgym-server'
[tasks.copy-ingest]
script = 'cp target/release/rustgym-ingest rustgym-ingest'
[tasks.wasm-pack]
script = 'wasm-pack build wasm --target no-modules --out-dir ../pkg'
[tasks.archive-wasm]
script = "tar -czvf pkg.tar.gz pkg"
[tasks.archive-static]
script = "tar -czvf static.tar.gz static"
[tasks.watch-wasm]
run_task = { name = ["wasm-pack"] }
watch = { postpone = true, watch = ["./wasm", "./msg", "./consts"] }
[tasks.watch-server]
script = "cargo watch -w server -w msg -w consts -x 'run --bin rustgym-server'"
dependencies = ["wasm-pack"]
[tasks.sonic]
script = "sonic -c infra/config.cfg"
[tasks.dev]
run_task = { name = ["sonic", "watch-server", "watch-wasm"], parallel = true }
[tasks.wasm-test]
command = "wasm-pack"
args = ["test", "--chrome", "--headless", "wasm"]
[tasks.tfrs-test]
script = "cargo test -p rustgym-tfrs"
[tasks.watch-tfrs-test]
run_task = { name = ["tfrs-test"] }
watch = { postpone = true, watch = ["./tfrs", "./tfrs-sys"] }
[tasks.build-mini]
command = "cargo"
args = [
"build",
"--release",
"--target",
"aarch64-apple-darwin",
"--bin",
"${APP_NAME}"
]
[tasks.copy-mini]
command = "scp"
args = [
"./target/aarch64-apple-darwin/release/${APP_NAME}",
"mini:~/${APP_NAME}"
]
dependencies = ["build-mini"]
[tasks.run-mini]
command = "ssh"
args = ["mini", "./${APP_NAME}"]
dependencies = ["copy-mini"]
[tasks.run-local]
command = "cargo"
args = ["run", "--release", "--bin", "${APP_NAME}"]