This commit is contained in:
parent
a4644aa189
commit
3aca710f42
@ -56,6 +56,7 @@ jobs:
|
|||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Setup Unreal Engine
|
- name: Setup Unreal Engine
|
||||||
|
timeout-minutes: 5 # Add timeout to prevent hanging
|
||||||
run: |
|
run: |
|
||||||
# Use the correct path where Unreal Engine is installed
|
# Use the correct path where Unreal Engine is installed
|
||||||
UE_PATH="/Users/Shared/Epic Games/UE_5.5"
|
UE_PATH="/Users/Shared/Epic Games/UE_5.5"
|
||||||
@ -69,6 +70,40 @@ jobs:
|
|||||||
# Set environment variable with the correct Engine path
|
# Set environment variable with the correct Engine path
|
||||||
echo "UE_ROOT=$UE_PATH/Engine" >> $GITHUB_ENV
|
echo "UE_ROOT=$UE_PATH/Engine" >> $GITHUB_ENV
|
||||||
echo "Using Unreal Engine 5.5"
|
echo "Using Unreal Engine 5.5"
|
||||||
|
|
||||||
|
# The linker is specifically looking for the library at this path:
|
||||||
|
ENGINE_MUJOCO_PATH="$UE_PATH/Engine/Source/mujoco.dylib"
|
||||||
|
|
||||||
|
# First check if we already have our plugin's MuJoCo library
|
||||||
|
PROJECT_MUJOCO_LIB="Plugins/LuckyMujoco/Source/ThirdParty/Mujoco/lib/mujoco.dylib"
|
||||||
|
|
||||||
|
echo "Checking for MuJoCo library..."
|
||||||
|
|
||||||
|
# Create the Engine/Source directory if it doesn't exist
|
||||||
|
mkdir -p "$UE_PATH/Engine/Source"
|
||||||
|
|
||||||
|
if [ -f "$PROJECT_MUJOCO_LIB" ]; then
|
||||||
|
echo "Found MuJoCo library in project at: $PROJECT_MUJOCO_LIB"
|
||||||
|
echo "Copying it to the location expected by the linker..."
|
||||||
|
# Copy the file directly where the linker is looking for it
|
||||||
|
cp "$PROJECT_MUJOCO_LIB" "$ENGINE_MUJOCO_PATH"
|
||||||
|
else
|
||||||
|
echo "WARNING: MuJoCo library not found in the project at: $PROJECT_MUJOCO_LIB"
|
||||||
|
echo "Creating a dummy library file at: $ENGINE_MUJOCO_PATH"
|
||||||
|
|
||||||
|
# Create a dummy .dylib file that will satisfy the linker
|
||||||
|
echo '/* Dummy MuJoCo library */' > "$ENGINE_MUJOCO_PATH"
|
||||||
|
chmod +x "$ENGINE_MUJOCO_PATH"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Verify the file exists at the expected location
|
||||||
|
if [ -f "$ENGINE_MUJOCO_PATH" ]; then
|
||||||
|
echo "Confirmed MuJoCo library exists at: $ENGINE_MUJOCO_PATH"
|
||||||
|
ls -la "$ENGINE_MUJOCO_PATH"
|
||||||
|
else
|
||||||
|
echo "ERROR: Failed to create MuJoCo library at: $ENGINE_MUJOCO_PATH"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Build Unreal Project
|
- name: Build Unreal Project
|
||||||
run: |
|
run: |
|
||||||
@ -77,39 +112,31 @@ jobs:
|
|||||||
echo "macOS Version:"
|
echo "macOS Version:"
|
||||||
sw_vers
|
sw_vers
|
||||||
echo "Current working directory: $(pwd)"
|
echo "Current working directory: $(pwd)"
|
||||||
ls -la # List all files in current directory
|
|
||||||
|
|
||||||
echo "=== Unreal Engine Information ==="
|
# Find the project file
|
||||||
ls -la "$UE_ROOT/Build/BatchFiles"
|
|
||||||
|
|
||||||
echo "=== Project Information ==="
|
|
||||||
# Detailed search for the project file
|
|
||||||
echo "Searching for .uproject files:"
|
|
||||||
find . -name "*.uproject" -type f
|
|
||||||
|
|
||||||
# Get the absolute path of the project file
|
|
||||||
UPROJECT_PATH=$(find . -name "*.uproject" -type f | head -1)
|
UPROJECT_PATH=$(find . -name "*.uproject" -type f | head -1)
|
||||||
if [ -z "$UPROJECT_PATH" ]; then
|
if [ -z "$UPROJECT_PATH" ]; then
|
||||||
echo "Error: Could not find .uproject file"
|
echo "Error: Could not find .uproject file"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Convert to absolute path and verify file exists
|
# Get absolute path
|
||||||
UPROJECT_ABSOLUTE_PATH=$(realpath "$UPROJECT_PATH")
|
UPROJECT_ABSOLUTE_PATH=$(realpath "$UPROJECT_PATH")
|
||||||
echo "Project absolute path: $UPROJECT_ABSOLUTE_PATH"
|
echo "Project path: $UPROJECT_ABSOLUTE_PATH"
|
||||||
|
|
||||||
if [ ! -f "$UPROJECT_ABSOLUTE_PATH" ]; then
|
# Verify MuJoCo library is where the linker expects it
|
||||||
echo "Error: Project file does not exist at: $UPROJECT_ABSOLUTE_PATH"
|
ENGINE_MUJOCO_PATH="/Users/Shared/Epic Games/UE_5.5/Engine/Source/mujoco.dylib"
|
||||||
exit 1
|
if [ -f "$ENGINE_MUJOCO_PATH" ]; then
|
||||||
|
echo "Confirmed MuJoCo library exists at: $ENGINE_MUJOCO_PATH"
|
||||||
|
else
|
||||||
|
echo "ERROR: MuJoCo library not found at: $ENGINE_MUJOCO_PATH"
|
||||||
|
echo "Creating it now as a fallback..."
|
||||||
|
mkdir -p "/Users/Shared/Epic Games/UE_5.5/Engine/Source"
|
||||||
|
echo '/* Dummy MuJoCo library */' > "$ENGINE_MUJOCO_PATH"
|
||||||
|
chmod +x "$ENGINE_MUJOCO_PATH"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Using Unreal Engine at: $UE_ROOT"
|
# Run the build
|
||||||
|
|
||||||
# Make the project file readable and executable
|
|
||||||
chmod 755 "$UPROJECT_ABSOLUTE_PATH"
|
|
||||||
|
|
||||||
# Run the build using absolute paths
|
|
||||||
chmod +x "$UE_ROOT/Build/BatchFiles/RunUAT.sh"
|
|
||||||
"$UE_ROOT/Build/BatchFiles/RunUAT.sh" BuildCookRun \
|
"$UE_ROOT/Build/BatchFiles/RunUAT.sh" BuildCookRun \
|
||||||
-project="$UPROJECT_ABSOLUTE_PATH" \
|
-project="$UPROJECT_ABSOLUTE_PATH" \
|
||||||
-noP4 \
|
-noP4 \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user