Skip to content

Clean up codebase and fix Lua/Luau integration #14

Clean up codebase and fix Lua/Luau integration

Clean up codebase and fix Lua/Luau integration #14

Workflow file for this run

name: Build Roblox Executor iOS Dynamic Library
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
jobs:
build:
runs-on: macos-latest # Use macOS for iOS compatible builds
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install dependencies
run: |
echo "Installing dependencies..."
# Install essential build tools
brew install cmake pkg-config
# Create required directories
mkdir -p external/dobby/include
mkdir -p external/dobby/lib
mkdir -p output/Resources/AIData
mkdir -p build
# Remove any CI_BUILD definitions from source files
echo "Removing CI_BUILD definitions from source files..."
find source -type f \( -name "*.h" -o -name "*.hpp" -o -name "*.cpp" -o -name "*.mm" \) | xargs sed -i '' 's/#define CI_BUILD//g' 2>/dev/null || true
- name: Setup Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- name: Install Dobby (Required)
id: install-dobby
run: |
echo "Building Dobby from source (required dependency)..."
git clone --depth=1 https://github.com/jmpews/Dobby.git
cd Dobby
mkdir -p build && cd build
# Configure and build Dobby
cmake .. \
-DCMAKE_BUILD_TYPE=Release \
-DDOBBY_BUILD_SHARED_LIBRARY=OFF \
-DDOBBY_BUILD_STATIC_LIBRARY=ON
cmake --build . --config Release
# Copy Dobby files to expected location
mkdir -p $GITHUB_WORKSPACE/external/dobby/lib
mkdir -p $GITHUB_WORKSPACE/external/dobby/include
cp libdobby.a $GITHUB_WORKSPACE/external/dobby/lib/
cp -r ../include/* $GITHUB_WORKSPACE/external/dobby/include/
echo "Dobby successfully built and installed to external/dobby"
cd $GITHUB_WORKSPACE
- name: Build Dynamic Library
run: |
echo "Building the iOS dynamic library..."
# Configure CMake directly
cmake -S . -B build \
-DCMAKE_OSX_ARCHITECTURES="arm64" \
-DCMAKE_OSX_DEPLOYMENT_TARGET="15.0" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_SYSTEM_NAME=iOS \
-DENABLE_AI_FEATURES=ON \
-DUSE_DOBBY=ON
# Show CMake configuration for debugging
echo "CMake configuration from cache:"
cat build/CMakeCache.txt | grep -E "DOBBY|LUA|FLAGS|MODULE_PATH"
# Build the dynamic library
echo "Building the dynamic library now..."
cmake --build build --config Release -j4
# Check the build result
if [ -f "build/lib/libmylibrary.dylib" ]; then
echo "✅ Successfully built libmylibrary.dylib"
ls -la build/lib/libmylibrary.dylib
# Copy to output directory
mkdir -p output
cp build/lib/libmylibrary.dylib output/
# Copy any resources
if [ -d "Resources" ]; then
mkdir -p output/Resources
cp -r Resources/* output/Resources/ 2>/dev/null || true
fi
# Create config if it doesn't exist
mkdir -p output/Resources/AIData
if [ ! -f "output/Resources/AIData/config.json" ]; then
echo '{"version":"1.0.0","led_effects":true,"ai_features":true,"memory_optimization":true}' > output/Resources/AIData/config.json
fi
echo "== Built files =="
ls -la output/
else
echo "❌ Failed to build libmylibrary.dylib"
echo "== Build directory contents =="
find build -name "*.dylib" -o -name "*.a"
exit 1
fi
- name: Verify Library
run: |
echo "Verifying built dylib..."
if [ -f "output/libmylibrary.dylib" ]; then
echo "✅ libmylibrary.dylib exists"
# Check for exported symbols
echo "Exported symbols:"
nm -g output/libmylibrary.dylib | grep -E "luaopen_|ExecuteScript" || echo "No key symbols found!"
# Check library type
file output/libmylibrary.dylib
# Check library dependencies
otool -L output/libmylibrary.dylib || true
else
echo "❌ libmylibrary.dylib not found in output directory"
exit 1
fi
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: ios-dylib
path: |
output/libmylibrary.dylib
output/Resources/**