From d4e311650201a1fe8c38fdd81f9cb7c434b7d103 Mon Sep 17 00:00:00 2001 From: Ivan Tustanivskyi Date: Thu, 19 Dec 2024 11:22:17 +0200 Subject: [PATCH] Fix CI pipeline breakage due to invalid large GitHub runner `uid` (#718) * Check log folder content * Fix * Fix * Fix user Id * Add HOME env variable * Try remove custom user * Try ue4 user * Try without user again * Add gh user * Try address permission issues * Another one --- .github/workflows/ci.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0e4d6eee..b61e51f0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -187,10 +187,13 @@ jobs: --volume ${{ github.workspace }}:/workspace \ --workdir /workspace \ --user $uid:$gid \ + --env HOME="/home/$user" \ --env PATH="/home/$user/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" \ --network ip6net -p 80:80 \ ghcr.io/epicgames/unreal-engine:dev-slim-${{ matrix.unreal }}.1 docker logout ghcr.io + # Add the user so it has a home directory (needed to run tests later on) + docker exec --user root unreal useradd -u $uid -g $gid --create-home $user # Ensure CA certs are in the right directory (needed for running tests) docker exec --user root unreal bash -c " mkdir -p /etc/pki/tls/certs ; @@ -203,7 +206,9 @@ jobs: uid=$(id -u) # the GH action user ID docker exec --user root unreal bash -c " chown -R $uid /home/ue4/UnrealEngine/Engine/Binaries/ThirdParty/Mono/Linux ; - chown -R $uid /home/ue4/UnrealEngine/Engine/${{ matrix.unreal == '4.27' && 'Programs/UnrealPak/Saved' || 'Binaries/ThirdParty/DotNet' }} " + chown -R $uid /home/ue4/UnrealEngine/Engine/${{ matrix.unreal == '4.27' && 'Programs/UnrealPak/Saved' || 'Binaries/ThirdParty/DotNet' }} ; + mkdir -p /home/ue4/UnrealEngine/Epic/UnrealEngine && chown -R $uid /home/ue4/UnrealEngine/Epic ; + mkdir -p /home/ue4/UnrealEngine/Engine/Source/Epic/UnrealEngine && chown -R $uid /home/ue4/UnrealEngine/Engine/Source/Epic " - name: Setup C++ runtime run: docker exec --user root unreal bash -c ' @@ -242,7 +247,7 @@ jobs: -package \ -archive docker exec -w /workspace/checkout/${{ matrix.app }} unreal bash -c " - cp -r '/home/ue4/Library/Logs/Unreal Engine/LocalBuildLogs' Saved/Logs " + cp -r '/home/gh/Library/Logs/Unreal Engine/LocalBuildLogs' Saved/Logs " docker exec -w /workspace/checkout/${{ matrix.app }} unreal /home/ue4/UnrealEngine/Engine/Binaries/Linux/${{ matrix.unreal == '4.27' && 'UE4Editor' || 'UnrealEditor' }} \ /workspace/checkout/${{ matrix.app }}/SentryPlayground.uproject \ -ReportExportPath=/workspace/checkout/${{ matrix.app }}/Saved/Automation \