-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
81 lines (65 loc) · 2.6 KB
/
Makefile
File metadata and controls
81 lines (65 loc) · 2.6 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
# Makefile - Encrypted Forest development commands
#
# Usage:
# make dev Start Surfpool for local development
# make dev-docker Start Surfpool + ARX nodes via Docker Compose
# make stop Stop all dev services
# make build Build the Arcium MXE program
# make deploy Build and deploy to local Surfpool
# make test Run arcium test (starts its own local cluster)
# make clean Remove build artifacts, databases, Docker volumes
# make install Install Bun dependencies
.PHONY: dev dev-watch dev-docker stop build deploy test test-local clean install
# ---------------------------------------------------------------------------
# Development environment
# ---------------------------------------------------------------------------
dev:
@./scripts/dev-start.sh
dev-watch:
@./scripts/dev-start.sh --watch
dev-docker:
@./scripts/dev-start.sh --docker
stop:
@./scripts/dev-stop.sh
# ---------------------------------------------------------------------------
# Build and deploy
# ---------------------------------------------------------------------------
build:
@mkdir -p target/deploy
@cp keypairs/encrypted_forest-keypair.json target/deploy/encrypted_forest-keypair.json
arcium build
deploy:
@./scripts/deploy-local.sh
# ---------------------------------------------------------------------------
# Testing
# ---------------------------------------------------------------------------
# arcium test starts its own local validator + ARX nodes (default behavior)
test:
arcium test
# Run tests against an already-running local environment (started via ./scripts/run-local.sh)
test-local:
set -a && . ./.env && set +a && ANCHOR_PROVIDER_URL=http://localhost:8899 ANCHOR_WALLET=./admin.json bunx vitest run
# ---------------------------------------------------------------------------
# Dependencies
# ---------------------------------------------------------------------------
install:
bun install
# ---------------------------------------------------------------------------
# Cleanup
# ---------------------------------------------------------------------------
clean:
@echo "Stopping running services..."
-./scripts/dev-stop.sh 2>/dev/null || true
-lsof -ti:8899 | xargs kill -9 2>/dev/null || true
@echo "Cleaning build artifacts..."
-rm -rf target/
-rm -rf .anchor/
-rm -f dev.sqlite dev.sqlite-wal dev.sqlite-shm
-rm -f test.sqlite test.sqlite-wal test.sqlite-shm
-rm -rf logs/
-rm -rf .pids/
@echo "Cleaning ARX keys and trusted dealer..."
-rm -rf arx-keys/
@echo "Cleaning Docker volumes..."
-docker compose down -v 2>/dev/null || true
@echo "Clean complete."