forked from 0xekez/clockchain
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run.sh
executable file
·57 lines (55 loc) · 1.55 KB
/
run.sh
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
#!/bin/bash
PROGRAM="fib.bc"
case $1 in
build-local)
(cd assembler/ ; cargo build)
(cd local-evaluator/ ; cargo build --release)
(cd program-generator/ ; cargo build)
;;
build-solana)
(cd solana-evaluator/ ; ./run.sh build)
;;
run-solana)
cat assembler/examples/long.bc \
| ./assembler/target/debug/assembler \
| (cd solana-evaluator/ ; ./run.sh client)
;;
generate-and-run-solana)
./program-generator/target/debug/program-generator \
| ./assembler/target/debug/assembler \
| (cd solana-evaluator/ ; ./run.sh client)
;;
build-ethereum)
(python3 ethereum-evaluator/deploy.py Interpreter)
;;
run-ethereum)
cat assembler/examples/$PROGRAM \
| ./assembler/target/debug/assembler \
| python3 ethereum-evaluator/exec.py Interpreter execute
;;
run-local)
cat assembler/examples/$PROGRAM \
| ./assembler/target/debug/assembler \
| ./local-evaluator/target/release/local-evaluator
;;
build-cosmwasm)
(cd cosmwasm-evaluator/ ; ./run.sh small-build)
(cd cosmwasm-evaluator/ ; ./run.sh deploy) | tail -1 > cosmwasm-evaluator/contract-address
;;
run-cosmwasm)
cat assembler/examples/$PROGRAM \
| ./assembler/target/debug/assembler \
| cosmwasm-evaluator/run.sh execute $(cat cosmwasm-evaluator/contract-address)
;;
build-workers)
echo "nothing to do. make sure the current workers deploy is up to date."
;;
run-workers)
cat assembler/examples/$PROGRAM \
| ./assembler/target/debug/assembler \
| ./workers-evaluator/client.sh
;;
*)
echo "usage: $0 <build|run>"
;;
esac