Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Add UE 4.27, 5.0 and 5.1 to CI pipeline #675

Merged
merged 10 commits into from
Nov 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about this so if/when 6 lands, it's included automatically? (I assume nothign would work on UE3 anyway)?

Suggested change
#if PLATFORM_WINDOWS && ENGINE_MAJOR_VERSION == 5
#if PLATFORM_WINDOWS && ENGINE_MAJOR_VERSION != 4

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we have quite a few places with the version-specific code I've created a separate issue to track this request - #676


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
Loading