Merge branches 'main' and 'main' of ssh://luckyrobots.com:2222/luckyrobots/luckyworld
Some checks failed
Unreal Engine Build / macos-build (push) Failing after 9m35s

This commit is contained in:
Goran Lazarevski 2025-03-24 20:35:38 +01:00
commit 67b10e4790
2 changed files with 116 additions and 3 deletions

View File

@ -4,8 +4,6 @@ on:
workflow_dispatch:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]
jobs:
# windows-build:
@ -70,7 +68,83 @@ jobs:
# Set environment variable with the correct Engine path
echo "UE_ROOT=$UE_PATH/Engine" >> $GITHUB_ENV
echo "Using Unreal Engine 5.5"
echo "UE_PATH=$UE_PATH" >> $GITHUB_ENV
source $GITHUB_ENV
echo "Unreal Engine paths:"
echo "UE_ROOT=$UE_ROOT"
echo "UE_PATH=$UE_PATH"
# Set up MuJoCo library
MUJOCO_LIB_DIR="Plugins/LuckyMujoco/Source/ThirdParty/Mujoco/lib"
mkdir -p "$MUJOCO_LIB_DIR"
# Try to find mujoco.dylib in the repository
if [ -f "Plugins/UEMujoco.rar" ]; then
echo "Found UEMujoco.rar, attempting to extract..."
mkdir -p /tmp/mujoco_extract
unrar x "Plugins/UEMujoco.rar" /tmp/mujoco_extract || echo "Failed to extract UEMujoco.rar"
# Look for mujoco.dylib in extracted files
DYLIB_PATH=$(find /tmp/mujoco_extract -name "mujoco.dylib" | head -1)
if [ -n "$DYLIB_PATH" ]; then
echo "Found mujoco.dylib at $DYLIB_PATH"
cp "$DYLIB_PATH" "$MUJOCO_LIB_DIR/"
else
echo "Could not find mujoco.dylib in extracted files"
fi
fi
# If still no dylib, try to download it
if [ ! -f "$MUJOCO_LIB_DIR/mujoco.dylib" ]; then
echo "Attempting to download mujoco.dylib..."
curl -L -o "$MUJOCO_LIB_DIR/mujoco.dylib" "https://github.com/deepmind/mujoco/releases/download/2.3.7/mujoco-2.3.7-macos-universal2.dmg"
fi
# Verify the library exists
if [ ! -f "$MUJOCO_LIB_DIR/mujoco.dylib" ]; then
echo "ERROR: Failed to set up mujoco.dylib"
exit 1
fi
# Make sure the library is executable
chmod +x "$MUJOCO_LIB_DIR/mujoco.dylib"
# Try multiple locations for the mujoco library
# 1. Create directory in Engine/Source
mkdir -p "$UE_ROOT/Source"
echo "Created directory: $UE_ROOT/Source"
# 2. Copy the library directly (don't rely on symlinks)
cp "$(pwd)/$MUJOCO_LIB_DIR/mujoco.dylib" "$UE_ROOT/Source/"
echo "Copied library to: $UE_ROOT/Source/mujoco.dylib"
# 3. Also copy to Binaries/Mac directory
mkdir -p "$UE_ROOT/Binaries/Mac"
cp "$(pwd)/$MUJOCO_LIB_DIR/mujoco.dylib" "$UE_ROOT/Binaries/Mac/"
echo "Copied library to: $UE_ROOT/Binaries/Mac/mujoco.dylib"
# 4. Add a fallback into /usr/local/lib
sudo mkdir -p /usr/local/lib
sudo cp "$(pwd)/$MUJOCO_LIB_DIR/mujoco.dylib" /usr/local/lib/
echo "Copied library to: /usr/local/lib/mujoco.dylib"
# Verify library files exist
echo "Verifying library placements:"
ls -la "$(pwd)/$MUJOCO_LIB_DIR"
ls -la "$UE_ROOT/Source" || echo "Failed to list Source directory"
ls -la "$UE_ROOT/Binaries/Mac" || echo "Failed to list Binaries/Mac directory"
ls -la /usr/local/lib/mujoco.dylib || echo "Failed to list library in /usr/local/lib"
# Set up environment for the build
export DYLD_LIBRARY_PATH="$(pwd)/Plugins/LuckyMujoco/Source/ThirdParty/Mujoco/lib:$UE_ROOT/Source:$UE_ROOT/Binaries/Mac:/usr/local/lib:$DYLD_LIBRARY_PATH"
export DYLD_FRAMEWORK_PATH="$UE_ROOT/Binaries/Mac:$DYLD_FRAMEWORK_PATH"
export DYLD_FALLBACK_LIBRARY_PATH="$UE_ROOT/Binaries/Mac:$UE_ROOT/Source:/usr/local/lib:$DYLD_FALLBACK_LIBRARY_PATH"
echo "Build environment:"
echo "DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH"
echo "DYLD_FRAMEWORK_PATH=$DYLD_FRAMEWORK_PATH"
echo "DYLD_FALLBACK_LIBRARY_PATH=$DYLD_FALLBACK_LIBRARY_PATH"
- name: Build Unreal Project
run: |
@ -112,6 +186,28 @@ jobs:
# Run the build using absolute paths
chmod +x "$UE_ROOT/Build/BatchFiles/RunUAT.sh"
# Source environment variables again to ensure they are properly set
source $GITHUB_ENV
# Set up runtime environment for the build
export DYLD_LIBRARY_PATH="$(pwd)/Plugins/LuckyMujoco/Source/ThirdParty/Mujoco/lib:$UE_ROOT/Source:$UE_ROOT/Binaries/Mac:/usr/local/lib:$DYLD_LIBRARY_PATH"
export DYLD_FRAMEWORK_PATH="$UE_ROOT/Binaries/Mac:$DYLD_FRAMEWORK_PATH"
export DYLD_FALLBACK_LIBRARY_PATH="$UE_ROOT/Binaries/Mac:$UE_ROOT/Source:/usr/local/lib:$DYLD_FALLBACK_LIBRARY_PATH"
echo "Final build environment:"
echo "UE_ROOT=$UE_ROOT"
echo "UE_PATH=$UE_PATH"
echo "DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH"
echo "Checking for mujoco.dylib in key locations:"
ls -l "$UE_ROOT/Source/mujoco.dylib" || echo "Library not found in $UE_ROOT/Source"
ls -l "$UE_ROOT/Binaries/Mac/mujoco.dylib" || echo "Library not found in $UE_ROOT/Binaries/Mac"
ls -l "/usr/local/lib/mujoco.dylib" || echo "Library not found in /usr/local/lib"
# Run the build with additional debug output
echo "Running build command..."
"$UE_ROOT/Build/BatchFiles/RunUAT.sh" BuildCookRun \
-project="$UPROJECT_ABSOLUTE_PATH" \
-noP4 \

View File

@ -1,3 +1,20 @@
# luckyworld
this is our unreal repository with our complete source code...
steps to pull the source code down and compile
* (Don't download the .zip file. It's best to use the CLI or a visual tool so LFS can install the proper libraries)
* git clone https://luckyrobots.com/luckyrobots/luckyworld.git
* cd luckyworld
* install git lfs
* brew install git-lfs (macOS)
* sudo yum install git-lfs (linux)
* choco install git (windows) or via https://git-scm.com/download/win
* select option to install git-lfs
* git lfs pull (just in case)
* right click .uproject file.
* Generate Visual Studio Project Files (windows)
* Open the generated .sln file with your IDE (i.e. Visual Studio or Rider)
* (The project starts in 5.5 binary version so if you're using source you will need to right click the .uproject and switch your engine version)
* Debug 'luckyrobots'