From b25f88f8d2ab8ed3e27e409688e7734958cfdc0f Mon Sep 17 00:00:00 2001 From: Bruno Garcia Date: Mon, 14 Oct 2024 10:31:51 -0400 Subject: [PATCH 01/22] ci: heavy linux workload on ubuntu-latest-4-cores --- .github/workflows/ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e26c2df5..8bec4e1c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,7 +7,7 @@ jobs: uses: ./.github/workflows/sdk.yml with: target: Android - runsOn: ubuntu-latest + runsOn: ubuntu-latest-4-cores ios-sdk: uses: ./.github/workflows/sdk.yml @@ -44,7 +44,7 @@ jobs: build: needs: [android-sdk, ios-sdk, macos-sdk, linux-sdk, windows-crashpad-sdk, windows-breakpad-sdk] name: Package - runs-on: ubuntu-latest + runs-on: ubuntu-latest-4-cores steps: - name: Checkout uses: actions/checkout@v3 @@ -126,7 +126,7 @@ jobs: test: name: Test UE ${{ matrix.unreal }} - runs-on: ubuntu-latest + runs-on: ubuntu-latest-4-cores strategy: fail-fast: false @@ -257,4 +257,4 @@ jobs: checkout/${{ matrix.app }}/Saved/Logs checkout/${{ matrix.app }}/Saved/Stats checkout/${{ matrix.app }}/Saved/MaterialStats - checkout/${{ matrix.app }}/Saved/MaterialStatsDebug \ No newline at end of file + checkout/${{ matrix.app }}/Saved/MaterialStatsDebug From 8fa8605fcea5629affbbe9825f4d068ff6e92224 Mon Sep 17 00:00:00 2001 From: Ivan Tustanivskyi Date: Tue, 15 Oct 2024 10:18:15 +0300 Subject: [PATCH 02/22] Fix user id --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8bec4e1c..10212f4b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -180,7 +180,7 @@ jobs: ghcr.io/epicgames/unreal-engine:dev-slim-${{ matrix.unreal }}.1 docker logout ghcr.io # Add the user so it has a home directory (needed for the pip cache later on) - docker exec --user root unreal useradd -u $uid -g $gid --create-home $user + docker exec --user root unreal useradd --non-unique -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 ; From 8d317ceffaec6122175752b5af5f606c57e9e684 Mon Sep 17 00:00:00 2001 From: Ivan Tustanivskyi Date: Tue, 15 Oct 2024 10:51:27 +0300 Subject: [PATCH 03/22] Revert user id --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 10212f4b..8bec4e1c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -180,7 +180,7 @@ jobs: ghcr.io/epicgames/unreal-engine:dev-slim-${{ matrix.unreal }}.1 docker logout ghcr.io # Add the user so it has a home directory (needed for the pip cache later on) - docker exec --user root unreal useradd --non-unique -u $uid -g $gid --create-home $user + 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 ; From 3bcc7f14aed59fc1b5a10de1af32404ab05b54c2 Mon Sep 17 00:00:00 2001 From: Ivan Tustanivskyi Date: Tue, 15 Oct 2024 17:01:16 +0300 Subject: [PATCH 04/22] Check existing users --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8bec4e1c..61ed079b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -169,6 +169,7 @@ jobs: gid=1000 # the ue4 group in the docker container user='gh' set -x + cat /etc/passwd docker network create --ipv6 --subnet 2001:0DB8::/112 ip6net docker run -td \ --name unreal \ From 6534159d3391e9ccea3d420a79ff0132387c4ecb Mon Sep 17 00:00:00 2001 From: Ivan Tustanivskyi Date: Wed, 16 Oct 2024 11:09:10 +0300 Subject: [PATCH 05/22] Try to remove additional user --- .github/workflows/ci.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 61ed079b..fce726ea 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -163,7 +163,6 @@ jobs: - name: Start Docker container run: | echo ${{ secrets.DOCKER_TOKEN }} | docker login ghcr.io -u ${{ secrets.DOCKER_USERNAME }} --password-stdin - # We start the container with the user ID of the parent GH action user to avoid permission issues on volume. # For UE 5.4 we have to enable ipv6 to fix container startup issues. See https://github.com/adamrehn/ue4-docker/issues/357 uid=$(id -u) # the GH action user ID gid=1000 # the ue4 group in the docker container @@ -180,8 +179,6 @@ jobs: --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 for the pip cache 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 ; From a32d17c380939f7bae5ad17f8c22bb81495a6c83 Mon Sep 17 00:00:00 2001 From: Ivan Tustanivskyi Date: Wed, 16 Oct 2024 12:59:09 +0300 Subject: [PATCH 06/22] Try differen uid --- .github/workflows/ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fce726ea..6007cb72 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -163,12 +163,12 @@ jobs: - name: Start Docker container run: | echo ${{ secrets.DOCKER_TOKEN }} | docker login ghcr.io -u ${{ secrets.DOCKER_USERNAME }} --password-stdin + # We start the container with the user ID of the parent GH action user to avoid permission issues on volume. # For UE 5.4 we have to enable ipv6 to fix container startup issues. See https://github.com/adamrehn/ue4-docker/issues/357 uid=$(id -u) # the GH action user ID gid=1000 # the ue4 group in the docker container user='gh' set -x - cat /etc/passwd docker network create --ipv6 --subnet 2001:0DB8::/112 ip6net docker run -td \ --name unreal \ @@ -179,6 +179,8 @@ jobs: --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 for the pip cache later on) + docker exec --user root unreal useradd -u 1001 -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 ; From 670c9b9fdd33cdd14f8fefb345a2fa3c032b24bc Mon Sep 17 00:00:00 2001 From: Ivan Tustanivskyi Date: Wed, 16 Oct 2024 13:16:15 +0300 Subject: [PATCH 07/22] Test --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6007cb72..b13875e5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -180,7 +180,7 @@ jobs: ghcr.io/epicgames/unreal-engine:dev-slim-${{ matrix.unreal }}.1 docker logout ghcr.io # Add the user so it has a home directory (needed for the pip cache later on) - docker exec --user root unreal useradd -u 1001 -g $gid --create-home $user + docker exec --user root unreal useradd --non-unique -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 ; @@ -192,7 +192,7 @@ jobs: chown -R $uid /home/ue4/UnrealEngine/Engine/Binaries/ThirdParty/DotNet " - name: Setup UE CLI - run: docker exec unreal bash -c ' + run: docker exec --user root unreal bash -c ' pip3 install --upgrade pip ; pip3 install -Iv ue4cli==0.0.54 ; ue4 setroot /home/ue4/UnrealEngine ' From 15846e3aae411ad7f413abad83aa037bc4f231e7 Mon Sep 17 00:00:00 2001 From: Ivan Tustanivskyi Date: Wed, 16 Oct 2024 14:08:15 +0300 Subject: [PATCH 08/22] Test --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b13875e5..265acfcb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -221,8 +221,8 @@ jobs: - name: Run tests id: run-tests run: | - docker exec -w /workspace/checkout/${{ matrix.app }} unreal ue4 build - docker exec -w /workspace/checkout/${{ matrix.app }} unreal ue4 editor \ + docker exec --user root -w /workspace/checkout/${{ matrix.app }} unreal ue4 build + docker exec --user root -w /workspace/checkout/${{ matrix.app }} unreal ue4 editor \ /workspace/checkout/${{ matrix.app }}/SentryPlayground.uproject \ -ReportExportPath=/workspace/checkout/${{ matrix.app }}/Saved/Automation \ -ExecCmds="Automation RunTests Sentry;quit" \ @@ -245,7 +245,7 @@ jobs: if: ${{ matrix.unreal == '4.27'}} id: package-app run: | - docker exec -w /workspace/checkout/${{ matrix.app }} unreal ue4 package + docker exec --user root -w /workspace/checkout/${{ matrix.app }} unreal ue4 package docker exec -w /workspace/checkout/${{ matrix.app }} unreal cp -r '/home/gh/Library/Logs/Unreal Engine/LocalBuildLogs' Saved/Logs - name: Collect ${{ matrix.app }} build info From bf3042f470c9e76c8106e17a36403491ea88289e Mon Sep 17 00:00:00 2001 From: Ivan Tustanivskyi Date: Wed, 16 Oct 2024 15:23:48 +0300 Subject: [PATCH 09/22] Revert --- .github/workflows/ci.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 265acfcb..61ed079b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -169,6 +169,7 @@ jobs: gid=1000 # the ue4 group in the docker container user='gh' set -x + cat /etc/passwd docker network create --ipv6 --subnet 2001:0DB8::/112 ip6net docker run -td \ --name unreal \ @@ -180,7 +181,7 @@ jobs: ghcr.io/epicgames/unreal-engine:dev-slim-${{ matrix.unreal }}.1 docker logout ghcr.io # Add the user so it has a home directory (needed for the pip cache later on) - docker exec --user root unreal useradd --non-unique -u $uid -g $gid --create-home $user + 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 ; @@ -192,7 +193,7 @@ jobs: chown -R $uid /home/ue4/UnrealEngine/Engine/Binaries/ThirdParty/DotNet " - name: Setup UE CLI - run: docker exec --user root unreal bash -c ' + run: docker exec unreal bash -c ' pip3 install --upgrade pip ; pip3 install -Iv ue4cli==0.0.54 ; ue4 setroot /home/ue4/UnrealEngine ' @@ -221,8 +222,8 @@ jobs: - name: Run tests id: run-tests run: | - docker exec --user root -w /workspace/checkout/${{ matrix.app }} unreal ue4 build - docker exec --user root -w /workspace/checkout/${{ matrix.app }} unreal ue4 editor \ + docker exec -w /workspace/checkout/${{ matrix.app }} unreal ue4 build + docker exec -w /workspace/checkout/${{ matrix.app }} unreal ue4 editor \ /workspace/checkout/${{ matrix.app }}/SentryPlayground.uproject \ -ReportExportPath=/workspace/checkout/${{ matrix.app }}/Saved/Automation \ -ExecCmds="Automation RunTests Sentry;quit" \ @@ -245,7 +246,7 @@ jobs: if: ${{ matrix.unreal == '4.27'}} id: package-app run: | - docker exec --user root -w /workspace/checkout/${{ matrix.app }} unreal ue4 package + docker exec -w /workspace/checkout/${{ matrix.app }} unreal ue4 package docker exec -w /workspace/checkout/${{ matrix.app }} unreal cp -r '/home/gh/Library/Logs/Unreal Engine/LocalBuildLogs' Saved/Logs - name: Collect ${{ matrix.app }} build info From 9319dd5dbd9f9571227dcdc6f6b886c57b3ce76a Mon Sep 17 00:00:00 2001 From: Ivan Tustanivskyi Date: Wed, 16 Oct 2024 16:40:42 +0300 Subject: [PATCH 10/22] More manipulations with gh runner user --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 61ed079b..9ef53092 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -164,6 +164,8 @@ jobs: run: | echo ${{ secrets.DOCKER_TOKEN }} | docker login ghcr.io -u ${{ secrets.DOCKER_USERNAME }} --password-stdin # We start the container with the user ID of the parent GH action user to avoid permission issues on volume. + sudo useradd -m -u 1001 -g 1000 gh-runner + sudo -u gh-runner # For UE 5.4 we have to enable ipv6 to fix container startup issues. See https://github.com/adamrehn/ue4-docker/issues/357 uid=$(id -u) # the GH action user ID gid=1000 # the ue4 group in the docker container From 87f0ab9af3d5b539f09cc8db98e4dc7165dd9f00 Mon Sep 17 00:00:00 2001 From: Ivan Tustanivskyi Date: Wed, 16 Oct 2024 16:56:52 +0300 Subject: [PATCH 11/22] Test --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9ef53092..31af1f6d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -164,8 +164,8 @@ jobs: run: | echo ${{ secrets.DOCKER_TOKEN }} | docker login ghcr.io -u ${{ secrets.DOCKER_USERNAME }} --password-stdin # We start the container with the user ID of the parent GH action user to avoid permission issues on volume. - sudo useradd -m -u 1001 -g 1000 gh-runner - sudo -u gh-runner + sudo useradd -m -u 1001 -g 1000 ghrunner + sudo -u ghrunner bash # For UE 5.4 we have to enable ipv6 to fix container startup issues. See https://github.com/adamrehn/ue4-docker/issues/357 uid=$(id -u) # the GH action user ID gid=1000 # the ue4 group in the docker container From 0d55f1dd7203e27b76b7e260a7efb4ca7619dc92 Mon Sep 17 00:00:00 2001 From: Ivan Tustanivskyi Date: Wed, 16 Oct 2024 17:20:31 +0300 Subject: [PATCH 12/22] Another attempt to fix matching UIDs --- .github/workflows/ci.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 31af1f6d..4b32a40b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -160,12 +160,21 @@ jobs: # time du --max-depth=3 --threshold=100M -h /usr /opt /var 2>/dev/null | sort -hr df -h + - name: Modify current user UID + run: | + echo "Current user and UID:" + id + echo "Modifying UID..." + sudo usermod -u 1001 $USER + echo "Updated user and UID:" + id + echo "Fixing ownership of user's files..." + sudo find /home/$USER -user $(id -u) -exec chown -h $USER:$USER {} \; + - name: Start Docker container run: | echo ${{ secrets.DOCKER_TOKEN }} | docker login ghcr.io -u ${{ secrets.DOCKER_USERNAME }} --password-stdin # We start the container with the user ID of the parent GH action user to avoid permission issues on volume. - sudo useradd -m -u 1001 -g 1000 ghrunner - sudo -u ghrunner bash # For UE 5.4 we have to enable ipv6 to fix container startup issues. See https://github.com/adamrehn/ue4-docker/issues/357 uid=$(id -u) # the GH action user ID gid=1000 # the ue4 group in the docker container From 5f7d73f8273a9c987b942b4b97f2e094dcf1ab66 Mon Sep 17 00:00:00 2001 From: Ivan Tustanivskyi Date: Thu, 17 Oct 2024 10:57:31 +0300 Subject: [PATCH 13/22] Revert --- .github/workflows/ci.yml | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4b32a40b..61ed079b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -160,17 +160,6 @@ jobs: # time du --max-depth=3 --threshold=100M -h /usr /opt /var 2>/dev/null | sort -hr df -h - - name: Modify current user UID - run: | - echo "Current user and UID:" - id - echo "Modifying UID..." - sudo usermod -u 1001 $USER - echo "Updated user and UID:" - id - echo "Fixing ownership of user's files..." - sudo find /home/$USER -user $(id -u) -exec chown -h $USER:$USER {} \; - - name: Start Docker container run: | echo ${{ secrets.DOCKER_TOKEN }} | docker login ghcr.io -u ${{ secrets.DOCKER_USERNAME }} --password-stdin From 0f021965726112d7b3e2c6d70266b62bbfcd427f Mon Sep 17 00:00:00 2001 From: bitsandfoxes Date: Mon, 21 Oct 2024 15:48:54 +0200 Subject: [PATCH 14/22] big arm64 runners --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 61ed079b..d3035b4a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,7 +7,7 @@ jobs: uses: ./.github/workflows/sdk.yml with: target: Android - runsOn: ubuntu-latest-4-cores + runsOn: ubuntu-latest-4-cores-arm64 ios-sdk: uses: ./.github/workflows/sdk.yml @@ -44,7 +44,7 @@ jobs: build: needs: [android-sdk, ios-sdk, macos-sdk, linux-sdk, windows-crashpad-sdk, windows-breakpad-sdk] name: Package - runs-on: ubuntu-latest-4-cores + runs-on: ubuntu-latest-4-cores-arm64 steps: - name: Checkout uses: actions/checkout@v3 @@ -126,7 +126,7 @@ jobs: test: name: Test UE ${{ matrix.unreal }} - runs-on: ubuntu-latest-4-cores + runs-on: ubuntu-latest-4-cores-arm64 strategy: fail-fast: false From 536273d2dcfce593eabf87314eee04b7737ff002 Mon Sep 17 00:00:00 2001 From: bitsandfoxes Date: Mon, 21 Oct 2024 16:14:54 +0200 Subject: [PATCH 15/22] what's running? --- .github/workflows/ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d3035b4a..c1c1a906 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -179,18 +179,22 @@ jobs: --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 ps docker logout ghcr.io # Add the user so it has a home directory (needed for the pip cache 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 ps docker exec --user root unreal bash -c " mkdir -p /etc/pki/tls/certs ; cp /etc/ssl/certs/ca-certificates.crt /etc/pki/tls/certs/ca-bundle.crt " # Chown some paths to the GH user to make UE5 work properly. We can't just chown the whole UnrealEngine or # docker would implicitly have to copy it to the container and we would run out of space on the GH runner. + docker ps 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/Binaries/ThirdParty/DotNet " + docker ps - name: Setup UE CLI run: docker exec unreal bash -c ' From 1bc7411fe49f9da2df80a8e6f54a9ff794f9f560 Mon Sep 17 00:00:00 2001 From: Ivan Tustanivskyi Date: Wed, 23 Oct 2024 14:54:34 +0300 Subject: [PATCH 16/22] Try remove ue4cli --- .github/workflows/ci.yml | 38 +++++++++++++++++--------------------- 1 file changed, 17 insertions(+), 21 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c1c1a906..6442f64f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,7 +7,7 @@ jobs: uses: ./.github/workflows/sdk.yml with: target: Android - runsOn: ubuntu-latest-4-cores-arm64 + runsOn: ubuntu-latest-4-cores ios-sdk: uses: ./.github/workflows/sdk.yml @@ -44,7 +44,7 @@ jobs: build: needs: [android-sdk, ios-sdk, macos-sdk, linux-sdk, windows-crashpad-sdk, windows-breakpad-sdk] name: Package - runs-on: ubuntu-latest-4-cores-arm64 + runs-on: ubuntu-latest-4-cores steps: - name: Checkout uses: actions/checkout@v3 @@ -126,7 +126,7 @@ jobs: test: name: Test UE ${{ matrix.unreal }} - runs-on: ubuntu-latest-4-cores-arm64 + runs-on: ubuntu-latest-4-cores strategy: fail-fast: false @@ -181,8 +181,6 @@ jobs: ghcr.io/epicgames/unreal-engine:dev-slim-${{ matrix.unreal }}.1 docker ps docker logout ghcr.io - # Add the user so it has a home directory (needed for the pip cache 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 ps docker exec --user root unreal bash -c " @@ -196,12 +194,6 @@ jobs: chown -R $uid /home/ue4/UnrealEngine/Engine/Binaries/ThirdParty/DotNet " docker ps - - name: Setup UE CLI - run: docker exec unreal bash -c ' - pip3 install --upgrade pip ; - pip3 install -Iv ue4cli==0.0.54 ; - ue4 setroot /home/ue4/UnrealEngine ' - - name: Setup C++ runtime run: docker exec --user root unreal bash -c ' apt-get update ; @@ -226,16 +218,20 @@ jobs: - name: Run tests id: run-tests run: | - docker exec -w /workspace/checkout/${{ matrix.app }} unreal ue4 build - docker exec -w /workspace/checkout/${{ matrix.app }} unreal ue4 editor \ - /workspace/checkout/${{ matrix.app }}/SentryPlayground.uproject \ - -ReportExportPath=/workspace/checkout/${{ matrix.app }}/Saved/Automation \ - -ExecCmds="Automation RunTests Sentry;quit" \ - -TestExit="Automation Test Queue Empty" \ - -Unattended \ - -NoPause \ - -NoSplash \ - -NullRHI + docker exec -w /workspace/checkout/${{ matrix.app }} unreal dotnet /home/ue4/UnrealEngine/Engine/Binaries/DotNET/UnrealBuildTool/UnrealBuildTool.dll \ + SentryPlaygroundEditor \ + Linux \ + Development \ + -project=/workspace/checkout/${{ matrix.app }}/SentryPlayground.uproject + # docker exec -w /workspace/checkout/${{ matrix.app }} unreal ue4 editor \ + # /workspace/checkout/${{ matrix.app }}/SentryPlayground.uproject \ + # -ReportExportPath=/workspace/checkout/${{ matrix.app }}/Saved/Automation \ + # -ExecCmds="Automation RunTests Sentry;quit" \ + # -TestExit="Automation Test Queue Empty" \ + # -Unattended \ + # -NoPause \ + # -NoSplash \ + # -NullRHI - name: Collect ${{ matrix.app }} test info if: ${{ always() && steps.run-tests.outcome == 'failure' }} From 7443e404f10c62d370e7a479171241afb64f6be9 Mon Sep 17 00:00:00 2001 From: Ivan Tustanivskyi Date: Wed, 23 Oct 2024 15:22:51 +0300 Subject: [PATCH 17/22] Try with UAT --- .github/workflows/ci.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6442f64f..2d11ff40 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -218,11 +218,8 @@ jobs: - name: Run tests id: run-tests run: | - docker exec -w /workspace/checkout/${{ matrix.app }} unreal dotnet /home/ue4/UnrealEngine/Engine/Binaries/DotNET/UnrealBuildTool/UnrealBuildTool.dll \ - SentryPlaygroundEditor \ - Linux \ - Development \ - -project=/workspace/checkout/${{ matrix.app }}/SentryPlayground.uproject + docker exec -w /workspace/checkout/${{ matrix.app }} unreal /home/ue4/UnrealEngine/Engine/Build/BatchFiles/RunUAT.sh \ + BuildCookRun -platform=Linux -project=/workspace/checkout/${{ matrix.app }}/SentryPlayground.uproject -archivedirectory=/workspace/checkout/${{ matrix.app }}/Builds -nop4 -cook -build -stage -prereqss -package -archive # docker exec -w /workspace/checkout/${{ matrix.app }} unreal ue4 editor \ # /workspace/checkout/${{ matrix.app }}/SentryPlayground.uproject \ # -ReportExportPath=/workspace/checkout/${{ matrix.app }}/Saved/Automation \ From 0ff5686cd6e3e531f07252f1aa01477d5dcc0862 Mon Sep 17 00:00:00 2001 From: Ivan Tustanivskyi Date: Wed, 23 Oct 2024 15:49:40 +0300 Subject: [PATCH 18/22] Add tests --- .github/workflows/ci.yml | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2d11ff40..83913175 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -218,17 +218,26 @@ jobs: - name: Run tests id: run-tests run: | - docker exec -w /workspace/checkout/${{ matrix.app }} unreal /home/ue4/UnrealEngine/Engine/Build/BatchFiles/RunUAT.sh \ - BuildCookRun -platform=Linux -project=/workspace/checkout/${{ matrix.app }}/SentryPlayground.uproject -archivedirectory=/workspace/checkout/${{ matrix.app }}/Builds -nop4 -cook -build -stage -prereqss -package -archive - # docker exec -w /workspace/checkout/${{ matrix.app }} unreal ue4 editor \ - # /workspace/checkout/${{ matrix.app }}/SentryPlayground.uproject \ - # -ReportExportPath=/workspace/checkout/${{ matrix.app }}/Saved/Automation \ - # -ExecCmds="Automation RunTests Sentry;quit" \ - # -TestExit="Automation Test Queue Empty" \ - # -Unattended \ - # -NoPause \ - # -NoSplash \ - # -NullRHI + docker exec -w /workspace/checkout/${{ matrix.app }} unreal /home/ue4/UnrealEngine/Engine/Build/BatchFiles/RunUAT.sh BuildCookRun \ + -project=/workspace/checkout/${{ matrix.app }}/SentryPlayground.uproject \ + -archivedirectory=/workspace/checkout/${{ matrix.app }}/Builds \ + -platform=Linux \ + -nop4 \ + -cook \ + -build \ + -stage \ + -prereqss \ + -package \ + -archive + docker exec -w /workspace/checkout/${{ matrix.app }} unreal /home/ue4/UnrealEngine/Engine/Binaries/Linux/UnrealEditor \ + /workspace/checkout/${{ matrix.app }}/SentryPlayground.uproject \ + -ReportExportPath=/workspace/checkout/${{ matrix.app }}/Saved/Automation \ + -ExecCmds="Automation RunTests Sentry;quit" \ + -TestExit="Automation Test Queue Empty" \ + -Unattended \ + -NoPause \ + -NoSplash \ + -NullRHI - name: Collect ${{ matrix.app }} test info if: ${{ always() && steps.run-tests.outcome == 'failure' }} From 3afa4dc094490a80b1ddc5ba703d077bbe383e0c Mon Sep 17 00:00:00 2001 From: Ivan Tustanivskyi Date: Wed, 23 Oct 2024 16:44:57 +0300 Subject: [PATCH 19/22] Clean up --- .github/workflows/ci.yml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 83913175..6a33f4b1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,7 +7,7 @@ jobs: uses: ./.github/workflows/sdk.yml with: target: Android - runsOn: ubuntu-latest-4-cores + runsOn: ubuntu-latest ios-sdk: uses: ./.github/workflows/sdk.yml @@ -44,7 +44,7 @@ jobs: build: needs: [android-sdk, ios-sdk, macos-sdk, linux-sdk, windows-crashpad-sdk, windows-breakpad-sdk] name: Package - runs-on: ubuntu-latest-4-cores + runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v3 @@ -169,7 +169,6 @@ jobs: gid=1000 # the ue4 group in the docker container user='gh' set -x - cat /etc/passwd docker network create --ipv6 --subnet 2001:0DB8::/112 ip6net docker run -td \ --name unreal \ @@ -179,20 +178,16 @@ jobs: --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 ps docker logout ghcr.io # Ensure CA certs are in the right directory (needed for running tests) - docker ps docker exec --user root unreal bash -c " mkdir -p /etc/pki/tls/certs ; cp /etc/ssl/certs/ca-certificates.crt /etc/pki/tls/certs/ca-bundle.crt " # Chown some paths to the GH user to make UE5 work properly. We can't just chown the whole UnrealEngine or # docker would implicitly have to copy it to the container and we would run out of space on the GH runner. - docker ps 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/Binaries/ThirdParty/DotNet " - docker ps - name: Setup C++ runtime run: docker exec --user root unreal bash -c ' From 465bdaca6be3d893459281de25cf8831e2af3514 Mon Sep 17 00:00:00 2001 From: Ivan Tustanivskyi Date: Wed, 23 Oct 2024 16:47:31 +0300 Subject: [PATCH 20/22] Add build info upload --- .github/workflows/ci.yml | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6a33f4b1..55b62fa7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -224,6 +224,7 @@ jobs: -prereqss \ -package \ -archive + docker exec -w /workspace/checkout/${{ matrix.app }} unreal 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/UnrealEditor \ /workspace/checkout/${{ matrix.app }}/SentryPlayground.uproject \ -ReportExportPath=/workspace/checkout/${{ matrix.app }}/Saved/Automation \ @@ -232,7 +233,7 @@ jobs: -Unattended \ -NoPause \ -NoSplash \ - -NullRHI + -NullRHI - name: Collect ${{ matrix.app }} test info if: ${{ always() && steps.run-tests.outcome == 'failure' }} @@ -241,17 +242,9 @@ jobs: name: UE ${{ matrix.unreal }} ${{ matrix.app }} test report path: | checkout/${{ matrix.app }}/Saved/Automation - - - name: Build & package ${{ matrix.app }} - # Unreal 5.0 takes ~1 hour to build+package the app so only do it on v4.27 - if: ${{ matrix.unreal == '4.27'}} - id: package-app - run: | - docker exec -w /workspace/checkout/${{ matrix.app }} unreal ue4 package - docker exec -w /workspace/checkout/${{ matrix.app }} unreal cp -r '/home/gh/Library/Logs/Unreal Engine/LocalBuildLogs' Saved/Logs - name: Collect ${{ matrix.app }} build info - if: contains(fromJson('["success", "failure"]'), steps.package-app.outcome) + if: contains(fromJson('["success", "failure"]'), steps.run-tests.outcome) uses: actions/upload-artifact@v4 with: name: UE ${{ matrix.unreal }} ${{ matrix.app }} build logs From 766d2ae58bab31096b1caaabef3318ca942deb43 Mon Sep 17 00:00:00 2001 From: Ivan Tustanivskyi Date: Wed, 23 Oct 2024 17:10:41 +0300 Subject: [PATCH 21/22] Fix copy --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 55b62fa7..5a5d85ce 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -224,7 +224,8 @@ jobs: -prereqss \ -package \ -archive - docker exec -w /workspace/checkout/${{ matrix.app }} unreal cp -r '/home/gh/Library/Logs/Unreal Engine/LocalBuildLogs' Saved/Logs \ + docker exec -w /workspace/checkout/${{ matrix.app }} unreal bash -c " + 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/UnrealEditor \ /workspace/checkout/${{ matrix.app }}/SentryPlayground.uproject \ -ReportExportPath=/workspace/checkout/${{ matrix.app }}/Saved/Automation \ From 6afa512123729b1522ce312b79d39fe44f7f1cd1 Mon Sep 17 00:00:00 2001 From: Ivan Tustanivskyi Date: Wed, 23 Oct 2024 17:26:54 +0300 Subject: [PATCH 22/22] Fix user --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5a5d85ce..d42c9e7e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -225,7 +225,7 @@ jobs: -package \ -archive docker exec -w /workspace/checkout/${{ matrix.app }} unreal bash -c " - cp -r '/home/gh/Library/Logs/Unreal Engine/LocalBuildLogs' Saved/Logs " + cp -r '/home/ue4/Library/Logs/Unreal Engine/LocalBuildLogs' Saved/Logs " docker exec -w /workspace/checkout/${{ matrix.app }} unreal /home/ue4/UnrealEngine/Engine/Binaries/Linux/UnrealEditor \ /workspace/checkout/${{ matrix.app }}/SentryPlayground.uproject \ -ReportExportPath=/workspace/checkout/${{ matrix.app }}/Saved/Automation \