Update actions workflow
All checks were successful
Unreal Engine Build / macos-build (push) Successful in 2h22m58s
All checks were successful
Unreal Engine Build / macos-build (push) Successful in 2h22m58s
This commit is contained in:
parent
02985f5928
commit
1d415c00ed
@ -56,91 +56,20 @@ 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: |
|
||||||
# Set environment variable with the correct Engine path
|
# 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"
|
||||||
echo "UE_ROOT=$UE_PATH/Engine" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
echo "UE_PATH=$UE_PATH" >> $GITHUB_ENV
|
|
||||||
source $GITHUB_ENV
|
|
||||||
|
|
||||||
echo "Unreal Engine paths:"
|
if [ ! -d "$UE_PATH" ]; then
|
||||||
echo "UE_ROOT=$UE_ROOT"
|
echo "Error: Unreal Engine is not installed in the expected location"
|
||||||
echo "UE_PATH=$UE_PATH"
|
echo "Please ensure Unreal Engine is installed at $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
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Make sure the library is executable
|
# Set environment variable with the correct Engine path
|
||||||
chmod +x "$MUJOCO_LIB_DIR/mujoco.dylib"
|
echo "UE_ROOT=$UE_PATH/Engine" >> $GITHUB_ENV
|
||||||
|
echo "Using Unreal Engine 5.5"
|
||||||
# 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
|
- name: Build Unreal Project
|
||||||
run: |
|
run: |
|
||||||
# Debug information
|
# Debug information
|
||||||
@ -148,83 +77,51 @@ jobs:
|
|||||||
echo "macOS Version:"
|
echo "macOS Version:"
|
||||||
sw_vers
|
sw_vers
|
||||||
echo "Current working directory: $(pwd)"
|
echo "Current working directory: $(pwd)"
|
||||||
echo "DYLD_LIBRARY_PATH: $DYLD_LIBRARY_PATH"
|
ls -la # List all files in current directory
|
||||||
echo "LD_LIBRARY_PATH: $LD_LIBRARY_PATH"
|
|
||||||
|
|
||||||
# Find the project file
|
echo "=== Unreal Engine Information ==="
|
||||||
|
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
|
||||||
|
|
||||||
# Get absolute path
|
# Convert to absolute path and verify file exists
|
||||||
UPROJECT_ABSOLUTE_PATH=$(realpath "$UPROJECT_PATH")
|
UPROJECT_ABSOLUTE_PATH=$(realpath "$UPROJECT_PATH")
|
||||||
echo "Project path: $UPROJECT_ABSOLUTE_PATH"
|
echo "Project absolute path: $UPROJECT_ABSOLUTE_PATH"
|
||||||
|
|
||||||
# Ensure the MuJoCo library is in place
|
if [ ! -f "$UPROJECT_ABSOLUTE_PATH" ]; then
|
||||||
PROJECT_MUJOCO_DIR="Plugins/LuckyMujoco/Source/ThirdParty/Mujoco/lib"
|
echo "Error: Project file does not exist at: $UPROJECT_ABSOLUTE_PATH"
|
||||||
PROJECT_MUJOCO_PATH="$PROJECT_MUJOCO_DIR/mujoco.dylib"
|
exit 1
|
||||||
|
|
||||||
if [ ! -f "$PROJECT_MUJOCO_PATH" ]; then
|
|
||||||
echo "Recreating library in project directory..."
|
|
||||||
mkdir -p "$PROJECT_MUJOCO_DIR"
|
|
||||||
echo "/* Dummy MuJoCo library */" > "$PROJECT_MUJOCO_PATH"
|
|
||||||
chmod +x "$PROJECT_MUJOCO_PATH"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Available libraries:"
|
echo "Using Unreal Engine at: $UE_ROOT"
|
||||||
ls -la "$PROJECT_MUJOCO_DIR"
|
|
||||||
ls -la /tmp/mujoco.dylib 2>/dev/null || echo "No library in /tmp"
|
|
||||||
|
|
||||||
# Set up environment explicitly for this command
|
# Make the project file readable and executable
|
||||||
export DYLD_LIBRARY_PATH="/tmp:$(pwd)/$PROJECT_MUJOCO_DIR:$DYLD_LIBRARY_PATH"
|
chmod 755 "$UPROJECT_ABSOLUTE_PATH"
|
||||||
export LD_LIBRARY_PATH="/tmp:$(pwd)/$PROJECT_MUJOCO_DIR:$LD_LIBRARY_PATH"
|
|
||||||
|
|
||||||
|
|
||||||
# Run the build using absolute paths
|
# Run the build using absolute paths
|
||||||
chmod +x "$UE_ROOT/Build/BatchFiles/RunUAT.sh"
|
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 \
|
"$UE_ROOT/Build/BatchFiles/RunUAT.sh" BuildCookRun \
|
||||||
-project="$UPROJECT_ABSOLUTE_PATH" \
|
-project="$UPROJECT_ABSOLUTE_PATH" \
|
||||||
-noP4 \
|
-noP4 \
|
||||||
-platform=Mac \
|
-platform=Mac \
|
||||||
-clientconfig=Development \
|
-clientconfig=Development \
|
||||||
|
-serverconfig=Shipping \
|
||||||
-cook -build -stage -pak -archive \
|
-cook -build -stage -pak -archive \
|
||||||
-archivedirectory="$(pwd)/Build" || {
|
-archivedirectory="$(pwd)/Builds"
|
||||||
echo "Build failed with status: $?"
|
|
||||||
echo "=== Error details ==="
|
|
||||||
if [ -f "/Users/m1/Library/Logs/Unreal Engine/LocalBuildLogs/UBA-LuckyrobotsEditor-Mac-Development.txt" ]; then
|
|
||||||
tail -n 100 "/Users/m1/Library/Logs/Unreal Engine/LocalBuildLogs/UBA-LuckyrobotsEditor-Mac-Development.txt"
|
|
||||||
fi
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
- name: Upload build artifacts
|
- name: Upload build artifacts
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: macos-build
|
name: macos-build
|
||||||
path: Build/
|
path: Builds/
|
||||||
retention-days: 7
|
retention-days: 7
|
||||||
|
Loading…
x
Reference in New Issue
Block a user