Add Quake3Arena plugin with bot AI, procedural generation, and CI/CD

Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2025-12-24 13:12:15 +00:00
parent fb29d11ce9
commit 10eee4fbb8
17 changed files with 1395 additions and 0 deletions

60
.github/workflows/procedural-tests.yml vendored Normal file
View File

@@ -0,0 +1,60 @@
name: Procedural Generation Tests
on:
push:
branches: [ main, develop ]
paths:
- 'Tools/ProceduralGeneration/**'
- '.github/workflows/procedural-tests.yml'
pull_request:
branches: [ main, develop ]
paths:
- 'Tools/ProceduralGeneration/**'
- '.github/workflows/procedural-tests.yml'
jobs:
test-procedural-generation:
name: Test Python Procedural Generators
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies
run: |
cd Tools/ProceduralGeneration
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run unit tests
run: |
cd Tools/ProceduralGeneration
python -m pytest test_arena_generator.py -v --tb=short
- name: Run arena generator
run: |
cd Tools/ProceduralGeneration
python arena_generator.py
- name: Verify output
run: |
cd Tools/ProceduralGeneration
if [ ! -f arena_geometry.json ]; then
echo "Error: arena_geometry.json was not generated"
exit 1
fi
echo "Arena geometry generated successfully"
ls -lh arena_geometry.json
- name: Upload arena geometry artifact
uses: actions/upload-artifact@v4
with:
name: arena-geometry
path: Tools/ProceduralGeneration/arena_geometry.json
retention-days: 30

102
.github/workflows/unreal-ci.yml vendored Normal file
View File

@@ -0,0 +1,102 @@
name: Unreal Engine CI
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]
jobs:
validate-project:
name: Validate Unreal Project
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Check project structure
run: |
echo "Checking Unreal Engine project structure..."
# Check for required files
if [ ! -f "Unreal3Arena.uproject" ]; then
echo "Error: Unreal3Arena.uproject not found"
exit 1
fi
# Check for plugin structure
if [ ! -d "Plugins/GameFeatures/Quake3Arena" ]; then
echo "Error: Quake3Arena plugin not found"
exit 1
fi
if [ ! -f "Plugins/GameFeatures/Quake3Arena/Quake3Arena.uplugin" ]; then
echo "Error: Quake3Arena.uplugin not found"
exit 1
fi
echo "✓ Project structure is valid"
- name: Validate JSON files
run: |
echo "Validating JSON files..."
# Validate .uproject file
if ! python3 -m json.tool Unreal3Arena.uproject > /dev/null; then
echo "Error: Invalid JSON in Unreal3Arena.uproject"
exit 1
fi
# Validate plugin files
for plugin in Plugins/GameFeatures/*/*.uplugin; do
if [ -f "$plugin" ]; then
if ! python3 -m json.tool "$plugin" > /dev/null; then
echo "Error: Invalid JSON in $plugin"
exit 1
fi
echo "✓ Valid: $plugin"
fi
done
echo "✓ All JSON files are valid"
- name: Check C++ source files
run: |
echo "Checking C++ source files..."
cpp_files=$(find Plugins/GameFeatures/Quake3Arena/Source -name "*.cpp" -o -name "*.h" | wc -l)
echo "Found $cpp_files C++ source files"
if [ $cpp_files -eq 0 ]; then
echo "Warning: No C++ source files found"
else
echo "✓ C++ source files present"
fi
- name: Summary
run: |
echo "==================================="
echo "Project Validation Summary"
echo "==================================="
echo "✓ Project structure valid"
echo "✓ JSON files valid"
echo "✓ Plugin structure valid"
echo "==================================="
# Note: Full UE5 build requires Windows with UE5 installed
# This is a placeholder for when you have a self-hosted runner
# build-windows:
# name: Build Unreal Project (Windows)
# runs-on: windows-latest # Or self-hosted with UE5
# needs: validate-project
#
# steps:
# - name: Checkout repository
# uses: actions/checkout@v4
#
# - name: Build Unreal Project
# run: |
# # This requires UE5 to be installed
# # Example command (adjust paths as needed):
# # "C:\Program Files\Epic Games\UE_5.7\Engine\Build\BatchFiles\RunUAT.bat" BuildCookRun -project="%cd%\Unreal3Arena.uproject" -noP4 -platform=Win64 -clientconfig=Development -cook -build -stage -pak -archive