From b1fb84955a7204d545c721f6f5eca546ac322a2d Mon Sep 17 00:00:00 2001 From: Ivan Tustanivskyi Date: Thu, 30 Oct 2025 14:53:54 +0200 Subject: [PATCH 01/14] Test cooked content and ddc caching --- .github/workflows/test-linux.yml | 29 +++++++++++++++++++++++++++++ .github/workflows/test-windows.yml | 29 +++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+) diff --git a/.github/workflows/test-linux.yml b/.github/workflows/test-linux.yml index f0ccb94b2..4f5b2be5f 100644 --- a/.github/workflows/test-linux.yml +++ b/.github/workflows/test-linux.yml @@ -105,6 +105,25 @@ jobs: UNREAL_VERSION: ${{ inputs.unreal-version }} run: unzip sentry-unreal-*-engine"$UNREAL_VERSION".zip -d checkout/sample/Plugins/sentry + - name: Restore cached DDC and Cooked content + id: cache-content + uses: actions/cache/restore@v4 + with: + path: | + checkout/sample/DerivedDataCache + checkout/sample/Saved/Cooked + key: ue-${{ inputs.unreal-version }}-linux-content-${{ hashFiles('checkout/sample/Content/**', 'checkout/sample/Config/**/*.ini', 'checkout/sample/*.uproject') }} + restore-keys: | + ue-${{ inputs.unreal-version }}-linux-content- + + - name: Display cache status + run: | + if [ "${{ steps.cache-content.outputs.cache-hit }}" == "true" ]; then + echo "✓ Cache hit! Using cached DDC and cooked content." + else + echo "✗ Cache miss. Will cook content from scratch." + fi + - name: Set permissions for sample # sentry-native requires write access to sample project directory in order to initialize itself properly run: docker exec -w /workspace/checkout unreal chmod -R +x sample @@ -139,6 +158,7 @@ jobs: -platform=Linux \ -nop4 \ -cook \ + -iterate \ -build \ -stage \ -prereqss \ @@ -154,6 +174,15 @@ jobs: -NoSplash \ -NullRHI + - name: Save DDC and Cooked content to cache + if: always() + uses: actions/cache/save@v4 + with: + path: | + checkout/sample/DerivedDataCache + checkout/sample/Saved/Cooked + key: ue-${{ inputs.unreal-version }}-linux-content-${{ hashFiles('checkout/sample/Content/**', 'checkout/sample/Config/**/*.ini', 'checkout/sample/*.uproject') }} + - name: Collect sample test info if: ${{ always() && steps.run-tests.outcome == 'failure' }} uses: actions/upload-artifact@v4 diff --git a/.github/workflows/test-windows.yml b/.github/workflows/test-windows.yml index 83d5f978a..0f7610c9f 100644 --- a/.github/workflows/test-windows.yml +++ b/.github/workflows/test-windows.yml @@ -52,6 +52,25 @@ jobs: New-Item -ItemType Directory -Path "$env:WORKSPACE_PATH\checkout\sample\Plugins\sentry" -Force Expand-Archive -Path "sentry-unreal-*-engine$env:UNREAL_VERSION.zip" -DestinationPath "$env:WORKSPACE_PATH\checkout\sample\Plugins\sentry" -Force + - name: Restore cached DDC and Cooked content + id: cache-content + uses: actions/cache/restore@v4 + with: + path: | + checkout/sample/DerivedDataCache + checkout/sample/Saved/Cooked + key: ue-${{ inputs.unreal-version }}-win64-content-${{ hashFiles('checkout/sample/Content/**', 'checkout/sample/Config/**/*.ini', 'checkout/sample/*.uproject') }} + restore-keys: | + ue-${{ inputs.unreal-version }}-win64-content- + + - name: Display cache status + run: | + if ("${{ steps.cache-content.outputs.cache-hit }}" -eq "true") { + Write-Host "✓ Cache hit! Using cached DDC and cooked content." + } else { + Write-Host "✗ Cache miss. Will cook content from scratch." + } + - name: Update engine's build configuration run: | docker exec unreal powershell -Command 'New-Item -ItemType Directory -Path "$env:USERPROFILE\AppData\Roaming\Unreal Engine\UnrealBuildTool" -Force' @@ -77,6 +96,7 @@ jobs: -platform=Win64 ` -nop4 ` -cook ` + -iterate ` -build ` -stage ` -prereqss ` @@ -91,6 +111,15 @@ jobs: -NoSplash ` -NullRHI + - name: Save DDC and Cooked content to cache + if: always() + uses: actions/cache/save@v4 + with: + path: | + checkout/sample/DerivedDataCache + checkout/sample/Saved/Cooked + key: ue-${{ inputs.unreal-version }}-win64-content-${{ hashFiles('checkout/sample/Content/**', 'checkout/sample/Config/**/*.ini', 'checkout/sample/*.uproject') }} + - name: Collect sample test info if: ${{ always() && steps.run-tests.outcome == 'failure' }} uses: actions/upload-artifact@v4 From ec3cd35144f77a63b2cc2f74064b04eee3799b80 Mon Sep 17 00:00:00 2001 From: Ivan Tustanivskyi Date: Thu, 30 Oct 2025 15:37:35 +0200 Subject: [PATCH 02/14] Test --- sample/Source/SentryPlayground/SentryPlaygroundGameInstance.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sample/Source/SentryPlayground/SentryPlaygroundGameInstance.cpp b/sample/Source/SentryPlayground/SentryPlaygroundGameInstance.cpp index 63c28023c..b2e5b42f7 100644 --- a/sample/Source/SentryPlayground/SentryPlaygroundGameInstance.cpp +++ b/sample/Source/SentryPlayground/SentryPlaygroundGameInstance.cpp @@ -15,6 +15,8 @@ void USentryPlaygroundGameInstance::Init() { Super::Init(); + UE_LOG(LogSentrySample, Log, TEXT("TEST")); + const TCHAR* CommandLine = FCommandLine::Get(); // Check for expected test parameters to decide between running integration tests From 952880da425eff4902d2b4e98c265dd94f49a305 Mon Sep 17 00:00:00 2001 From: Ivan Tustanivskyi Date: Thu, 30 Oct 2025 16:52:05 +0200 Subject: [PATCH 03/14] Fix caching --- .github/workflows/test-linux.yml | 8 ++++++-- .github/workflows/test-windows.yml | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test-linux.yml b/.github/workflows/test-linux.yml index 4f5b2be5f..95e919f4c 100644 --- a/.github/workflows/test-linux.yml +++ b/.github/workflows/test-linux.yml @@ -105,6 +105,10 @@ jobs: UNREAL_VERSION: ${{ inputs.unreal-version }} run: unzip sentry-unreal-*-engine"$UNREAL_VERSION".zip -d checkout/sample/Plugins/sentry + - name: Generate cache key + id: cache-key + run: echo "key=ue-${{ inputs.unreal-version }}-linux-content-${{ hashFiles('checkout/sample/Content/**', 'checkout/sample/Config/**/*.ini', 'checkout/sample/*.uproject') }}" >> $GITHUB_OUTPUT + - name: Restore cached DDC and Cooked content id: cache-content uses: actions/cache/restore@v4 @@ -112,7 +116,7 @@ jobs: path: | checkout/sample/DerivedDataCache checkout/sample/Saved/Cooked - key: ue-${{ inputs.unreal-version }}-linux-content-${{ hashFiles('checkout/sample/Content/**', 'checkout/sample/Config/**/*.ini', 'checkout/sample/*.uproject') }} + key: ${{ steps.cache-key.outputs.key }} restore-keys: | ue-${{ inputs.unreal-version }}-linux-content- @@ -181,7 +185,7 @@ jobs: path: | checkout/sample/DerivedDataCache checkout/sample/Saved/Cooked - key: ue-${{ inputs.unreal-version }}-linux-content-${{ hashFiles('checkout/sample/Content/**', 'checkout/sample/Config/**/*.ini', 'checkout/sample/*.uproject') }} + key: ${{ steps.cache-key.outputs.key }} - name: Collect sample test info if: ${{ always() && steps.run-tests.outcome == 'failure' }} diff --git a/.github/workflows/test-windows.yml b/.github/workflows/test-windows.yml index 0f7610c9f..a7cd5cb0d 100644 --- a/.github/workflows/test-windows.yml +++ b/.github/workflows/test-windows.yml @@ -52,6 +52,10 @@ jobs: New-Item -ItemType Directory -Path "$env:WORKSPACE_PATH\checkout\sample\Plugins\sentry" -Force Expand-Archive -Path "sentry-unreal-*-engine$env:UNREAL_VERSION.zip" -DestinationPath "$env:WORKSPACE_PATH\checkout\sample\Plugins\sentry" -Force + - name: Generate cache key + id: cache-key + run: echo "key=ue-${{ inputs.unreal-version }}-win64-content-${{ hashFiles('checkout/sample/Content/**', 'checkout/sample/Config/**/*.ini', 'checkout/sample/*.uproject') }}" >> $env:GITHUB_OUTPUT + - name: Restore cached DDC and Cooked content id: cache-content uses: actions/cache/restore@v4 @@ -59,7 +63,7 @@ jobs: path: | checkout/sample/DerivedDataCache checkout/sample/Saved/Cooked - key: ue-${{ inputs.unreal-version }}-win64-content-${{ hashFiles('checkout/sample/Content/**', 'checkout/sample/Config/**/*.ini', 'checkout/sample/*.uproject') }} + key: ${{ steps.cache-key.outputs.key }} restore-keys: | ue-${{ inputs.unreal-version }}-win64-content- @@ -118,7 +122,7 @@ jobs: path: | checkout/sample/DerivedDataCache checkout/sample/Saved/Cooked - key: ue-${{ inputs.unreal-version }}-win64-content-${{ hashFiles('checkout/sample/Content/**', 'checkout/sample/Config/**/*.ini', 'checkout/sample/*.uproject') }} + key: ${{ steps.cache-key.outputs.key }} - name: Collect sample test info if: ${{ always() && steps.run-tests.outcome == 'failure' }} From da2da0236142437156d698d69533eda96e65d2cd Mon Sep 17 00:00:00 2001 From: Ivan Tustanivskyi Date: Thu, 30 Oct 2025 18:08:49 +0200 Subject: [PATCH 04/14] Test ddc --- .github/workflows/test-linux.yml | 21 +++++++++++++++++++-- .github/workflows/test-windows.yml | 20 +++++++++++++++++++- 2 files changed, 38 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test-linux.yml b/.github/workflows/test-linux.yml index 95e919f4c..770dc82fc 100644 --- a/.github/workflows/test-linux.yml +++ b/.github/workflows/test-linux.yml @@ -140,7 +140,24 @@ jobs: run: | docker exec unreal bash -c " mkdir -p ~/.config/Unreal\ Engine/UnrealBuildTool ; - cp /workspace/checkout/.github/BuildConfiguration.xml ~/.config/Unreal\ Engine/UnrealBuildTool/ " + cp /workspace/checkout/.github/BuildConfiguration.xml ~/.config/Unreal\ Engine/UnrealBuildTool/ " + + - name: Configure project-local DDC + run: | + docker exec unreal bash -c 'cat >> /workspace/checkout/sample/Config/DefaultEngine.ini << "DDCEOF" + + [InstalledDerivedDataBackendGraph] + MinimumDaysToKeepFile=7 + Root=(Type=KeyLength, Length=120, Inner=AsyncPut) + AsyncPut=(Type=AsyncPut, Inner=Hierarchy) + Hierarchy=(Type=Hierarchical, Inner=Boot, Inner=Pak, Inner=EnginePak, Inner=Local, Inner=Shared) + Boot=(Type=Boot, Filename="%GAMEDIR%DerivedDataCache/Boot.ddc", MaxCacheSize=512) + Local=(Type=FileSystem, ReadOnly=false, Clean=false, Flush=false, PurgeTransient=true, DeleteUnused=true, UnusedFileAge=34, FoldersToClean=-1, Path="%GAMEDIR%DerivedDataCache", EnvPathOverride=UE-LocalDataCachePath, EditorOverrideSetting=LocalDerivedDataCache) + Shared=(Type=FileSystem, ReadOnly=false, Clean=false, Flush=false, DeleteUnused=true, UnusedFileAge=10, FoldersToClean=-1, Path="%GAMEDIR%DerivedDataCache/Shared", EnvPathOverride=UE-SharedDataCachePath, EditorOverrideSetting=SharedDerivedDataCache, CommandLineOverride=SharedDataCachePath) + Pak=(Type=ReadPak, Filename="%GAMEDIR%DerivedDataCache/DDC.ddp") + EnginePak=(Type=ReadPak, Filename=%ENGINEDIR%DerivedDataCache/Compressed.ddp) + DDCEOF + ' - name: Run tests id: run-tests @@ -179,7 +196,7 @@ jobs: -NullRHI - name: Save DDC and Cooked content to cache - if: always() + if: always() && steps.cache-content.outputs.cache-hit != 'true' uses: actions/cache/save@v4 with: path: | diff --git a/.github/workflows/test-windows.yml b/.github/workflows/test-windows.yml index a7cd5cb0d..5e36db8f6 100644 --- a/.github/workflows/test-windows.yml +++ b/.github/workflows/test-windows.yml @@ -80,6 +80,24 @@ jobs: docker exec unreal powershell -Command 'New-Item -ItemType Directory -Path "$env:USERPROFILE\AppData\Roaming\Unreal Engine\UnrealBuildTool" -Force' docker exec unreal powershell -Command 'Copy-Item -Path "C:/workspace/checkout/.github/BuildConfiguration.xml" -Destination "$env:USERPROFILE\AppData\Roaming\Unreal Engine\UnrealBuildTool\BuildConfiguration.xml" -Force' + - name: Configure project-local DDC + run: | + docker exec unreal powershell -Command @' + Add-Content -Path "C:/workspace/checkout/sample/Config/DefaultEngine.ini" -Value @" + + [InstalledDerivedDataBackendGraph] + MinimumDaysToKeepFile=7 + Root=(Type=KeyLength, Length=120, Inner=AsyncPut) + AsyncPut=(Type=AsyncPut, Inner=Hierarchy) + Hierarchy=(Type=Hierarchical, Inner=Boot, Inner=Pak, Inner=EnginePak, Inner=Local, Inner=Shared) + Boot=(Type=Boot, Filename="%GAMEDIR%DerivedDataCache/Boot.ddc", MaxCacheSize=512) + Local=(Type=FileSystem, ReadOnly=false, Clean=false, Flush=false, PurgeTransient=true, DeleteUnused=true, UnusedFileAge=34, FoldersToClean=-1, Path="%GAMEDIR%DerivedDataCache", EnvPathOverride=UE-LocalDataCachePath, EditorOverrideSetting=LocalDerivedDataCache) + Shared=(Type=FileSystem, ReadOnly=false, Clean=false, Flush=false, DeleteUnused=true, UnusedFileAge=10, FoldersToClean=-1, Path="%GAMEDIR%DerivedDataCache/Shared", EnvPathOverride=UE-SharedDataCachePath, EditorOverrideSetting=SharedDerivedDataCache, CommandLineOverride=SharedDataCachePath) + Pak=(Type=ReadPak, Filename="%GAMEDIR%DerivedDataCache/DDC.ddp") + EnginePak=(Type=ReadPak, Filename=%ENGINEDIR%DerivedDataCache/Compressed.ddp) + "@ + '@ + - name: Run tests id: run-tests env: @@ -116,7 +134,7 @@ jobs: -NullRHI - name: Save DDC and Cooked content to cache - if: always() + if: always() && steps.cache-content.outputs.cache-hit != 'true' uses: actions/cache/save@v4 with: path: | From a27ef6a1f1821bccdf723baeddc457252e8ebb31 Mon Sep 17 00:00:00 2001 From: Ivan Tustanivskyi Date: Thu, 30 Oct 2025 18:12:04 +0200 Subject: [PATCH 05/14] Test --- .github/workflows/ci.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ec151e2f9..8f40b12fa 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -161,3 +161,36 @@ jobs: uses: ./.github/workflows/test-windows.yml with: unreal-version: ${{ matrix.unreal }} + + # Run test twice to validate caching (first run populates cache, second run uses it) + test-linux-cache-validation-run1: + needs: [package-preparation] + name: Linux UE 5.1 (Cache Test - Run 1) + secrets: inherit + uses: ./.github/workflows/test-linux.yml + with: + unreal-version: '5.1' + + test-linux-cache-validation-run2: + needs: [test-linux-cache-validation-run1] + name: Linux UE 5.1 (Cache Test - Run 2) + secrets: inherit + uses: ./.github/workflows/test-linux.yml + with: + unreal-version: '5.1' + + test-windows-cache-validation-run1: + needs: [package-preparation] + name: Windows UE 5.1 (Cache Test - Run 1) + secrets: inherit + uses: ./.github/workflows/test-windows.yml + with: + unreal-version: '5.1' + + test-windows-cache-validation-run2: + needs: [test-windows-cache-validation-run1] + name: Windows UE 5.1 (Cache Test - Run 2) + secrets: inherit + uses: ./.github/workflows/test-windows.yml + with: + unreal-version: '5.1' From b1872f8a542f7eab43ce09285b9c299b409a7b95 Mon Sep 17 00:00:00 2001 From: Ivan Tustanivskyi Date: Fri, 31 Oct 2025 11:07:32 +0200 Subject: [PATCH 06/14] Clean up --- .github/workflows/ci.yml | 33 --------------- .github/workflows/test-linux.yml | 65 +++++++++++------------------- .github/workflows/test-windows.yml | 56 +++++++++---------------- 3 files changed, 43 insertions(+), 111 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8f40b12fa..ec151e2f9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -161,36 +161,3 @@ jobs: uses: ./.github/workflows/test-windows.yml with: unreal-version: ${{ matrix.unreal }} - - # Run test twice to validate caching (first run populates cache, second run uses it) - test-linux-cache-validation-run1: - needs: [package-preparation] - name: Linux UE 5.1 (Cache Test - Run 1) - secrets: inherit - uses: ./.github/workflows/test-linux.yml - with: - unreal-version: '5.1' - - test-linux-cache-validation-run2: - needs: [test-linux-cache-validation-run1] - name: Linux UE 5.1 (Cache Test - Run 2) - secrets: inherit - uses: ./.github/workflows/test-linux.yml - with: - unreal-version: '5.1' - - test-windows-cache-validation-run1: - needs: [package-preparation] - name: Windows UE 5.1 (Cache Test - Run 1) - secrets: inherit - uses: ./.github/workflows/test-windows.yml - with: - unreal-version: '5.1' - - test-windows-cache-validation-run2: - needs: [test-windows-cache-validation-run1] - name: Windows UE 5.1 (Cache Test - Run 2) - secrets: inherit - uses: ./.github/workflows/test-windows.yml - with: - unreal-version: '5.1' diff --git a/.github/workflows/test-linux.yml b/.github/workflows/test-linux.yml index 770dc82fc..942c47f73 100644 --- a/.github/workflows/test-linux.yml +++ b/.github/workflows/test-linux.yml @@ -105,28 +105,30 @@ jobs: UNREAL_VERSION: ${{ inputs.unreal-version }} run: unzip sentry-unreal-*-engine"$UNREAL_VERSION".zip -d checkout/sample/Plugins/sentry - - name: Generate cache key - id: cache-key - run: echo "key=ue-${{ inputs.unreal-version }}-linux-content-${{ hashFiles('checkout/sample/Content/**', 'checkout/sample/Config/**/*.ini', 'checkout/sample/*.uproject') }}" >> $GITHUB_OUTPUT + - name: Configure project-local DDC + run: | + cat >> checkout/sample/Config/DefaultEngine.ini << 'DDCEOF' - - name: Restore cached DDC and Cooked content - id: cache-content + [InstalledDerivedDataBackendGraph] + MinimumDaysToKeepFile=7 + Root=(Type=KeyLength, Length=120, Inner=AsyncPut) + AsyncPut=(Type=AsyncPut, Inner=Hierarchy) + Hierarchy=(Type=Hierarchical, Inner=Boot, Inner=Pak, Inner=EnginePak, Inner=Local, Inner=Shared) + Boot=(Type=Boot, Filename="%GAMEDIR%DerivedDataCache/Boot.ddc", MaxCacheSize=512) + Local=(Type=FileSystem, ReadOnly=false, Clean=false, Flush=false, PurgeTransient=true, DeleteUnused=true, UnusedFileAge=34, FoldersToClean=-1, Path="%GAMEDIR%DerivedDataCache", EnvPathOverride=UE-LocalDataCachePath, EditorOverrideSetting=LocalDerivedDataCache) + Shared=(Type=FileSystem, ReadOnly=false, Clean=false, Flush=false, DeleteUnused=true, UnusedFileAge=10, FoldersToClean=-1, Path="%GAMEDIR%DerivedDataCache/Shared", EnvPathOverride=UE-SharedDataCachePath, EditorOverrideSetting=SharedDerivedDataCache, CommandLineOverride=SharedDataCachePath) + Pak=(Type=ReadPak, Filename="%GAMEDIR%DerivedDataCache/DDC.ddp") + EnginePak=(Type=ReadPak, Filename=%ENGINEDIR%DerivedDataCache/Compressed.ddp) + DDCEOF + + - name: Restore cached DDC + id: cache-ddc uses: actions/cache/restore@v4 with: - path: | - checkout/sample/DerivedDataCache - checkout/sample/Saved/Cooked - key: ${{ steps.cache-key.outputs.key }} + path: checkout/sample/DerivedDataCache + key: ue-${{ inputs.unreal-version }}-linux-ddc-${{ hashFiles('checkout/sample/Content/**', 'checkout/sample/Config/**/*.ini', 'checkout/sample/*.uproject') }} restore-keys: | - ue-${{ inputs.unreal-version }}-linux-content- - - - name: Display cache status - run: | - if [ "${{ steps.cache-content.outputs.cache-hit }}" == "true" ]; then - echo "✓ Cache hit! Using cached DDC and cooked content." - else - echo "✗ Cache miss. Will cook content from scratch." - fi + ue-${{ inputs.unreal-version }}-linux-ddc - name: Set permissions for sample # sentry-native requires write access to sample project directory in order to initialize itself properly @@ -142,23 +144,6 @@ jobs: mkdir -p ~/.config/Unreal\ Engine/UnrealBuildTool ; cp /workspace/checkout/.github/BuildConfiguration.xml ~/.config/Unreal\ Engine/UnrealBuildTool/ " - - name: Configure project-local DDC - run: | - docker exec unreal bash -c 'cat >> /workspace/checkout/sample/Config/DefaultEngine.ini << "DDCEOF" - - [InstalledDerivedDataBackendGraph] - MinimumDaysToKeepFile=7 - Root=(Type=KeyLength, Length=120, Inner=AsyncPut) - AsyncPut=(Type=AsyncPut, Inner=Hierarchy) - Hierarchy=(Type=Hierarchical, Inner=Boot, Inner=Pak, Inner=EnginePak, Inner=Local, Inner=Shared) - Boot=(Type=Boot, Filename="%GAMEDIR%DerivedDataCache/Boot.ddc", MaxCacheSize=512) - Local=(Type=FileSystem, ReadOnly=false, Clean=false, Flush=false, PurgeTransient=true, DeleteUnused=true, UnusedFileAge=34, FoldersToClean=-1, Path="%GAMEDIR%DerivedDataCache", EnvPathOverride=UE-LocalDataCachePath, EditorOverrideSetting=LocalDerivedDataCache) - Shared=(Type=FileSystem, ReadOnly=false, Clean=false, Flush=false, DeleteUnused=true, UnusedFileAge=10, FoldersToClean=-1, Path="%GAMEDIR%DerivedDataCache/Shared", EnvPathOverride=UE-SharedDataCachePath, EditorOverrideSetting=SharedDerivedDataCache, CommandLineOverride=SharedDataCachePath) - Pak=(Type=ReadPak, Filename="%GAMEDIR%DerivedDataCache/DDC.ddp") - EnginePak=(Type=ReadPak, Filename=%ENGINEDIR%DerivedDataCache/Compressed.ddp) - DDCEOF - ' - - name: Run tests id: run-tests env: @@ -195,14 +180,12 @@ jobs: -NoSplash \ -NullRHI - - name: Save DDC and Cooked content to cache - if: always() && steps.cache-content.outputs.cache-hit != 'true' + - name: Save DDC to cache + if: success() && steps.cache-ddc.outputs.cache-hit != 'true' uses: actions/cache/save@v4 with: - path: | - checkout/sample/DerivedDataCache - checkout/sample/Saved/Cooked - key: ${{ steps.cache-key.outputs.key }} + path: checkout/sample/DerivedDataCache + key: ue-${{ inputs.unreal-version }}-linux-ddc-${{ hashFiles('checkout/sample/Content/**', 'checkout/sample/Config/**/*.ini', 'checkout/sample/*.uproject') }} - name: Collect sample test info if: ${{ always() && steps.run-tests.outcome == 'failure' }} diff --git a/.github/workflows/test-windows.yml b/.github/workflows/test-windows.yml index 5e36db8f6..9de3282eb 100644 --- a/.github/workflows/test-windows.yml +++ b/.github/workflows/test-windows.yml @@ -52,38 +52,9 @@ jobs: New-Item -ItemType Directory -Path "$env:WORKSPACE_PATH\checkout\sample\Plugins\sentry" -Force Expand-Archive -Path "sentry-unreal-*-engine$env:UNREAL_VERSION.zip" -DestinationPath "$env:WORKSPACE_PATH\checkout\sample\Plugins\sentry" -Force - - name: Generate cache key - id: cache-key - run: echo "key=ue-${{ inputs.unreal-version }}-win64-content-${{ hashFiles('checkout/sample/Content/**', 'checkout/sample/Config/**/*.ini', 'checkout/sample/*.uproject') }}" >> $env:GITHUB_OUTPUT - - - name: Restore cached DDC and Cooked content - id: cache-content - uses: actions/cache/restore@v4 - with: - path: | - checkout/sample/DerivedDataCache - checkout/sample/Saved/Cooked - key: ${{ steps.cache-key.outputs.key }} - restore-keys: | - ue-${{ inputs.unreal-version }}-win64-content- - - - name: Display cache status - run: | - if ("${{ steps.cache-content.outputs.cache-hit }}" -eq "true") { - Write-Host "✓ Cache hit! Using cached DDC and cooked content." - } else { - Write-Host "✗ Cache miss. Will cook content from scratch." - } - - - name: Update engine's build configuration - run: | - docker exec unreal powershell -Command 'New-Item -ItemType Directory -Path "$env:USERPROFILE\AppData\Roaming\Unreal Engine\UnrealBuildTool" -Force' - docker exec unreal powershell -Command 'Copy-Item -Path "C:/workspace/checkout/.github/BuildConfiguration.xml" -Destination "$env:USERPROFILE\AppData\Roaming\Unreal Engine\UnrealBuildTool\BuildConfiguration.xml" -Force' - - name: Configure project-local DDC run: | - docker exec unreal powershell -Command @' - Add-Content -Path "C:/workspace/checkout/sample/Config/DefaultEngine.ini" -Value @" + Add-Content -Path "checkout/sample/Config/DefaultEngine.ini" -Value @" [InstalledDerivedDataBackendGraph] MinimumDaysToKeepFile=7 @@ -96,7 +67,20 @@ jobs: Pak=(Type=ReadPak, Filename="%GAMEDIR%DerivedDataCache/DDC.ddp") EnginePak=(Type=ReadPak, Filename=%ENGINEDIR%DerivedDataCache/Compressed.ddp) "@ - '@ + + - name: Restore cached DDC + id: cache-ddc + uses: actions/cache/restore@v4 + with: + path: checkout/sample/DerivedDataCache + key: ue-${{ inputs.unreal-version }}-win64-ddc-${{ hashFiles('checkout/sample/Content/**', 'checkout/sample/Config/**/*.ini', 'checkout/sample/*.uproject') }} + restore-keys: | + ue-${{ inputs.unreal-version }}-win64-ddc + + - name: Update engine's build configuration + run: | + docker exec unreal powershell -Command 'New-Item -ItemType Directory -Path "$env:USERPROFILE\AppData\Roaming\Unreal Engine\UnrealBuildTool" -Force' + docker exec unreal powershell -Command 'Copy-Item -Path "C:/workspace/checkout/.github/BuildConfiguration.xml" -Destination "$env:USERPROFILE\AppData\Roaming\Unreal Engine\UnrealBuildTool\BuildConfiguration.xml" -Force' - name: Run tests id: run-tests @@ -133,14 +117,12 @@ jobs: -NoSplash ` -NullRHI - - name: Save DDC and Cooked content to cache - if: always() && steps.cache-content.outputs.cache-hit != 'true' + - name: Save DDC to cache + if: success() && steps.cache-ddc.outputs.cache-hit != 'true' uses: actions/cache/save@v4 with: - path: | - checkout/sample/DerivedDataCache - checkout/sample/Saved/Cooked - key: ${{ steps.cache-key.outputs.key }} + path: checkout/sample/DerivedDataCache + key: ue-${{ inputs.unreal-version }}-win64-ddc-${{ hashFiles('checkout/sample/Content/**', 'checkout/sample/Config/**/*.ini', 'checkout/sample/*.uproject') }} - name: Collect sample test info if: ${{ always() && steps.run-tests.outcome == 'failure' }} From 1c3c5ebd22745406ef6a9a19e6ac18c45d57f966 Mon Sep 17 00:00:00 2001 From: Ivan Tustanivskyi Date: Fri, 31 Oct 2025 13:30:44 +0200 Subject: [PATCH 07/14] Update SentryPlaygroundGameInstance.cpp --- sample/Source/SentryPlayground/SentryPlaygroundGameInstance.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/sample/Source/SentryPlayground/SentryPlaygroundGameInstance.cpp b/sample/Source/SentryPlayground/SentryPlaygroundGameInstance.cpp index b2e5b42f7..63c28023c 100644 --- a/sample/Source/SentryPlayground/SentryPlaygroundGameInstance.cpp +++ b/sample/Source/SentryPlayground/SentryPlaygroundGameInstance.cpp @@ -15,8 +15,6 @@ void USentryPlaygroundGameInstance::Init() { Super::Init(); - UE_LOG(LogSentrySample, Log, TEXT("TEST")); - const TCHAR* CommandLine = FCommandLine::Get(); // Check for expected test parameters to decide between running integration tests From b7cd853ae4115bd5f08925987a1175d4fa471089 Mon Sep 17 00:00:00 2001 From: Ivan Tustanivskyi Date: Fri, 31 Oct 2025 13:43:02 +0200 Subject: [PATCH 08/14] Move DDC config to a separate script --- .github/workflows/test-linux.yml | 16 ++-------- .github/workflows/test-windows.yml | 16 ++-------- scripts/configure-local-ddc.ps1 | 51 ++++++++++++++++++++++++++++++ 3 files changed, 55 insertions(+), 28 deletions(-) create mode 100644 scripts/configure-local-ddc.ps1 diff --git a/.github/workflows/test-linux.yml b/.github/workflows/test-linux.yml index 942c47f73..7581d1c1b 100644 --- a/.github/workflows/test-linux.yml +++ b/.github/workflows/test-linux.yml @@ -106,20 +106,8 @@ jobs: run: unzip sentry-unreal-*-engine"$UNREAL_VERSION".zip -d checkout/sample/Plugins/sentry - name: Configure project-local DDC - run: | - cat >> checkout/sample/Config/DefaultEngine.ini << 'DDCEOF' - - [InstalledDerivedDataBackendGraph] - MinimumDaysToKeepFile=7 - Root=(Type=KeyLength, Length=120, Inner=AsyncPut) - AsyncPut=(Type=AsyncPut, Inner=Hierarchy) - Hierarchy=(Type=Hierarchical, Inner=Boot, Inner=Pak, Inner=EnginePak, Inner=Local, Inner=Shared) - Boot=(Type=Boot, Filename="%GAMEDIR%DerivedDataCache/Boot.ddc", MaxCacheSize=512) - Local=(Type=FileSystem, ReadOnly=false, Clean=false, Flush=false, PurgeTransient=true, DeleteUnused=true, UnusedFileAge=34, FoldersToClean=-1, Path="%GAMEDIR%DerivedDataCache", EnvPathOverride=UE-LocalDataCachePath, EditorOverrideSetting=LocalDerivedDataCache) - Shared=(Type=FileSystem, ReadOnly=false, Clean=false, Flush=false, DeleteUnused=true, UnusedFileAge=10, FoldersToClean=-1, Path="%GAMEDIR%DerivedDataCache/Shared", EnvPathOverride=UE-SharedDataCachePath, EditorOverrideSetting=SharedDerivedDataCache, CommandLineOverride=SharedDataCachePath) - Pak=(Type=ReadPak, Filename="%GAMEDIR%DerivedDataCache/DDC.ddp") - EnginePak=(Type=ReadPak, Filename=%ENGINEDIR%DerivedDataCache/Compressed.ddp) - DDCEOF + shell: pwsh + run: ./checkout/scripts/configure-local-ddc.ps1 -ProjectPath checkout/sample - name: Restore cached DDC id: cache-ddc diff --git a/.github/workflows/test-windows.yml b/.github/workflows/test-windows.yml index 9de3282eb..e65e3cd31 100644 --- a/.github/workflows/test-windows.yml +++ b/.github/workflows/test-windows.yml @@ -53,20 +53,8 @@ jobs: Expand-Archive -Path "sentry-unreal-*-engine$env:UNREAL_VERSION.zip" -DestinationPath "$env:WORKSPACE_PATH\checkout\sample\Plugins\sentry" -Force - name: Configure project-local DDC - run: | - Add-Content -Path "checkout/sample/Config/DefaultEngine.ini" -Value @" - - [InstalledDerivedDataBackendGraph] - MinimumDaysToKeepFile=7 - Root=(Type=KeyLength, Length=120, Inner=AsyncPut) - AsyncPut=(Type=AsyncPut, Inner=Hierarchy) - Hierarchy=(Type=Hierarchical, Inner=Boot, Inner=Pak, Inner=EnginePak, Inner=Local, Inner=Shared) - Boot=(Type=Boot, Filename="%GAMEDIR%DerivedDataCache/Boot.ddc", MaxCacheSize=512) - Local=(Type=FileSystem, ReadOnly=false, Clean=false, Flush=false, PurgeTransient=true, DeleteUnused=true, UnusedFileAge=34, FoldersToClean=-1, Path="%GAMEDIR%DerivedDataCache", EnvPathOverride=UE-LocalDataCachePath, EditorOverrideSetting=LocalDerivedDataCache) - Shared=(Type=FileSystem, ReadOnly=false, Clean=false, Flush=false, DeleteUnused=true, UnusedFileAge=10, FoldersToClean=-1, Path="%GAMEDIR%DerivedDataCache/Shared", EnvPathOverride=UE-SharedDataCachePath, EditorOverrideSetting=SharedDerivedDataCache, CommandLineOverride=SharedDataCachePath) - Pak=(Type=ReadPak, Filename="%GAMEDIR%DerivedDataCache/DDC.ddp") - EnginePak=(Type=ReadPak, Filename=%ENGINEDIR%DerivedDataCache/Compressed.ddp) - "@ + shell: pwsh + run: ./checkout/scripts/configure-local-ddc.ps1 -ProjectPath checkout/sample - name: Restore cached DDC id: cache-ddc diff --git a/scripts/configure-local-ddc.ps1 b/scripts/configure-local-ddc.ps1 new file mode 100644 index 000000000..9457630e3 --- /dev/null +++ b/scripts/configure-local-ddc.ps1 @@ -0,0 +1,51 @@ +#!/usr/bin/env pwsh +<# +.SYNOPSIS + Configures Unreal Engine to use project-local Derived Data Cache (DDC). + +.DESCRIPTION + This script modifies the project's DefaultEngine.ini to add DDC configuration + that forces Unreal to store the DDC within the project directory instead of + the user's home directory. This enables DDC caching in CI environments. + +.PARAMETER ProjectPath + Path to the Unreal project directory containing Config/DefaultEngine.ini + +.EXAMPLE + ./configure-local-ddc.ps1 -ProjectPath "sample" +#> + +param( + [Parameter(Mandatory=$true)] + [string]$ProjectPath +) + +$ErrorActionPreference = "Stop" + +$configPath = Join-Path $ProjectPath "Config/DefaultEngine.ini" + +if (-not (Test-Path $configPath)) { + Write-Error "DefaultEngine.ini not found at: $configPath" + exit 1 +} + +Write-Host "Configuring project-local DDC for: $ProjectPath" + +$ddcConfig = @" + +[InstalledDerivedDataBackendGraph] +MinimumDaysToKeepFile=7 +Root=(Type=KeyLength, Length=120, Inner=AsyncPut) +AsyncPut=(Type=AsyncPut, Inner=Hierarchy) +Hierarchy=(Type=Hierarchical, Inner=Boot, Inner=Pak, Inner=EnginePak, Inner=Local, Inner=Shared) +Boot=(Type=Boot, Filename="%GAMEDIR%DerivedDataCache/Boot.ddc", MaxCacheSize=512) +Local=(Type=FileSystem, ReadOnly=false, Clean=false, Flush=false, PurgeTransient=true, DeleteUnused=true, UnusedFileAge=34, FoldersToClean=-1, Path="%GAMEDIR%DerivedDataCache", EnvPathOverride=UE-LocalDataCachePath, EditorOverrideSetting=LocalDerivedDataCache) +Shared=(Type=FileSystem, ReadOnly=false, Clean=false, Flush=false, DeleteUnused=true, UnusedFileAge=10, FoldersToClean=-1, Path="%GAMEDIR%DerivedDataCache/Shared", EnvPathOverride=UE-SharedDataCachePath, EditorOverrideSetting=SharedDerivedDataCache, CommandLineOverride=SharedDataCachePath) +Pak=(Type=ReadPak, Filename="%GAMEDIR%DerivedDataCache/DDC.ddp") +EnginePak=(Type=ReadPak, Filename=%ENGINEDIR%DerivedDataCache/Compressed.ddp) +"@ + +Add-Content -Path $configPath -Value $ddcConfig + +Write-Host "✓ DDC configuration added to $configPath" +Write-Host " DDC will be stored at: /DerivedDataCache/" From 299d82836a4922bf4d333b0ed48e0cc32e0080ed Mon Sep 17 00:00:00 2001 From: Ivan Tustanivskyi Date: Fri, 31 Oct 2025 14:48:19 +0200 Subject: [PATCH 09/14] Fix warning --- .github/workflows/test-linux.yml | 2 +- .github/workflows/test-windows.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-linux.yml b/.github/workflows/test-linux.yml index 7581d1c1b..d303ecc1d 100644 --- a/.github/workflows/test-linux.yml +++ b/.github/workflows/test-linux.yml @@ -169,7 +169,7 @@ jobs: -NullRHI - name: Save DDC to cache - if: success() && steps.cache-ddc.outputs.cache-hit != 'true' + if: ${{ success() && steps.cache-ddc.outputs.cache-hit != 'true' }} uses: actions/cache/save@v4 with: path: checkout/sample/DerivedDataCache diff --git a/.github/workflows/test-windows.yml b/.github/workflows/test-windows.yml index e65e3cd31..c26085dae 100644 --- a/.github/workflows/test-windows.yml +++ b/.github/workflows/test-windows.yml @@ -106,7 +106,7 @@ jobs: -NullRHI - name: Save DDC to cache - if: success() && steps.cache-ddc.outputs.cache-hit != 'true' + if: ${{ success() && steps.cache-ddc.outputs.cache-hit != 'true' }} uses: actions/cache/save@v4 with: path: checkout/sample/DerivedDataCache From dc78b92b103d6f4abbe101393afdcc7516a7cde0 Mon Sep 17 00:00:00 2001 From: Ivan Tustanivskyi Date: Fri, 31 Oct 2025 15:12:54 +0200 Subject: [PATCH 10/14] Test --- .github/workflows/test-linux.yml | 10 ++++++++++ .github/workflows/test-windows.yml | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/.github/workflows/test-linux.yml b/.github/workflows/test-linux.yml index d303ecc1d..32a259803 100644 --- a/.github/workflows/test-linux.yml +++ b/.github/workflows/test-linux.yml @@ -109,6 +109,10 @@ jobs: shell: pwsh run: ./checkout/scripts/configure-local-ddc.ps1 -ProjectPath checkout/sample + - name: Debug - Show cache key + run: | + echo "Cache key will be: ue-${{ inputs.unreal-version }}-linux-ddc-${{ hashFiles('checkout/sample/Content/**', 'checkout/sample/Config/**/*.ini', 'checkout/sample/*.uproject') }}" + - name: Restore cached DDC id: cache-ddc uses: actions/cache/restore@v4 @@ -118,6 +122,12 @@ jobs: restore-keys: | ue-${{ inputs.unreal-version }}-linux-ddc + - name: Debug - Cache restore result + run: | + echo "Cache hit: '${{ steps.cache-ddc.outputs.cache-hit }}'" + echo "Cache matched key: '${{ steps.cache-ddc.outputs.cache-matched-key }}'" + echo "Will skip save: ${{ steps.cache-ddc.outputs.cache-hit == 'true' }}" + - name: Set permissions for sample # sentry-native requires write access to sample project directory in order to initialize itself properly run: docker exec -w /workspace/checkout unreal chmod -R +x sample diff --git a/.github/workflows/test-windows.yml b/.github/workflows/test-windows.yml index c26085dae..1fce7ef18 100644 --- a/.github/workflows/test-windows.yml +++ b/.github/workflows/test-windows.yml @@ -56,6 +56,10 @@ jobs: shell: pwsh run: ./checkout/scripts/configure-local-ddc.ps1 -ProjectPath checkout/sample + - name: Debug - Show cache key + run: | + echo "Cache key will be: ue-${{ inputs.unreal-version }}-win64-ddc-${{ hashFiles('checkout/sample/Content/**', 'checkout/sample/Config/**/*.ini', 'checkout/sample/*.uproject') }}" + - name: Restore cached DDC id: cache-ddc uses: actions/cache/restore@v4 @@ -65,6 +69,12 @@ jobs: restore-keys: | ue-${{ inputs.unreal-version }}-win64-ddc + - name: Debug - Cache restore result + run: | + echo "Cache hit: '${{ steps.cache-ddc.outputs.cache-hit }}'" + echo "Cache matched key: '${{ steps.cache-ddc.outputs.cache-matched-key }}'" + echo "Will skip save: ${{ steps.cache-ddc.outputs.cache-hit == 'true' }}" + - name: Update engine's build configuration run: | docker exec unreal powershell -Command 'New-Item -ItemType Directory -Path "$env:USERPROFILE\AppData\Roaming\Unreal Engine\UnrealBuildTool" -Force' From 93b3c8c8bde2dd40b7416f5eaf44ed9c626e7514 Mon Sep 17 00:00:00 2001 From: Ivan Tustanivskyi Date: Fri, 31 Oct 2025 15:45:05 +0200 Subject: [PATCH 11/14] Test --- .github/workflows/test-linux.yml | 22 ++++++++++------------ .github/workflows/test-windows.yml | 22 ++++++++++------------ 2 files changed, 20 insertions(+), 24 deletions(-) diff --git a/.github/workflows/test-linux.yml b/.github/workflows/test-linux.yml index 32a259803..707a78608 100644 --- a/.github/workflows/test-linux.yml +++ b/.github/workflows/test-linux.yml @@ -105,29 +105,27 @@ jobs: UNREAL_VERSION: ${{ inputs.unreal-version }} run: unzip sentry-unreal-*-engine"$UNREAL_VERSION".zip -d checkout/sample/Plugins/sentry + - name: Compute DDC cache key + id: ddc-cache-key + run: | + HASH="${{ hashFiles('checkout/sample/Content/**', 'checkout/sample/Config/**/*.ini', 'checkout/sample/*.uproject') }}" + KEY="ue-${{ inputs.unreal-version }}-linux-ddc-${HASH}" + echo "key=${KEY}" >> $GITHUB_OUTPUT + echo "DDC cache key: ${KEY}" + - name: Configure project-local DDC shell: pwsh run: ./checkout/scripts/configure-local-ddc.ps1 -ProjectPath checkout/sample - - name: Debug - Show cache key - run: | - echo "Cache key will be: ue-${{ inputs.unreal-version }}-linux-ddc-${{ hashFiles('checkout/sample/Content/**', 'checkout/sample/Config/**/*.ini', 'checkout/sample/*.uproject') }}" - - name: Restore cached DDC id: cache-ddc uses: actions/cache/restore@v4 with: path: checkout/sample/DerivedDataCache - key: ue-${{ inputs.unreal-version }}-linux-ddc-${{ hashFiles('checkout/sample/Content/**', 'checkout/sample/Config/**/*.ini', 'checkout/sample/*.uproject') }} + key: ${{ steps.ddc-cache-key.outputs.key }} restore-keys: | ue-${{ inputs.unreal-version }}-linux-ddc - - name: Debug - Cache restore result - run: | - echo "Cache hit: '${{ steps.cache-ddc.outputs.cache-hit }}'" - echo "Cache matched key: '${{ steps.cache-ddc.outputs.cache-matched-key }}'" - echo "Will skip save: ${{ steps.cache-ddc.outputs.cache-hit == 'true' }}" - - name: Set permissions for sample # sentry-native requires write access to sample project directory in order to initialize itself properly run: docker exec -w /workspace/checkout unreal chmod -R +x sample @@ -183,7 +181,7 @@ jobs: uses: actions/cache/save@v4 with: path: checkout/sample/DerivedDataCache - key: ue-${{ inputs.unreal-version }}-linux-ddc-${{ hashFiles('checkout/sample/Content/**', 'checkout/sample/Config/**/*.ini', 'checkout/sample/*.uproject') }} + key: ${{ steps.ddc-cache-key.outputs.key }} - name: Collect sample test info if: ${{ always() && steps.run-tests.outcome == 'failure' }} diff --git a/.github/workflows/test-windows.yml b/.github/workflows/test-windows.yml index 1fce7ef18..c029fe72f 100644 --- a/.github/workflows/test-windows.yml +++ b/.github/workflows/test-windows.yml @@ -52,29 +52,27 @@ jobs: New-Item -ItemType Directory -Path "$env:WORKSPACE_PATH\checkout\sample\Plugins\sentry" -Force Expand-Archive -Path "sentry-unreal-*-engine$env:UNREAL_VERSION.zip" -DestinationPath "$env:WORKSPACE_PATH\checkout\sample\Plugins\sentry" -Force + - name: Compute DDC cache key + id: ddc-cache-key + run: | + $hash = "${{ hashFiles('checkout/sample/Content/**', 'checkout/sample/Config/**/*.ini', 'checkout/sample/*.uproject') }}" + $key = "ue-${{ inputs.unreal-version }}-win64-ddc-${hash}" + echo "key=${key}" >> $env:GITHUB_OUTPUT + echo "DDC cache key: ${key}" + - name: Configure project-local DDC shell: pwsh run: ./checkout/scripts/configure-local-ddc.ps1 -ProjectPath checkout/sample - - name: Debug - Show cache key - run: | - echo "Cache key will be: ue-${{ inputs.unreal-version }}-win64-ddc-${{ hashFiles('checkout/sample/Content/**', 'checkout/sample/Config/**/*.ini', 'checkout/sample/*.uproject') }}" - - name: Restore cached DDC id: cache-ddc uses: actions/cache/restore@v4 with: path: checkout/sample/DerivedDataCache - key: ue-${{ inputs.unreal-version }}-win64-ddc-${{ hashFiles('checkout/sample/Content/**', 'checkout/sample/Config/**/*.ini', 'checkout/sample/*.uproject') }} + key: ${{ steps.ddc-cache-key.outputs.key }} restore-keys: | ue-${{ inputs.unreal-version }}-win64-ddc - - name: Debug - Cache restore result - run: | - echo "Cache hit: '${{ steps.cache-ddc.outputs.cache-hit }}'" - echo "Cache matched key: '${{ steps.cache-ddc.outputs.cache-matched-key }}'" - echo "Will skip save: ${{ steps.cache-ddc.outputs.cache-hit == 'true' }}" - - name: Update engine's build configuration run: | docker exec unreal powershell -Command 'New-Item -ItemType Directory -Path "$env:USERPROFILE\AppData\Roaming\Unreal Engine\UnrealBuildTool" -Force' @@ -120,7 +118,7 @@ jobs: uses: actions/cache/save@v4 with: path: checkout/sample/DerivedDataCache - key: ue-${{ inputs.unreal-version }}-win64-ddc-${{ hashFiles('checkout/sample/Content/**', 'checkout/sample/Config/**/*.ini', 'checkout/sample/*.uproject') }} + key: ${{ steps.ddc-cache-key.outputs.key }} - name: Collect sample test info if: ${{ always() && steps.run-tests.outcome == 'failure' }} From 158245eeeb2f7d3921997c1c072b9afe0a23375c Mon Sep 17 00:00:00 2001 From: Ivan Tustanivskyi Date: Fri, 31 Oct 2025 16:21:42 +0200 Subject: [PATCH 12/14] Test squash docker images --- .github/workflows/test-linux.yml | 32 ++++++++++++++++++++++++++++-- .github/workflows/test-windows.yml | 31 +++++++++++++++++++++++++++-- 2 files changed, 59 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test-linux.yml b/.github/workflows/test-linux.yml index 707a78608..4b7a03755 100644 --- a/.github/workflows/test-linux.yml +++ b/.github/workflows/test-linux.yml @@ -11,7 +11,7 @@ env: jobs: test: name: Test - runs-on: ubuntu-latest + runs-on: ubuntu-latest-4-cores steps: - name: Free disk space @@ -44,6 +44,34 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + - name: Install docker-squash + run: | + sudo apt-get update + sudo apt-get install -y python3-pip + pip3 install docker-squash + + - name: Pull and squash UE Docker image + env: + UNREAL_VERSION: ${{ inputs.unreal-version }} + run: | + IMAGE_NAME="ghcr.io/getsentry/unreal-docker:${UNREAL_VERSION}-linux" + SQUASHED_TAG="${UNREAL_VERSION}-linux-squashed" + + echo "Pulling image: ${IMAGE_NAME}" + docker pull "${IMAGE_NAME}" + + echo "Image size before squashing:" + docker images "${IMAGE_NAME}" --format "table {{.Repository}}\t{{.Tag}}\t{{.Size}}" + + echo "Squashing image..." + docker-squash -t "ghcr.io/getsentry/unreal-docker:${SQUASHED_TAG}" "${IMAGE_NAME}" + + echo "Image size after squashing:" + docker images "ghcr.io/getsentry/unreal-docker:${SQUASHED_TAG}" --format "table {{.Repository}}\t{{.Tag}}\t{{.Size}}" + + echo "Removing original image to save space" + docker rmi "${IMAGE_NAME}" + - name: Start Docker container env: WORKSPACE_PATH: ${{ github.workspace }} @@ -66,7 +94,7 @@ jobs: --env PATH="/home/$user/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" \ --env DISALLOW_RAW_POINTERS=$DISALLOW_RAW_POINTERS \ --network ip6net -p 80:80 \ - ghcr.io/getsentry/unreal-docker:"$UNREAL_VERSION"-linux + ghcr.io/getsentry/unreal-docker:"$UNREAL_VERSION"-linux-squashed 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 diff --git a/.github/workflows/test-windows.yml b/.github/workflows/test-windows.yml index c029fe72f..6e3af600b 100644 --- a/.github/workflows/test-windows.yml +++ b/.github/workflows/test-windows.yml @@ -11,7 +11,7 @@ env: jobs: test: name: Test - runs-on: windows-2022 + runs-on: windows-latest-4-cores steps: - name: Log in to GitHub package registry @@ -21,6 +21,33 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + - name: Install docker-squash + run: | + python -m pip install --upgrade pip + pip install docker-squash + + - name: Pull and squash UE Docker image + env: + UNREAL_VERSION: ${{ inputs.unreal-version }} + run: | + $imageName = "ghcr.io/getsentry/unreal-docker:$env:UNREAL_VERSION" + $squashedTag = "$env:UNREAL_VERSION-squashed" + + Write-Host "Pulling image: $imageName" + docker pull $imageName + + Write-Host "Image size before squashing:" + docker images $imageName --format "table {{.Repository}}\t{{.Tag}}\t{{.Size}}" + + Write-Host "Squashing image..." + docker-squash -t "ghcr.io/getsentry/unreal-docker:$squashedTag" $imageName + + Write-Host "Image size after squashing:" + docker images "ghcr.io/getsentry/unreal-docker:$squashedTag" --format "table {{.Repository}}\t{{.Tag}}\t{{.Size}}" + + Write-Host "Removing original image to save space" + docker rmi $imageName + - name: Start Docker container env: WORKSPACE_PATH: ${{ github.workspace }} @@ -32,7 +59,7 @@ jobs: --volume "${env:WORKSPACE_PATH}:C:/workspace" ` --workdir C:/workspace ` --env DISALLOW_RAW_POINTERS=${env:DISALLOW_RAW_POINTERS} ` - ghcr.io/getsentry/unreal-docker:"$env:UNREAL_VERSION" + ghcr.io/getsentry/unreal-docker:"$env:UNREAL_VERSION-squashed" - name: Download package uses: actions/download-artifact@v4 From fe1c7f11268df15fd71f80049539c9d08def4763 Mon Sep 17 00:00:00 2001 From: Ivan Tustanivskyi Date: Fri, 31 Oct 2025 18:01:20 +0200 Subject: [PATCH 13/14] Revert "Test squash docker images" This reverts commit 158245eeeb2f7d3921997c1c072b9afe0a23375c. --- .github/workflows/test-linux.yml | 32 ++---------------------------- .github/workflows/test-windows.yml | 31 ++--------------------------- 2 files changed, 4 insertions(+), 59 deletions(-) diff --git a/.github/workflows/test-linux.yml b/.github/workflows/test-linux.yml index 4b7a03755..707a78608 100644 --- a/.github/workflows/test-linux.yml +++ b/.github/workflows/test-linux.yml @@ -11,7 +11,7 @@ env: jobs: test: name: Test - runs-on: ubuntu-latest-4-cores + runs-on: ubuntu-latest steps: - name: Free disk space @@ -44,34 +44,6 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Install docker-squash - run: | - sudo apt-get update - sudo apt-get install -y python3-pip - pip3 install docker-squash - - - name: Pull and squash UE Docker image - env: - UNREAL_VERSION: ${{ inputs.unreal-version }} - run: | - IMAGE_NAME="ghcr.io/getsentry/unreal-docker:${UNREAL_VERSION}-linux" - SQUASHED_TAG="${UNREAL_VERSION}-linux-squashed" - - echo "Pulling image: ${IMAGE_NAME}" - docker pull "${IMAGE_NAME}" - - echo "Image size before squashing:" - docker images "${IMAGE_NAME}" --format "table {{.Repository}}\t{{.Tag}}\t{{.Size}}" - - echo "Squashing image..." - docker-squash -t "ghcr.io/getsentry/unreal-docker:${SQUASHED_TAG}" "${IMAGE_NAME}" - - echo "Image size after squashing:" - docker images "ghcr.io/getsentry/unreal-docker:${SQUASHED_TAG}" --format "table {{.Repository}}\t{{.Tag}}\t{{.Size}}" - - echo "Removing original image to save space" - docker rmi "${IMAGE_NAME}" - - name: Start Docker container env: WORKSPACE_PATH: ${{ github.workspace }} @@ -94,7 +66,7 @@ jobs: --env PATH="/home/$user/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" \ --env DISALLOW_RAW_POINTERS=$DISALLOW_RAW_POINTERS \ --network ip6net -p 80:80 \ - ghcr.io/getsentry/unreal-docker:"$UNREAL_VERSION"-linux-squashed + ghcr.io/getsentry/unreal-docker:"$UNREAL_VERSION"-linux 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 diff --git a/.github/workflows/test-windows.yml b/.github/workflows/test-windows.yml index 6e3af600b..c029fe72f 100644 --- a/.github/workflows/test-windows.yml +++ b/.github/workflows/test-windows.yml @@ -11,7 +11,7 @@ env: jobs: test: name: Test - runs-on: windows-latest-4-cores + runs-on: windows-2022 steps: - name: Log in to GitHub package registry @@ -21,33 +21,6 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Install docker-squash - run: | - python -m pip install --upgrade pip - pip install docker-squash - - - name: Pull and squash UE Docker image - env: - UNREAL_VERSION: ${{ inputs.unreal-version }} - run: | - $imageName = "ghcr.io/getsentry/unreal-docker:$env:UNREAL_VERSION" - $squashedTag = "$env:UNREAL_VERSION-squashed" - - Write-Host "Pulling image: $imageName" - docker pull $imageName - - Write-Host "Image size before squashing:" - docker images $imageName --format "table {{.Repository}}\t{{.Tag}}\t{{.Size}}" - - Write-Host "Squashing image..." - docker-squash -t "ghcr.io/getsentry/unreal-docker:$squashedTag" $imageName - - Write-Host "Image size after squashing:" - docker images "ghcr.io/getsentry/unreal-docker:$squashedTag" --format "table {{.Repository}}\t{{.Tag}}\t{{.Size}}" - - Write-Host "Removing original image to save space" - docker rmi $imageName - - name: Start Docker container env: WORKSPACE_PATH: ${{ github.workspace }} @@ -59,7 +32,7 @@ jobs: --volume "${env:WORKSPACE_PATH}:C:/workspace" ` --workdir C:/workspace ` --env DISALLOW_RAW_POINTERS=${env:DISALLOW_RAW_POINTERS} ` - ghcr.io/getsentry/unreal-docker:"$env:UNREAL_VERSION-squashed" + ghcr.io/getsentry/unreal-docker:"$env:UNREAL_VERSION" - name: Download package uses: actions/download-artifact@v4 From d8dea845b805e1b14d8b84f8f844b7018b7d3a37 Mon Sep 17 00:00:00 2001 From: Ivan Tustanivskyi Date: Mon, 3 Nov 2025 15:38:27 +0200 Subject: [PATCH 14/14] Add missing quotes --- scripts/configure-local-ddc.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/configure-local-ddc.ps1 b/scripts/configure-local-ddc.ps1 index 9457630e3..12b28b939 100644 --- a/scripts/configure-local-ddc.ps1 +++ b/scripts/configure-local-ddc.ps1 @@ -42,7 +42,7 @@ Boot=(Type=Boot, Filename="%GAMEDIR%DerivedDataCache/Boot.ddc", MaxCacheSize=512 Local=(Type=FileSystem, ReadOnly=false, Clean=false, Flush=false, PurgeTransient=true, DeleteUnused=true, UnusedFileAge=34, FoldersToClean=-1, Path="%GAMEDIR%DerivedDataCache", EnvPathOverride=UE-LocalDataCachePath, EditorOverrideSetting=LocalDerivedDataCache) Shared=(Type=FileSystem, ReadOnly=false, Clean=false, Flush=false, DeleteUnused=true, UnusedFileAge=10, FoldersToClean=-1, Path="%GAMEDIR%DerivedDataCache/Shared", EnvPathOverride=UE-SharedDataCachePath, EditorOverrideSetting=SharedDerivedDataCache, CommandLineOverride=SharedDataCachePath) Pak=(Type=ReadPak, Filename="%GAMEDIR%DerivedDataCache/DDC.ddp") -EnginePak=(Type=ReadPak, Filename=%ENGINEDIR%DerivedDataCache/Compressed.ddp) +EnginePak=(Type=ReadPak, Filename="%ENGINEDIR%DerivedDataCache/Compressed.ddp") "@ Add-Content -Path $configPath -Value $ddcConfig