-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathjustfile
More file actions
112 lines (97 loc) · 4.27 KB
/
justfile
File metadata and controls
112 lines (97 loc) · 4.27 KB
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
update-submodules:
git submodule update --recursive --init
apply-generated-files-diff VERSION="v0.19.0" FILEHASH="a892e2d9f5c331f5e80bcb5db4133e7db625aa4d14ffdf9467b75c4c34d1744f":
cd machine/emulator && \
(wget -O add-generated-files.diff https://github.com/cartesi/machine-emulator/releases/download/{{VERSION}}/add-generated-files.diff && \
(echo "{{FILEHASH}} add-generated-files.diff" | sha256sum -c) && \
git apply add-generated-files.diff) ; \
rm -f add-generated-files.diff
bundle-boost:
make -C machine/emulator bundle-boost
clean-emulator:
make -C machine/emulator clean depclean distclean
clean-contracts: clean-consensus-contracts clean-prt-contracts clean-bindings clean-deployments
make -C machine/emulator clean depclean distclean
setup: update-submodules clean-emulator clean-contracts bundle-boost apply-generated-files-diff
make -C machine/emulator # Requires docker, necessary for machine bindings
# Run this once after cloning, if using a docker environment
setup-docker: setup build-docker-image
# Run this once after cloning, if using local environment
setup-local: setup
just -f ./prt/contracts/justfile install-deps
just -f ./cartesi-rollups/contracts/justfile install-deps
just -f ./cartesi-rollups/contracts/justfile build-devnet
just -f ./test/programs/justfile download-deps
just -f ./test/programs/justfile build-programs
just -f ./test/programs/justfile build-honeypot-snapshot # Requires docker, necessary for tests
build-consensus:
just -f ./cartesi-rollups/contracts/justfile build
test-consensus:
just -f ./cartesi-rollups/contracts/justfile test
clean-consensus-contracts:
just -f ./cartesi-rollups/contracts/justfile clean-smart-contracts
clean-consensus-bindings:
just -f ./cartesi-rollups/contracts/justfile clean-bindings
clean-consensus-deployments:
just -f ./cartesi-rollups/contracts/justfile clean-deployments
bind-consensus:
just -f ./cartesi-rollups/contracts/justfile bind
build-devnet:
just -f ./cartesi-rollups/contracts/justfile build-devnet
build-prt:
just -f ./prt/contracts/justfile build
test-prt:
just -f ./prt/contracts/justfile test-disputes
clean-prt-contracts:
just -f ./prt/contracts/justfile clean-smart-contracts
clean-prt-bindings:
just -f ./prt/contracts/justfile clean-bindings
clean-prt-deployments:
just -f ./prt/contracts/justfile clean-deployments
bind-prt:
just -f ./prt/contracts/justfile bind
build-smart-contracts: build-consensus build-prt
test-smart-contracts: build-smart-contracts test-consensus test-prt
bind: bind-consensus bind-prt
clean-bindings: clean-consensus-bindings clean-prt-bindings
clean-deployments: clean-consensus-deployments clean-prt-deployments
fmt-rust-workspace: bind
cargo fmt
check-fmt-rust-workspace: bind
cargo fmt --check
check-rust-workspace: bind
cargo check --features download_uarch
test-rust-workspace: bind
cargo test --features download_uarch
build-rust-workspace *ARGS: bind
cargo build {{ARGS}} --features download_uarch
build-release-rust-workspace *ARGS: bind
cargo build --release {{ARGS}} --features download_uarch
clean-rust-workspace: bind
cargo clean
build: build-smart-contracts bind build-rust-workspace
build-docker-image TAG="dave:dev":
docker build -f test/Dockerfile -t {{TAG}} .
run-dockered +CMD: build-docker-image
docker run -it --rm --name dave-node dave:dev {{CMD}}
exec-dockered +CMD:
docker exec dave-node {{CMD}}
test-rollups-echo: build-rust-workspace
just -f ./prt/tests/rollups/justfile test-echo
test-rollups-honeypot: build-rust-workspace
just -f ./prt/tests/rollups/justfile test-honeypot-all
test-rollups-honeypot-ci: build-rust-workspace
just -f ./prt/tests/rollups/justfile test-honeypot-ci
test-rollups-honeypot-case CASE: build-rust-workspace
just -f ./prt/tests/rollups/justfile test-honeypot-case {{CASE}}
view-rollups-logs:
just -f ./prt/tests/rollups/justfile read-node-logs
kms-test-start:
docker compose -f common-rs/kms/compose.yaml up --wait
kms-test-stop:
docker compose -f common-rs/kms/compose.yaml down --volumes --remove-orphans
kms-test-restart: kms-test-stop kms-test-start
kms-test-logs:
docker compose -f common-rs/kms/compose.yaml logs -f
kms-test-dave-logs:
docker compose -f common-rs/kms/compose.yaml exec dave-kms tail -f ./prt/tests/rollups/dave.log