-
-
Notifications
You must be signed in to change notification settings - Fork 51
Migrate debug symbol upload to Python script #1114
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
Changes from all commits
04e227e
b6c004c
8b0940d
2f6a18e
b6a584f
407daef
240d87b
125d29e
27b9dab
05756b5
1f8ebd1
c8c73e4
b001bed
f22bac1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -61,8 +61,17 @@ jobs: | |
id: run-tests | ||
env: | ||
EDITOR_BINARY: ${{ inputs.unreal-version == '4.27' && 'UE4Editor.exe' || 'UnrealEditor.exe' }} | ||
SENTRY_UPLOAD_SYMBOLS_AUTOMATICALLY: true | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is that getting used anywhere else? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In the upload debug symbol python script, it's getting forwarded to docker environment |
||
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | ||
SENTRY_ORG: ${{ secrets.SENTRY_ORG }} | ||
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }} | ||
run: | | ||
docker exec unreal C:\UnrealEngine\Engine\Build\BatchFiles\RunUAT.bat BuildCookRun ` | ||
docker exec ` | ||
-e SENTRY_UPLOAD_SYMBOLS_AUTOMATICALLY="$env:SENTRY_UPLOAD_SYMBOLS_AUTOMATICALLY" ` | ||
-e SENTRY_AUTH_TOKEN="$env:SENTRY_AUTH_TOKEN" ` | ||
-e SENTRY_ORG="$env:SENTRY_ORG" ` | ||
-e SENTRY_PROJECT="$env:SENTRY_PROJECT" ` | ||
unreal C:\UnrealEngine\Engine\Build\BatchFiles\RunUAT.bat BuildCookRun ` | ||
-project=C:/workspace/checkout/sample/SentryPlayground.uproject ` | ||
-archivedirectory=C:/workspace/checkout/sample/Builds ` | ||
-platform=Win64 ` | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/bin/bash | ||
|
||
TARGET_PLATFORM="$1" | ||
TARGET_NAME="$2" | ||
TARGET_TYPE="$3" | ||
TARGET_CONFIGURATION="$4" | ||
PROJECT_FILE="$5" | ||
PLUGIN_DIR="$6" | ||
ENGINE_DIR="$7" | ||
|
||
# Grant execute permissions to sentry-cli binary (FAB version of the plugin doesn't preserve file permissions) | ||
if [ -f "$PLUGIN_DIR/Source/ThirdParty/CLI/sentry-cli-Linux-x86_64" ]; then | ||
Comment on lines
+11
to
+12
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't understand how this works. The There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It can grant permissions if the user running it has permissions to do so. |
||
chmod +x "$PLUGIN_DIR/Source/ThirdParty/CLI/sentry-cli-Linux-x86_64" | ||
fi | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The Windows cross-compilation copies the crash handler, but the Linux-native script doesn't? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Manual |
||
# Call Python script for debug symbol upload | ||
"$ENGINE_DIR/Binaries/ThirdParty/Python3/Linux/bin/python3" "$PLUGIN_DIR/Scripts/upload-debug-symbols.py" \ | ||
"$TARGET_PLATFORM" "$TARGET_NAME" "$TARGET_TYPE" "$TARGET_CONFIGURATION" "$PROJECT_FILE" "$PLUGIN_DIR" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/bash | ||
|
||
TARGET_PLATFORM="$1" | ||
TARGET_NAME="$2" | ||
TARGET_TYPE="$3" | ||
TARGET_CONFIGURATION="$4" | ||
PROJECT_FILE="$5" | ||
PLUGIN_DIR="$6" | ||
ENGINE_DIR="$7" | ||
|
||
# Copy sentry.dylib to plugin's Binaries/Mac dir if it doesn't exist there to ensure FAB version of the plugin works correctly | ||
# Epic obfuscates any extra binaries when pre-building the plugin | ||
if [ "$TARGET_PLATFORM" = "Mac" ] && [ ! -f "$PLUGIN_DIR/Binaries/Mac/sentry.dylib" ]; then | ||
cp "$PLUGIN_DIR/Source/ThirdParty/Mac/bin/sentry.dylib" "$PLUGIN_DIR/Binaries/Mac/sentry.dylib" | ||
fi | ||
|
||
# Grant execute permissions to sentry-cli binary (FAB version of the plugin doesn't preserve file permissions) | ||
if [ -f "$PLUGIN_DIR/Source/ThirdParty/CLI/sentry-cli-Darwin-universal" ]; then | ||
chmod +x "$PLUGIN_DIR/Source/ThirdParty/CLI/sentry-cli-Darwin-universal" | ||
fi | ||
|
||
# Call Python script for debug symbol upload | ||
"$ENGINE_DIR/Binaries/ThirdParty/Python3/Mac/bin/python3" "$PLUGIN_DIR/Scripts/upload-debug-symbols.py" \ | ||
"$TARGET_PLATFORM" "$TARGET_NAME" "$TARGET_TYPE" "$TARGET_CONFIGURATION" "$PROJECT_FILE" "$PLUGIN_DIR" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
@echo off | ||
|
||
setlocal enabledelayedexpansion | ||
|
||
set "TARGET_PLATFORM=%~1" | ||
set "TARGET_NAME=%~2" | ||
set "TARGET_TYPE=%~3" | ||
set "TARGET_CONFIGURATION=%~4" | ||
set "PROJECT_FILE=%~5" | ||
set "PLUGIN_DIR=%~6" | ||
set "ENGINE_DIR=%~7" | ||
|
||
REM Copy crashpad handler executable to plugin's Binaries\Linux dir if it doesn't exist there | ||
REM This enables cross-compilation for Linux on Windows with FAB version of the plugin | ||
set "CRASHPAD_HANDLER_LINUX=%PLUGIN_DIR%\Binaries\Linux\crashpad_handler" | ||
if "%TARGET_PLATFORM%"=="Linux" ( | ||
if not exist "%CRASHPAD_HANDLER_LINUX%" ( | ||
if not exist "%PLUGIN_DIR%\Binaries\Linux\" (mkdir "%PLUGIN_DIR%\Binaries\Linux") | ||
xcopy "%PLUGIN_DIR%\Source\ThirdParty\Linux\bin\*" "%PLUGIN_DIR%\Binaries\Linux\" /F /R /Y /I | ||
) | ||
) | ||
|
||
REM Copy crashpad handler executable to plugin's Binaries\Win64 dir if it doesn't exist there | ||
REM Epic obfuscates any extra binaries when pre-building the plugin for FAB | ||
set "CRASHPAD_HANDLER_WIN=%PLUGIN_DIR%\Binaries\Win64\crashpad_handler.exe" | ||
if "%TARGET_PLATFORM%"=="Win64" ( | ||
if not exist "%CRASHPAD_HANDLER_WIN%" ( | ||
if not exist "%PLUGIN_DIR%\Binaries\Win64\" (mkdir "%PLUGIN_DIR%\Binaries\Win64") | ||
xcopy "%PLUGIN_DIR%\Source\ThirdParty\Win64\bin\*" "%PLUGIN_DIR%\Binaries\Win64\" /F /R /Y /I | ||
) | ||
) | ||
|
||
REM Call Python script for debug symbol upload | ||
"%ENGINE_DIR%\Binaries\ThirdParty\Python3\Win64\python.exe" "%PLUGIN_DIR%\Scripts\upload-debug-symbols.py" ^ | ||
%TARGET_PLATFORM% %TARGET_NAME% %TARGET_TYPE% %TARGET_CONFIGURATION% "%PROJECT_FILE%" "%PLUGIN_DIR%" | ||
|
||
endlocal |
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There now is a org-auth-token that would allow us to omit the
SENTRY_ORG
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also for Symbol upload?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let’s keep setting the organization explicitly for now as things could get confusing if the "wrong" token type is used.