Integrate Sentry crash reporting

This commit is contained in:
Luke Street 2021-04-04 18:26:29 -04:00
parent 4189c596ef
commit 927abdf8cd
7 changed files with 33 additions and 34 deletions

View File

@ -55,7 +55,8 @@ jobs:
working-directory: ${{github.workspace}}/build
run: |
cmake $GITHUB_WORKSPACE -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_C_COMPILER=${{matrix.cc}} -DCMAKE_CXX_COMPILER=${{matrix.cxx}}
-DCMAKE_C_COMPILER=${{matrix.cc}} -DCMAKE_CXX_COMPILER=${{matrix.cxx}} \
-DSENTRY_DSN="${{secrets.SENTRY_DSN}}"
- name: Build
working-directory: ${{github.workspace}}/build
@ -92,7 +93,8 @@ jobs:
working-directory: ${{github.workspace}}/build
run: |
export PATH="/usr/local/opt/qt@5/bin:$PATH" # FIXME remove
cmake $GITHUB_WORKSPACE -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo
cmake $GITHUB_WORKSPACE -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DSENTRY_DSN="${{secrets.SENTRY_DSN}}"
- name: Build
working-directory: ${{github.workspace}}/build
@ -109,7 +111,7 @@ jobs:
working-directory: build/Binaries
run: |
mv hecl-gui.app URDE.app
for i in visigen hecl urde; do
for i in visigen hecl urde crashpad_handler; do
codesign --timestamp --options runtime -s "${{secrets.MACOS_CODESIGN_IDENT}}" URDE.app/Contents/MacOS/$i
done
macdeployqt URDE.app -sign-for-notarization="${{secrets.MACOS_CODESIGN_IDENT}}" -no-strip
@ -169,25 +171,28 @@ jobs:
-DCMAKE_TOOLCHAIN_FILE="$workspace/vcpkg-qt-$env:Qt_VERSION/scripts/buildsystems/vcpkg.cmake" `
-DVCPKG_TARGET_TRIPLET=x64-windows-static `
-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded -DCMAKE_CXX_FLAGS= -DCMAKE_C_FLAGS= `
-DLLVM_ROOT_DIR="$workspace/LLVM"
-DLLVM_ROOT_DIR="$workspace/LLVM" `
-DSENTRY_DSN="${{secrets.SENTRY_DSN}}"
- name: Build
working-directory: ${{github.workspace}}/build
run: cmake --build . --config $BUILD_TYPE
- name: Compress PDBs
working-directory: ${{github.workspace}}/build/Binaries
run: 7z a -t7z debug.7z urde.pdb hecl.pdb hecl-gui.pdb visigen.pdb
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: urde-${{env.URDE_VERSION}}-win32-msvc-x86_64
path: |
build/Binaries/urde.exe
build/Binaries/urde.pdb
build/Binaries/hecl.exe
build/Binaries/hecl.pdb
build/Binaries/hecl-gui.exe
build/Binaries/hecl-gui.pdb
build/Binaries/visigen.exe
build/Binaries/visigen.pdb
build/Binaries/crashpad_handler.exe
build/Binaries/debug.7z
build-windows-clang:
name: Build Windows (Clang x86_64)
@ -237,22 +242,25 @@ jobs:
-DCMAKE_C_COMPILER="$workspace/LLVM/bin/clang-cl.exe" `
-DCMAKE_CXX_COMPILER="$workspace/LLVM/bin/clang-cl.exe" `
-DCMAKE_LINKER="$workspace/LLVM/bin/lld-link.exe" `
-DLLVM_ROOT_DIR="$workspace/LLVM"
-DLLVM_ROOT_DIR="$workspace/LLVM" `
-DSENTRY_DSN="${{secrets.SENTRY_DSN}}"
- name: Build
working-directory: ${{github.workspace}}/build
run: cmake --build . --config $BUILD_TYPE
- name: Compress PDBs
working-directory: ${{github.workspace}}/build/Binaries
run: 7z a -t7z debug.7z urde.pdb hecl.pdb hecl-gui.pdb visigen.pdb
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: urde-${{env.URDE_VERSION}}-win32-clang-x86_64
path: |
build/Binaries/urde.exe
build/Binaries/urde.pdb
build/Binaries/hecl.exe
build/Binaries/hecl.pdb
build/Binaries/hecl-gui.exe
build/Binaries/hecl-gui.pdb
build/Binaries/visigen.exe
build/Binaries/visigen.pdb
build/Binaries/crashpad_handler.exe
build/Binaries/debug.7z

