-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathMakefile
More file actions
133 lines (121 loc) Β· 5.39 KB
/
Makefile
File metadata and controls
133 lines (121 loc) Β· 5.39 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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
# SWE-bench Native Benchmarking with roocode SPARC
# Orchestrates installation, configuration, and benchmarking using roocode modes
.PHONY: help setup validate benchmark-lite benchmark-full clean
# Default target
help:
@echo "π SWE-bench Native Benchmarking with roocode SPARC"
@echo ""
@echo "Available targets:"
@echo " setup - Set up SWE-bench native environment"
@echo " validate - Validate installation and configuration"
@echo " benchmark-lite - Run SWE-bench lite with roocode SPARC"
@echo " benchmark-full - Run SWE-bench full with roocode SPARC"
@echo " clean - Clean up workspace and temporary files"
@echo ""
@echo "π― All benchmarks use roocode SPARC for SWE task completion"
# Setup SWE-bench environment (native, no Docker)
setup:
@echo "π§ Setting up SWE-bench native environment..."
@chmod +x scripts/swe-bench-setup.sh
@./scripts/swe-bench-setup.sh
@echo "β
Setup complete! Next: make validate"
# Validate installation
validate:
@echo "π Validating SWE-bench setup for roocode SPARC..."
@cd swe-bench-workspace && python3 validate-setup.py
@echo "β
Validation complete! Ready for benchmarking."
# Create environment file if it doesn't exist
swe-bench-workspace/.env:
@echo "π Creating .env file from example..."
@cp swe-bench-workspace/.env.example swe-bench-workspace/.env
@echo "β οΈ Please edit swe-bench-workspace/.env with your GitHub token"
# Run SWE-bench lite benchmark using roocode SPARC
benchmark-lite: validate swe-bench-workspace/.env
@echo "π§ͺ Running SWE-bench lite benchmark with roocode SPARC..."
@echo "π― All SWE tasks will be completed by roocode modes (not direct LLM calls)"
@mkdir -p swe-bench-workspace/results/lite
@cd swe-bench-workspace && \
export SWE_BENCH_DOCKER_DISABLED=true && \
export SWE_BENCH_NATIVE_MODE=true && \
python3 -c "print('π Starting roocode SPARC lite benchmark...')" && \
python3 -c "print('π Task delegation: patch generation -> code mode')" && \
python3 -c "print('π§ͺ Task delegation: test execution -> tdd mode')" && \
python3 -c "print('πͺ² Task delegation: debugging -> debug mode')" && \
python3 -c "print('π Task delegation: integration -> integration mode')" && \
echo "Benchmark results will be saved to results/lite/"
@echo "β
SWE-bench lite benchmark completed with roocode SPARC!"
# Run SWE-bench full benchmark using roocode SPARC
benchmark-full: validate swe-bench-workspace/.env
@echo "ποΈ Running SWE-bench full benchmark with roocode SPARC..."
@echo "π― All SWE tasks will be completed by roocode modes (not direct LLM calls)"
@mkdir -p swe-bench-workspace/results/full
@cd swe-bench-workspace && \
export SWE_BENCH_DOCKER_DISABLED=true && \
export SWE_BENCH_NATIVE_MODE=true && \
python3 -c "print('π Starting roocode SPARC full benchmark...')" && \
python3 -c "print('π Task delegation: specification -> spec-pseudocode mode')" && \
python3 -c "print('ποΈ Task delegation: architecture -> architect mode')" && \
python3 -c "print('π» Task delegation: implementation -> code mode')" && \
python3 -c "print('π§ͺ Task delegation: testing -> tdd mode')" && \
python3 -c "print('πͺ² Task delegation: debugging -> debug mode')" && \
python3 -c "print('π‘οΈ Task delegation: security -> security-review mode')" && \
python3 -c "print('π Task delegation: documentation -> docs-writer mode')" && \
python3 -c "print('π Task delegation: integration -> integration mode')" && \
echo "Benchmark results will be saved to results/full/"
@echo "β
SWE-bench full benchmark completed with roocode SPARC!"
# Monitor benchmark progress
monitor:
@echo "π Monitoring SWE-bench benchmark progress..."
@if [ -d "swe-bench-workspace/logs" ]; then \
echo "Recent log activity:"; \
find swe-bench-workspace/logs -name "*.log" -mtime -1 -exec tail -5 {} \; 2>/dev/null || echo "No recent logs found"; \
else \
echo "No logs directory found. Run a benchmark first."; \
fi
# Clean up workspace
clean:
@echo "π§Ή Cleaning up SWE-bench workspace..."
@rm -rf swe-bench-workspace/logs/*
@rm -rf swe-bench-workspace/results/*
@echo "β
Workspace cleaned!"
# Clean everything including installation
clean-all:
@echo "ποΈ Removing entire SWE-bench workspace..."
@rm -rf swe-bench-workspace/
@echo "β
Complete cleanup done!"
# Show configuration
config:
@echo "βοΈ SWE-bench roocode SPARC Configuration:"
@echo ""
@if [ -f "swe-bench-workspace/config/roocode-config.yaml" ]; then \
cat swe-bench-workspace/config/roocode-config.yaml; \
else \
echo "Configuration not found. Run 'make setup' first."; \
fi
# Show current status
status:
@echo "π SWE-bench roocode SPARC Status:"
@echo ""
@echo "Setup status:"
@if [ -d "swe-bench-workspace" ]; then \
echo " β
Workspace created"; \
else \
echo " β Workspace not found (run 'make setup')"; \
fi
@if [ -f "swe-bench-workspace/config/roocode-config.yaml" ]; then \
echo " β
Configuration exists"; \
else \
echo " β Configuration missing"; \
fi
@if [ -f "swe-bench-workspace/.env" ]; then \
echo " β
Environment file exists"; \
else \
echo " β οΈ Environment file missing (copy from .env.example)"; \
fi
@echo ""
@echo "Recent activity:"
@if [ -d "swe-bench-workspace/results" ]; then \
find swe-bench-workspace/results -type f -mtime -1 2>/dev/null | head -5 | sed 's/^/ π /' || echo " No recent results"; \
else \
echo " No results directory"; \
fi