Some checks failed
Unreal Engine Build / macos-build (push) Failing after 10m36s
152 lines
5.8 KiB
YAML
152 lines
5.8 KiB
YAML
name: Unreal Engine Build
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches: [main, develop]
|
|
|
|
jobs:
|
|
# windows-build:
|
|
# runs-on: windows
|
|
# steps:
|
|
# - name: Checkout repository
|
|
# uses: actions/checkout@v3
|
|
# with:
|
|
# lfs: true
|
|
# fetch-depth: 0
|
|
|
|
# - name: Setup Unreal Engine
|
|
# run: |
|
|
# # Ensure Unreal Engine is installed and set up
|
|
# # This assumes you have Unreal Engine installed on your runner
|
|
# # If not, you can add installation steps here
|
|
|
|
# # Set environment variables for Unreal Engine
|
|
# echo "UE_ROOT=C:\Program Files\Epic Games\UE_5.2" >> $GITHUB_ENV
|
|
|
|
# - name: Build Unreal Project
|
|
# run: |
|
|
# # Find your .uproject file (adjust path as needed)
|
|
# $UPROJECT_PATH = Get-ChildItem -Path . -Filter "*.uproject" -Recurse | Select-Object -First 1 -ExpandProperty FullName
|
|
# Write-Host "Building project: $UPROJECT_PATH"
|
|
|
|
# # Use Unreal Automation Tool to build the project
|
|
# & "$env:UE_ROOT\Engine\Build\BatchFiles\RunUAT.bat" BuildCookRun `
|
|
# -project="$UPROJECT_PATH" `
|
|
# -noP4 `
|
|
# -platform=Win64 `
|
|
# -clientconfig=Development `
|
|
# -cook -build -stage -pak -archive `
|
|
# -archivedirectory="$PWD\Build"
|
|
|
|
# - name: Upload build artifacts
|
|
# uses: actions/upload-artifact@v3
|
|
# with:
|
|
# name: windows-build
|
|
# path: Build/
|
|
# retention-days: 7
|
|
|
|
macos-build:
|
|
runs-on: macos
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v3
|
|
with:
|
|
lfs: true
|
|
fetch-depth: 0
|
|
|
|
- name: Setup Unreal Engine
|
|
timeout-minutes: 5 # Add timeout to prevent hanging
|
|
run: |
|
|
# Set environment variable with the correct Engine path
|
|
UE_PATH="/Users/Shared/Epic Games/UE_5.5"
|
|
echo "UE_ROOT=$UE_PATH/Engine" >> $GITHUB_ENV
|
|
echo "Using Unreal Engine path: $UE_PATH"
|
|
|
|
# Prepare MuJoCo dummy library in local project
|
|
echo "Creating local MuJoCo library..."
|
|
PROJECT_MUJOCO_DIR="Plugins/LuckyMujoco/Source/ThirdParty/Mujoco/lib"
|
|
mkdir -p "$PROJECT_MUJOCO_DIR"
|
|
PROJECT_MUJOCO_PATH="$PROJECT_MUJOCO_DIR/mujoco.dylib"
|
|
|
|
echo "/* Dummy MuJoCo library */" > "$PROJECT_MUJOCO_PATH"
|
|
chmod +x "$PROJECT_MUJOCO_PATH"
|
|
echo "Created local MuJoCo library at: $(pwd)/$PROJECT_MUJOCO_PATH"
|
|
ls -la "$PROJECT_MUJOCO_PATH"
|
|
|
|
# Create fallback in /tmp (which we should have access to)
|
|
echo "Creating fallback library in /tmp..."
|
|
echo "/* Dummy MuJoCo library */" > /tmp/mujoco.dylib
|
|
chmod +x /tmp/mujoco.dylib
|
|
echo "Created fallback MuJoCo library at: /tmp/mujoco.dylib"
|
|
ls -la /tmp/mujoco.dylib
|
|
|
|
# Set environment variables for the build process
|
|
echo "DYLD_LIBRARY_PATH=/tmp:$(pwd)/$PROJECT_MUJOCO_DIR:$DYLD_LIBRARY_PATH" >> $GITHUB_ENV
|
|
echo "LD_LIBRARY_PATH=/tmp:$(pwd)/$PROJECT_MUJOCO_DIR:$LD_LIBRARY_PATH" >> $GITHUB_ENV
|
|
echo "Environment variables set for library paths"
|
|
|
|
- name: Build Unreal Project
|
|
run: |
|
|
# Debug information
|
|
echo "=== Environment Information ==="
|
|
echo "macOS Version:"
|
|
sw_vers
|
|
echo "Current working directory: $(pwd)"
|
|
echo "DYLD_LIBRARY_PATH: $DYLD_LIBRARY_PATH"
|
|
echo "LD_LIBRARY_PATH: $LD_LIBRARY_PATH"
|
|
|
|
# Find the project file
|
|
UPROJECT_PATH=$(find . -name "*.uproject" -type f | head -1)
|
|
if [ -z "$UPROJECT_PATH" ]; then
|
|
echo "Error: Could not find .uproject file"
|
|
exit 1
|
|
fi
|
|
|
|
# Get absolute path
|
|
UPROJECT_ABSOLUTE_PATH=$(realpath "$UPROJECT_PATH")
|
|
echo "Project path: $UPROJECT_ABSOLUTE_PATH"
|
|
|
|
# Ensure the MuJoCo library is in place
|
|
PROJECT_MUJOCO_DIR="Plugins/LuckyMujoco/Source/ThirdParty/Mujoco/lib"
|
|
PROJECT_MUJOCO_PATH="$PROJECT_MUJOCO_DIR/mujoco.dylib"
|
|
|
|
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
|
|
|
|
echo "Available libraries:"
|
|
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
|
|
export DYLD_LIBRARY_PATH="/tmp:$(pwd)/$PROJECT_MUJOCO_DIR:$DYLD_LIBRARY_PATH"
|
|
export LD_LIBRARY_PATH="/tmp:$(pwd)/$PROJECT_MUJOCO_DIR:$LD_LIBRARY_PATH"
|
|
|
|
echo "=== Starting build process ==="
|
|
# Run the build with all environment variables set
|
|
"$UE_ROOT/Build/BatchFiles/RunUAT.sh" BuildCookRun \
|
|
-project="$UPROJECT_ABSOLUTE_PATH" \
|
|
-noP4 \
|
|
-platform=Mac \
|
|
-clientconfig=Development \
|
|
-cook -build -stage -pak -archive \
|
|
-archivedirectory="$(pwd)/Build" || {
|
|
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
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: macos-build
|
|
path: Build/
|
|
retention-days: 7
|