Remove just tool completely and migrate all functionality to Makefiles (#210)

* Remove just tool completely and migrate all functionality to Makefiles

- Added install-cscope, lint-python, and lint-python-all targets to main Makefile
- Created program-model/Makefile with all justfile functionality
- Removed justfiles from both main and program-model directories
- Updated all documentation to use make commands instead of just
- Removed just installation and checking functions from setup scripts
- All functionality preserved with equivalent make targets

Co-authored-by: Riccardo Schirone <ret2libc@users.noreply.github.com>

* Remove duplicate lint-python targets from Makefile

These targets duplicated existing lint and lint-component targets.
Updated CLAUDE.md to reference the correct make targets.

Co-authored-by: Riccardo Schirone <ret2libc@users.noreply.github.com>

* Fix remaining references to removed lint-python targets in documentation

Co-authored-by: Riccardo Schirone <ret2libc@users.noreply.github.com>

* Fix Makefile: Add missing targets to .PHONY declaration

Added lint, lint-component, clean-local, wait-crs, check-crs,
crs-instance-id, status, and send-integration-task to .PHONY
to ensure they work correctly even if files with those names exist.

Co-authored-by: Riccardo Schirone <ret2libc@users.noreply.github.com>

* ci: remove just references

---------

Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: Riccardo Schirone <ret2libc@users.noreply.github.com>
Co-authored-by: Michael D Brown <michael.brown@trailofbits.com>
This commit is contained in:
Riccardo Schirone
2025-07-31 15:41:02 +02:00
committed by GitHub
parent a08cbf1050
commit 4f41f4de11
12 changed files with 56 additions and 80 deletions
+4 -3
View File
@@ -10,7 +10,8 @@ jobs:
test:
strategy:
matrix:
component: [common, orchestrator, fuzzer, program-model, seed-gen, patcher]
component:
[common, orchestrator, fuzzer, program-model, seed-gen, patcher]
python:
- "3.12"
# TODO: Add integration tests back in
@@ -49,8 +50,8 @@ jobs:
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y codequery just ripgrep git-lfs
just install-cscope
sudo apt-get install -y codequery ripgrep git-lfs
make install-cscope
- name: Prepare environment
run: |
+3 -3
View File
@@ -12,11 +12,11 @@ Buttercup is a Cyber Reasoning System (CRS) developed by Trail of Bits for the A
```bash
# Build specific component (from project root)
just lint-python <component> # Format, lint, and type-check a component
just lint-python-all # Format, lint, and type-check all components
make lint-component COMPONENT=<component> # Format, lint, and type-check a component
make lint # Format, lint, and type-check all components
# Example: lint the patcher component
just lint-python patcher
make lint-component COMPONENT=patcher
```
### Testing
+7 -1
View File
@@ -1,6 +1,6 @@
# Makefile for Trail of Bits AIxCC Finals CRS
.PHONY: help setup-local setup-azure validate deploy deploy-local deploy-azure test undeploy
.PHONY: help setup-local setup-azure validate deploy deploy-local deploy-azure test undeploy install-cscope lint lint-component clean-local wait-crs check-crs crs-instance-id status send-integration-task
# Default target
help:
@@ -23,6 +23,7 @@ help:
@echo " send-integration-task - Run integration-test task"
@echo ""
@echo "Development:"
@echo " install-cscope - Install cscope tool"
@echo " lint - Lint all Python code"
@echo " lint-component - Lint specific component (e.g., make lint-component COMPONENT=orchestrator)"
@echo ""
@@ -156,3 +157,8 @@ clean-local:
@echo "Cleaning up local environment..."
minikube delete || true
rm -f deployment/env
# Additional targets migrated from justfile
install-cscope:
cd external/aixcc-cscope/ && autoreconf -i -s && ./configure && make && sudo make install
+2 -2
View File
@@ -63,8 +63,8 @@ kubectl exec -it -n crs <pod-name> -- /bin/bash
### Development
```bash
# Lint Python code
just lint-python-all
just lint-python <component>
make lint
make lint-component COMPONENT=<component>
# Docker development
docker-compose up -d
+2 -2
View File
@@ -292,10 +292,10 @@ make send-integration-task
```bash
# Lint Python code
just lint-python-all
make lint
# Run specific component tests
just lint-python orchestrator
make lint-component COMPONENT=orchestrator
# Test manually
./orchestrator/scripts/task_upstream_libpng.sh
-13
View File
@@ -1,13 +0,0 @@
install-cscope:
cd external/aixcc-cscope/ && autoreconf -i -s && ./configure && make && sudo make install
lint-python COMPONENT:
cd {{ COMPONENT }} && uv sync --all-extras && uv run ruff format && uv run ruff check --fix && uv run mypy
lint-python-all:
just lint-python common
just lint-python fuzzer
just lint-python orchestrator
just lint-python patcher
just lint-python program-model
just lint-python seed-gen
+37
View File
@@ -0,0 +1,37 @@
# Makefile for program-model component
.PHONY: help all sync reformat lint test
# Default target
help:
@echo "program-model component - Available Commands:"
@echo ""
@echo " all - Run sync, reformat, lint, and test"
@echo " sync - Install dependencies with uv"
@echo " reformat - Format code with ruff"
@echo " lint - Check code formatting, linting, and types"
@echo " test - Run pytest with integration tests"
all: sync reformat lint test
sync:
uv sync --all-extras
reformat:
uv run ruff format
uv run ruff check --fix
lint:
uv run ruff format --check
uv run ruff check
uv run mypy
test:
# To debug
# uv run pytest -svv --log-cli-level=DEBUG --runintegration
# To save unit test results
# PYTEST_DEBUG_TEMPROOT="/crs_scratch/" uv run pytest -svv --runintegration
# To run tests
uv run pytest -svv --runintegration
+1 -1
View File
@@ -10,5 +10,5 @@ Indexes a program's source code to be queried by `seed-gen` and `patcher`.
Sync, reformat, lint, and test before committing changes to this directory.
```shell
just all
make all
```
-23
View File
@@ -1,23 +0,0 @@
all: && sync reformat lint test
sync:
uv sync --all-extras
reformat:
uv run ruff format
uv run ruff check --fix
lint:
uv run ruff format --check
uv run ruff check
uv run mypy
test:
# To debug
# uv run pytest -svv --log-cli-level=DEBUG --runintegration
# To save unit test results
# PYTEST_DEBUG_TEMPROOT="/crs_scratch/" uv run pytest -svv --runintegration
# To run tests
uv run pytest -svv --runintegration
-30
View File
@@ -111,26 +111,6 @@ install_git_lfs() {
fi
}
# Function to install Just
install_just() {
print_status "Installing Just..."
if ! command_exists just; then
if command_exists apt-get; then
sudo apt-get update
sudo apt-get install -y just
elif command_exists yum; then
sudo yum install -y just
elif command_exists brew; then
brew install just
else
print_error "Could not install Just. Please install it manually."
return 1
fi
print_success "Just installed successfully"
else
print_success "Just is already installed"
fi
}
# Function to check Docker
check_docker() {
@@ -209,16 +189,6 @@ check_terraform() {
fi
}
# Function to check Just
check_just() {
print_status "Checking Just..."
if command_exists just; then
print_success "Just is installed"
else
print_error "Just is not installed"
return 1
fi
}
# Function to setup configuration file
setup_config_file() {
-1
View File
@@ -159,7 +159,6 @@ main() {
check_azure_cli
check_terraform
install_just
setup_service_principal
setup_config
setup_remote_state
-1
View File
@@ -53,7 +53,6 @@ main() {
install_helm
install_minikube
install_git_lfs
install_just
setup_config
verify_setup