View File

@ -58,7 +58,7 @@ if(DEFINED ENV{GITHUB_ENV})
file(APPEND "$ENV{GITHUB_ENV}" "URDE_VERSION=${URDE_WC_DESCRIBE}")
endif()
message(STATUS "URDE version set to ${URDE_WC_DESCRIBE}")
project(urde VERSION ${URDE_VERSION_STRING})
project(urde LANGUAGES C CXX ASM VERSION ${URDE_VERSION_STRING})
if (APPLE)
set(PLATFORM_NAME macos)
@ -70,21 +70,6 @@ endif ()
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/Binaries)
if(APPLE)
# Shaddup Xcode
function(add_executable TARGET)
_add_executable(${TARGET} ${ARGN})
set_target_properties(${TARGET} PROPERTIES XCODE_ATTRIBUTE_WARNING_CFLAGS "")
endfunction()
function(add_library TARGET)
_add_library(${TARGET} ${ARGN})
list(GET ARGV 1 ARG1)
if(NOT ${ARG1} STREQUAL INTERFACE AND NOT ${ARG1} STREQUAL ALIAS)
set_target_properties(${TARGET} PROPERTIES XCODE_ATTRIBUTE_WARNING_CFLAGS "")
endif()
endfunction()
endif()
if(APPLE AND NOT CMAKE_OSX_SYSROOT)
# If the Xcode SDK is lagging behind system version, CMake needs this done first
execute_process(COMMAND xcrun --sdk macosx --show-sdk-path

View File

@ -142,6 +142,12 @@ static void SetupBasics(bool logging) {
if (logging)
logvisor::RegisterConsoleLogger();
atSetExceptionHandler(AthenaExc);
#if SENTRY_ENABLED
hecl::Runtime::FileStoreManager fileMgr{_SYS_STR("sentry-native-urde")};
hecl::SystemUTF8Conv cacheDir{fileMgr.getStoreRoot()};
logvisor::RegisterSentry("urde", URDE_WC_DESCRIBE, cacheDir.c_str());
#endif
}
static bool IsClientLoggingEnabled(int argc, const boo::SystemChar** argv) {

View File

@ -7,8 +7,8 @@ chmod +x linuxdeploy-$(uname -m).AppImage linuxdeploy-plugin-qt-$(uname -m).AppI
# Build AppImage
mkdir -p appdir/usr/{bin,share/{applications,icons/hicolor}}
cp build/Binaries/{hecl,hecl-gui,urde,visigen} appdir/usr/bin
strip -s appdir/usr/bin/{hecl,hecl-gui,urde,visigen}
cp build/Binaries/{hecl,hecl-gui,urde,visigen,crashpad_handler} appdir/usr/bin
strip -s appdir/usr/bin/{hecl,hecl-gui,urde,visigen,crashpad_handler}
cp -r Editor/platforms/freedesktop/{16x16,32x32,48x48,64x64,128x128,256x256,512x512,1024x1024} appdir/usr/share/icons/hicolor
cp Editor/platforms/freedesktop/urde.desktop appdir/usr/share/applications
sed -i 's/Exec=.*/Exec=hecl-gui/' appdir/usr/share/applications/urde.desktop

2
hecl

@ -1 +1 @@
Subproject commit bccd20da139253fd09feee787d647edc73339d50
Subproject commit 3b544e688fb38ae824d4298c401a2efcb78cb55e

@ -1 +1 @@
Subproject commit 22ed7c1dcd2a50ffaa9b863509237ba15e451f9c
Subproject commit 0237c1d21c045b985f6091ba7fed8f861a914003

2
nod

@ -1 +1 @@
Subproject commit 364787604d0b976a6ffe345c4e7d6e2acc98d4e2
Subproject commit 11c734be47b845b0d26bada9af7efe6faf60841d