-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile.toml
108 lines (87 loc) · 1.9 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
[config]
default_to_workspace = false
skip_core_tasks = true
[tasks.deps-wasm]
script = '''
cargo install wasm-bindgen-cli
'''
[tasks.deps-npm]
script = '''
npm install
'''
[tasks.deps-docker]
script = '''
docker pull ghcr.io/hyperledger/solang@sha256:8776a9bd756664f7bf8414710d1a799799bf6fedc1c8f9f0bda17e76749dea7a
'''
[tasks.deps]
dependencies = ["deps-wasm", "deps-npm", "deps-docker"]
[tasks.build-server]
script = '''
cargo build --release --target wasm32-unknown-unknown
wasm-bindgen --out-dir ./packages/app/assets/wasm --target web --typescript ./target/wasm32-unknown-unknown/release/demo_lsp_browser.wasm
'''
[tasks.build-bindings]
script = '''
cargo run -p generate-bindings -- --target $(pwd)/packages/_generated/commontypes/src
'''
[tasks.build-app]
script = '''
npm run build --workspace=packages/app
'''
[tasks.build-backend]
script = '''
cargo build -p backend --release
'''
[tasks.build]
dependencies = ["build-server", "build-bindings", "build-app", "build-backend"]
[tasks.clean-server]
script = '''
cargo clean
'''
[tasks.clean-bindings]
script = '''
rm -rf packages/_generated/commontypes/src
'''
[tasks.clean-app]
script = '''
rm -rf packages/app/dist
rm -rf packages/app/assets/wasm
'''
[tasks.clean]
dependencies = ["clean-server", "clean-app"]
[tasks.format]
script = '''
cargo +nightly fmt --all
'''
[tasks.run]
script = '''
./target/release/backend --frontend_folder packages/app/dist --port 9000
'''
[tasks.test-backend]
script = '''
cargo test
'''
[tasks.test-app]
script = '''
npm run test --workspace=packages/app
'''
[tasks.test]
dependencies = ["test-backend", "test-app"]
[tasks.docker-build]
script = '''
docker build -t solang-playground .
'''
[tasks.docker-run]
script = '''
docker run \
--runtime=sysbox-runc \
--name playground \
--detach \
--volume /tmp:/tmp \
--publish 9000:9000 \
solang-playground
'''
[tasks.docker-log]
script = '''
docker logs playground
'''