Skip to content

Commit

Permalink
chore: Add UE 4.27, 5.0 and 5.1 to CI pipeline (#675)
Browse files Browse the repository at this point in the history
* Wrap engine version-specific code

* Recreate blueprint assets in UE 4.27

* Add older UE versions to CI pipeline

* Fix yml syntax error

* Fix chown docker container paths

* Add nissing uid for chow command

* Fix header name

* Another fix

* Fix editor executable name

* Update changelog
  • Loading branch information
tustanivsky authored Nov 2, 2024
1 parent 9f6b1e8 commit cccb17c
Show file tree
Hide file tree
Showing 13 changed files with 27 additions and 13 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ jobs:
fail-fast: false
matrix:
# Note: these versions must match scripts/packaging/engine-versions.txt
unreal: ['5.2', '5.3', '5.4']
unreal: ['4.27', '5.0', '5.1', '5.2', '5.3', '5.4']
app: ['sample']

steps:
Expand Down Expand Up @@ -183,11 +183,15 @@ jobs:
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.
# 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.
- name: Chown Docker container paths
run: |
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/Binaries/ThirdParty/DotNet "
chown -R $uid /home/ue4/UnrealEngine/Engine/${{ matrix.unreal == '4.27' && 'Programs/UnrealPak/Saved' || 'Binaries/ThirdParty/DotNet' }} "
- name: Setup C++ runtime
run: docker exec --user root unreal bash -c '
Expand Down Expand Up @@ -226,7 +230,7 @@ jobs:
-archive
docker exec -w /workspace/checkout/${{ matrix.app }} unreal bash -c "
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 \
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 \
-ExecCmds="Automation RunTests Sentry;quit" \
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
### Features

- Assertions now print their callstack a log file ([#637](https://github.com/getsentry/sentry-unreal/pull/637))
- Add UE 4.27, 5.0 and 5.1 to CI pipeline ([#675](https://github.com/getsentry/sentry-unreal/pull/675))

### Dependencies

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ void PrintVerboseLog(sentry_level_t level, const char *message, va_list args, vo

void PrintCrashLog(const sentry_ucontext_t *uctx)
{
#if PLATFORM_WINDOWS
#if PLATFORM_WINDOWS && ENGINE_MAJOR_VERSION == 5

SentryConvertorsDesktop::SentryCrashContextToString(uctx, GErrorExceptionDescription, UE_ARRAY_COUNT(GErrorExceptionDescription));

Expand Down
2 changes: 1 addition & 1 deletion plugin-dev/Source/Sentry/Private/SentryOutputDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ bool FSentryOutputDevice::CanBeUsedOnMultipleThreads() const
return true;
}

#if ENGINE_MAJOR_VERSION >= 5
#if ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1
bool FSentryOutputDevice::CanBeUsedOnPanicThread() const
{
return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ bool SentryScreenshotUtils::CaptureScreenshot(const FString& ScreenshotSavePath)
return false;
}

#if ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1
#if ENGINE_MAJOR_VERSION == 5
GetHighResScreenshotConfig().MergeMaskIntoAlpha(Bitmap, FIntRect());
TArray64<uint8> CompressedBitmap;
FImageUtils::PNGCompressImageArray(ViewportSize.X, ViewportSize.Y, Bitmap, CompressedBitmap);
Expand Down
2 changes: 1 addition & 1 deletion plugin-dev/Source/Sentry/Public/SentryOutputDevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class FSentryOutputDevice : public FOutputDevice
virtual bool CanBeUsedOnAnyThread() const override;
virtual bool CanBeUsedOnMultipleThreads() const override;

#if ENGINE_MAJOR_VERSION >= 5
#if ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1
virtual bool CanBeUsedOnPanicThread() const override;
#endif
};
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include "PropertyHandle.h"
#include "Framework/Notifications/NotificationManager.h"
#include "HAL/FileManager.h"
#include "HAL/PlatformFileManager.h"

#include "Interfaces/IPluginManager.h"
#include "Runtime/Launch/Resources/Version.h"

Expand All @@ -35,6 +35,12 @@
#include "EditorStyleSet.h"
#endif

#if ENGINE_MAJOR_VERSION >= 5
#include "HAL/PlatformFileManager.h"
#else
#include "HAL/PlatformFilemanager.h"
#endif

const FString FSentrySettingsCustomization::DefaultCrcEndpoint = TEXT("https://datarouter.ol.epicgames.com/datarouter/api/v1/public/data");

void OnDocumentationLinkClicked(const FSlateHyperlinkRun::FMetadata& Metadata);
Expand Down
4 changes: 2 additions & 2 deletions sample/Config/DefaultInput.ini
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ DefaultViewportMouseCaptureMode=CapturePermanently_IncludingInitialMouseDown
DefaultViewportMouseLockMode=LockOnCapture
FOVScale=0.011110
DoubleClickTime=0.200000
DefaultPlayerInputClass=/Script/EnhancedInput.EnhancedPlayerInput
DefaultInputComponentClass=/Script/EnhancedInput.EnhancedInputComponent
DefaultPlayerInputClass=/Script/Engine.PlayerInput
DefaultInputComponentClass=/Script/Engine.InputComponent
DefaultTouchInterface=None
-ConsoleKeys=Tilde
+ConsoleKeys=Tilde
Expand Down
Binary file modified sample/Content/Maps/SentryDemo.umap
Binary file not shown.
Binary file modified sample/Content/Misc/BP_BeforeSendHandler.uasset
Binary file not shown.
Binary file modified sample/Content/Misc/BP_TraceSampler.uasset
Binary file not shown.
Binary file modified sample/Content/UI/W_SentryDemo.uasset
Binary file not shown.
5 changes: 4 additions & 1 deletion scripts/packaging/engine-versions.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
5.4
5.3
5.2
5.2
5.1
5.0
4.27

0 comments on commit cccb17c

Please sign in to comment.