This commit is contained in:
parent
a4644aa189
commit
38667ff92f
@ -3,7 +3,7 @@ name: Unreal Engine Build
|
|||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
push:
|
push:
|
||||||
branches: [ main, develop ]
|
branches: [main, develop]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
# windows-build:
|
# windows-build:
|
||||||
@ -56,19 +56,40 @@ 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
|
# Set environment variable with the correct Engine path
|
||||||
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
|
||||||
|
|
||||||
if [ ! -d "$UE_PATH" ]; then
|
# Create dummy library at the EXACT path the linker is looking for
|
||||||
echo "Error: Unreal Engine is not installed in the expected location"
|
echo "Creating file at the exact path the linker looks for..."
|
||||||
echo "Please ensure Unreal Engine is installed at $UE_PATH"
|
ENGINE_SOURCE_DIR="$UE_PATH/Engine/Source"
|
||||||
exit 1
|
ENGINE_MUJOCO_PATH="$ENGINE_SOURCE_DIR/mujoco.dylib"
|
||||||
|
|
||||||
|
# Create a dummy file in /tmp first (we have permission there)
|
||||||
|
echo "/* Dummy MuJoCo library */" > /tmp/mujoco.dylib
|
||||||
|
chmod +x /tmp/mujoco.dylib
|
||||||
|
|
||||||
|
# Try to create directories and copy file without sudo
|
||||||
|
mkdir -p "$ENGINE_SOURCE_DIR" 2>/dev/null
|
||||||
|
cp /tmp/mujoco.dylib "$ENGINE_MUJOCO_PATH" 2>/dev/null
|
||||||
|
|
||||||
|
# If that failed, try with sudo but with a timeout to avoid hanging
|
||||||
|
if [ ! -f "$ENGINE_MUJOCO_PATH" ]; then
|
||||||
|
echo "Regular copy failed, will try with sudo (timeout 5s)..."
|
||||||
|
timeout 5s sudo mkdir -p "$ENGINE_SOURCE_DIR" 2>/dev/null
|
||||||
|
timeout 5s sudo cp /tmp/mujoco.dylib "$ENGINE_MUJOCO_PATH" 2>/dev/null
|
||||||
|
timeout 5s sudo chmod +x "$ENGINE_MUJOCO_PATH" 2>/dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Set environment variable with the correct Engine path
|
# Check if we managed to create the file
|
||||||
echo "UE_ROOT=$UE_PATH/Engine" >> $GITHUB_ENV
|
if [ -f "$ENGINE_MUJOCO_PATH" ]; then
|
||||||
echo "Using Unreal Engine 5.5"
|
echo "Successfully created $ENGINE_MUJOCO_PATH"
|
||||||
|
else
|
||||||
|
echo "WARNING: Could not create file at $ENGINE_MUJOCO_PATH"
|
||||||
|
echo "Will try linking alternative using dummy files during build step"
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Build Unreal Project
|
- name: Build Unreal Project
|
||||||
run: |
|
run: |
|
||||||
@ -77,40 +98,64 @@ 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
|
# Check if our file creation in the engine directory worked
|
||||||
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 "Engine MuJoCo library exists at: $ENGINE_MUJOCO_PATH"
|
||||||
|
ls -la "$ENGINE_MUJOCO_PATH"
|
||||||
|
else
|
||||||
|
echo "WARNING: Engine MuJoCo library not found! Setting up fallback..."
|
||||||
|
|
||||||
|
# Ensure local library exists
|
||||||
|
PROJECT_MUJOCO_PATH="Plugins/LuckyMujoco/Source/ThirdParty/Mujoco/lib/mujoco.dylib"
|
||||||
|
mkdir -p "$(dirname "$PROJECT_MUJOCO_PATH")"
|
||||||
|
|
||||||
|
if [ ! -f "$PROJECT_MUJOCO_PATH" ]; then
|
||||||
|
echo "Creating dummy library in project directory..."
|
||||||
|
echo "/* Dummy MuJoCo library */" > "$PROJECT_MUJOCO_PATH"
|
||||||
|
chmod +x "$PROJECT_MUJOCO_PATH"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Using Unreal Engine at: $UE_ROOT"
|
# Create a dummy library in /tmp
|
||||||
|
echo "Creating library in /tmp..."
|
||||||
|
TMP_MUJOCO="/tmp/mujoco.dylib"
|
||||||
|
echo "/* Dummy MuJoCo library */" > "$TMP_MUJOCO"
|
||||||
|
chmod +x "$TMP_MUJOCO"
|
||||||
|
|
||||||
# Make the project file readable and executable
|
# Set up environment variables for alternate library paths
|
||||||
chmod 755 "$UPROJECT_ABSOLUTE_PATH"
|
export DYLD_LIBRARY_PATH="/tmp:$(pwd)/Plugins/LuckyMujoco/Source/ThirdParty/Mujoco/lib:$DYLD_LIBRARY_PATH"
|
||||||
|
export LDFLAGS="-L/tmp -L$(pwd)/Plugins/LuckyMujoco/Source/ThirdParty/Mujoco/lib $LDFLAGS"
|
||||||
|
|
||||||
# Run the build using absolute paths
|
# Create a wrapper clang++ script in /tmp/bin
|
||||||
chmod +x "$UE_ROOT/Build/BatchFiles/RunUAT.sh"
|
echo "Creating compiler wrapper script..."
|
||||||
"$UE_ROOT/Build/BatchFiles/RunUAT.sh" BuildCookRun \
|
mkdir -p /tmp/bin
|
||||||
|
cat > /tmp/bin/clang++ << 'EOFCLANG'
|
||||||
|
#!/bin/bash
|
||||||
|
# This is a wrapper script that adds library path arguments to clang++
|
||||||
|
REAL_CLANG=$(which -a clang++ | grep -v "/tmp/bin/clang++" | head -1)
|
||||||
|
exec "$REAL_CLANG" "$@" -L/tmp
|
||||||
|
EOFCLANG
|
||||||
|
chmod +x /tmp/bin/clang++
|
||||||
|
|
||||||
|
# Add our wrapper to the PATH
|
||||||
|
export PATH="/tmp/bin:$PATH"
|
||||||
|
echo "PATH, DYLD_LIBRARY_PATH and LDFLAGS set up with fallback paths"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Explicitly pass environment variables to the build command
|
||||||
|
PATH="$PATH" DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH" LDFLAGS="$LDFLAGS" "$UE_ROOT/Build/BatchFiles/RunUAT.sh" BuildCookRun \
|
||||||
-project="$UPROJECT_ABSOLUTE_PATH" \
|
-project="$UPROJECT_ABSOLUTE_PATH" \
|
||||||
-noP4 \
|
-noP4 \
|
||||||
-platform=Mac \
|
-platform=Mac \
|
||||||
|
75
.gitignore
vendored
75
.gitignore
vendored
@ -1,2 +1,77 @@
|
|||||||
BP_Puralink
|
BP_Puralink
|
||||||
BP_Revolute
|
BP_Revolute
|
||||||
|
|
||||||
|
# Visual Studio 2015 user specific files
|
||||||
|
.vs/
|
||||||
|
|
||||||
|
# Compiled Object files
|
||||||
|
*.slo
|
||||||
|
*.lo
|
||||||
|
*.o
|
||||||
|
*.obj
|
||||||
|
|
||||||
|
# Precompiled Headers
|
||||||
|
*.gch
|
||||||
|
*.pch
|
||||||
|
|
||||||
|
# Compiled Dynamic libraries
|
||||||
|
*.so
|
||||||
|
*.dylib
|
||||||
|
*.dll
|
||||||
|
|
||||||
|
# Fortran module files
|
||||||
|
*.mod
|
||||||
|
|
||||||
|
# Compiled Static libraries
|
||||||
|
*.lai
|
||||||
|
*.la
|
||||||
|
*.a
|
||||||
|
*.lib
|
||||||
|
|
||||||
|
# Executables
|
||||||
|
*.exe
|
||||||
|
*.out
|
||||||
|
*.app
|
||||||
|
*.ipa
|
||||||
|
|
||||||
|
# These project files can be generated by the engine
|
||||||
|
*.xcodeproj
|
||||||
|
*.xcworkspace
|
||||||
|
*.sln
|
||||||
|
*.suo
|
||||||
|
*.opensdf
|
||||||
|
*.sdf
|
||||||
|
*.VC.db
|
||||||
|
*.VC.opendb
|
||||||
|
|
||||||
|
# Precompiled Assets
|
||||||
|
SourceArt/**/*.png
|
||||||
|
SourceArt/**/*.tga
|
||||||
|
|
||||||
|
# Binary Files
|
||||||
|
Binaries/*
|
||||||
|
Plugins/**/Binaries/*
|
||||||
|
|
||||||
|
# Builds
|
||||||
|
Build/*
|
||||||
|
|
||||||
|
# Whitelist PakBlacklist-<BuildConfiguration>.txt files
|
||||||
|
!Build/*/
|
||||||
|
Build/*/**
|
||||||
|
!Build/*/PakBlacklist*.txt
|
||||||
|
|
||||||
|
# Don't ignore icon files in Build
|
||||||
|
!Build/**/*.ico
|
||||||
|
|
||||||
|
# Built data for maps
|
||||||
|
*_BuiltData.uasset
|
||||||
|
|
||||||
|
# Configuration files generated by the Editor
|
||||||
|
Saved/*
|
||||||
|
|
||||||
|
# Compiled source files for the engine to use
|
||||||
|
Intermediate/*
|
||||||
|
Plugins/**/Intermediate/*
|
||||||
|
|
||||||
|
# Cache files for the editor to use
|
||||||
|
DerivedDataCache/*
|
Loading…
x
Reference in New Issue
Block a user