Skip to content

Commit

Permalink
Fix CI pipeline breakage due to invalid large GitHub runner uid (#718)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
tustanivsky authored Dec 19, 2024
1 parent 4027d19 commit d4e3116
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 ;
Expand All @@ -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 '
Expand Down Expand Up @@ -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 \
Expand Down

0 comments on commit d4e3116

Please sign in to comment.