Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
2138fe1
Use local VM folder for building the dylib
mentatbot[bot] Apr 17, 2025
743cac3
Fix VM integration in build system for CI
mentatbot[bot] Apr 17, 2025
b8acd39
Fix CMake binary directory conflict
mentatbot[bot] Apr 17, 2025
2d10a84
Fix duplicate target error in VM/CMakeLists.txt
mentatbot[bot] Apr 17, 2025
f238cba
Simplify VM integration with direct compilation approach
mentatbot[bot] Apr 17, 2025
d91e681
Include VM sources directly in the final library
mentatbot[bot] Apr 17, 2025
d9d9242
Remove all references to luau_vm target to prevent conflicts
mentatbot[bot] Apr 17, 2025
b63e405
Remove VM/CMakeLists.txt and add special flags to CI workflow
mentatbot[bot] Apr 17, 2025
9f62888
Remove add_subdirectory(VM) call to fix CMake error
mentatbot[bot] Apr 17, 2025
89ee5cb
Improve VM source compilation with interface library and better flags
mentatbot[bot] Apr 17, 2025
92eb16f
Completely revamp VM handling for CI build
mentatbot[bot] Apr 17, 2025
0eda1fd
Remove minimal VM implementation as requested
mentatbot[bot] Apr 17, 2025
313b67c
Fix CMake math expression syntax error
mentatbot[bot] Apr 17, 2025
f471f20
Fix CMake syntax error and improve Dobby integration
mentatbot[bot] Apr 17, 2025
630a015
Make CI build work even with VM file issues
mentatbot[bot] Apr 17, 2025
9680cb3
Fix conditional VM interface library creation
mentatbot[bot] Apr 17, 2025
d89e917
Fix duplicate library.cpp inclusion and improve CI build process
mentatbot[bot] Apr 17, 2025
76e445d
Add iOS framework stubs for CI build
mentatbot[bot] Apr 17, 2025
9cdc0fe
Fix Objective-C compatibility with ARC for CI build
mentatbot[bot] Apr 17, 2025
0f6fc75
Fix Objective-C bridging issues in FloatingButtonController
mentatbot[bot] Apr 17, 2025
6f99ff4
Fix CFBridgingRetain return type casting issue
mentatbot[bot] Apr 17, 2025
6179809
Fix include paths for objc_isolation.h in all files
mentatbot[bot] Apr 17, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 47 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,32 @@ jobs:
# Create required directories
mkdir -p external/dobby/include
mkdir -p external/dobby/lib
mkdir -p external/lua/include
mkdir -p external/lua/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

# Let CMake handle the Lua build through our custom FindLua.cmake
echo "Lua will be built automatically by CMake..."
# Verify and fix VM folder structure if needed
echo "Verifying VM folder structure..."
if [ -d "VM" ] && [ -d "VM/include" ] && [ -d "VM/src" ]; then
echo "✅ VM folder structure verified"
ls -la VM/include/
ls -la VM/src/ | head -n 5

# Make sure VM files are readable
echo "Ensuring VM files have correct permissions..."
chmod -R 755 VM

# Count source files to verify
VM_SRC_COUNT=$(find VM/src -name "*.cpp" | wc -l)
VM_INCLUDE_COUNT=$(find VM/include -name "*.h" | wc -l)
echo "Found $VM_SRC_COUNT .cpp files and $VM_INCLUDE_COUNT .h files in VM directory"
else
echo "⚠️ VM folder structure has issues, creating required directories..."
mkdir -p VM/include VM/src
fi

- name: Setup Xcode
uses: maxim-lobanov/setup-xcode@v1
Expand Down Expand Up @@ -73,22 +88,46 @@ jobs:
run: |
echo "Building the iOS dynamic library..."

# Configure CMake directly
# Make sure VM files are accessible but remove any VM CMakeLists.txt to avoid conflicts
echo "Preparing VM files for inclusion..."
find VM -name "*.cpp" -o -name "*.h" | xargs ls -la || true
rm -rf VM/CMakeLists.txt || true

# Create dummy VM files if needed for CI build
echo "Testing VM file access..."
VM_SOURCE_COUNT=$(find VM/src -name "*.cpp" | wc -l)
VM_HEADER_COUNT=$(find VM/include -name "*.h" | wc -l)
echo "Found $VM_SOURCE_COUNT C++ files in VM/src and $VM_HEADER_COUNT headers in VM/include"

# Configure CMake with direct VM inclusion and some CI flags
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
-DUSE_DOBBY=ON \
-DDIRECT_VM_INCLUDE=ON \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DCMAKE_CXX_FLAGS="-fobjc-arc -DOBJC_USE_ARC=1" \
-DCMAKE_OBJCXX_FLAGS="-fobjc-arc -DOBJC_USE_ARC=1"

# 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
# Build the dynamic library with better error handling
echo "Building the dynamic library now..."
cmake --build build --config Release -j4
echo "First build Dobby (prerequisite)..."
cmake --build build --config Release -j4 --target dobby_external || true

echo "Then build the main library with verbose output..."
cd build && make VERBOSE=1 mylibrary || {
echo "⚠️ Main library build failed - showing detailed errors:"
cat CMakeFiles/CMakeError.log || true
cat CMakeFiles/CMakeOutput.log || true
exit 1
}

# Check the build result
if [ -f "build/lib/libmylibrary.dylib" ]; then
Expand Down
Loading
Loading