fix(actions): update macOS build workflow to correct environment variable handling and improve error suggestions
Some checks failed
Test macOS Build Action / test-macos-build (push) Has been cancelled
Some checks failed
Test macOS Build Action / test-macos-build (push) Has been cancelled
This commit is contained in:
parent
51315a772d
commit
ce5b037cc5
@ -15,19 +15,6 @@ jobs:
|
|||||||
lfs: true
|
lfs: true
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
# Cache Unreal Engine build artifacts to speed up builds
|
|
||||||
- name: Cache UE build artifacts
|
|
||||||
uses: actions/cache@v3
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
./Intermediate
|
|
||||||
./DerivedDataCache
|
|
||||||
./Saved/StagedBuilds
|
|
||||||
key: ${{ runner.os }}-ue-build-${{ hashFiles('LuckyWorld.uproject') }}-${{ hashFiles('Config/**/*.ini') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-ue-build-${{ hashFiles('LuckyWorld.uproject') }}-
|
|
||||||
${{ runner.os }}-ue-build-
|
|
||||||
|
|
||||||
# Setup environment for build
|
# Setup environment for build
|
||||||
- name: Setup environment
|
- name: Setup environment
|
||||||
run: |
|
run: |
|
||||||
@ -109,19 +96,19 @@ jobs:
|
|||||||
echo "Checking build logs for common issues..."
|
echo "Checking build logs for common issues..."
|
||||||
|
|
||||||
# Check for the specific GlobalDefinitions error
|
# Check for the specific GlobalDefinitions error
|
||||||
if grep -q "GlobalDefinitions.*This is not allowed" "$GITHUB_WORKSPACE"/*.log 2>/dev/null || grep -q "BuildEnvironment = TargetBuildEnvironment.Unique" "$GITHUB_WORKSPACE"/*.log 2>/dev/null; then
|
if grep -q "GlobalDefinitions.*This is not allowed" "$GITHUB_WORKSPACE"/*.log 2>/dev/null || grep -q "BuildEnvironment\|bOverrideBuildEnvironment" "$GITHUB_WORKSPACE"/*.log 2>/dev/null; then
|
||||||
echo "🔍 Found issue with GlobalDefinitions in build target."
|
echo "🔍 Found issue with GlobalDefinitions in build target."
|
||||||
echo "⚠️ Fix required in LuckyWorld.Target.cs - need to add BuildEnvironment = TargetBuildEnvironment.Unique;"
|
echo "⚠️ Fix required in LuckyWorld.Target.cs - need to add bOverrideBuildEnvironment = true;"
|
||||||
echo "Fix suggestion for LuckyWorld.Target.cs:"
|
echo "Fix suggestion for LuckyWorld.Target.cs:"
|
||||||
echo "Add this line in the constructor:"
|
echo "Add this line in the constructor:"
|
||||||
echo " BuildEnvironment = TargetBuildEnvironment.Unique;"
|
echo " bOverrideBuildEnvironment = true;"
|
||||||
echo ""
|
echo ""
|
||||||
echo "Example:"
|
echo "Example:"
|
||||||
echo " public LuckyWorldTarget(TargetInfo Target) : base(Target)"
|
echo " public LuckyWorldTarget(TargetInfo Target) : base(Target)"
|
||||||
echo " {"
|
echo " {"
|
||||||
echo " Type = TargetType.Game;"
|
echo " Type = TargetType.Game;"
|
||||||
echo " DefaultBuildSettings = BuildSettingsVersion.V5;"
|
echo " DefaultBuildSettings = BuildSettingsVersion.V5;"
|
||||||
echo " BuildEnvironment = TargetBuildEnvironment.Unique; // Add this line"
|
echo " bOverrideBuildEnvironment = true; // Add this line"
|
||||||
echo " "
|
echo " "
|
||||||
echo " // Rest of your constructor..."
|
echo " // Rest of your constructor..."
|
||||||
echo " }"
|
echo " }"
|
||||||
|
@ -9,7 +9,7 @@ public class LuckyWorldTarget : TargetRules
|
|||||||
{
|
{
|
||||||
Type = TargetType.Game;
|
Type = TargetType.Game;
|
||||||
DefaultBuildSettings = BuildSettingsVersion.V5;
|
DefaultBuildSettings = BuildSettingsVersion.V5;
|
||||||
BuildEnvironment = TargetBuildEnvironment.Unique;
|
bOverrideBuildEnvironment = true;
|
||||||
|
|
||||||
ExtraModuleNames.AddRange( new string[] { "LuckyWorld" } );
|
ExtraModuleNames.AddRange( new string[] { "LuckyWorld" } );
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user