From 7085fbabe31b3172f02e8819d7d350aa4e8dda69 Mon Sep 17 00:00:00 2001 From: ROllerozxa Date: Thu, 5 Dec 2024 16:08:59 +0100 Subject: [PATCH] Upload debug symbols for Linux artifact --- .github/workflows/linux.yml | 6 ++++++ packaging/build-appimage.sh | 11 ++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 90cb75c1..92ab59fe 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -43,3 +43,9 @@ jobs: with: name: Principia-x86_64.AppImage path: build/Principia-x86_64.AppImage + + - name: Upload debug symbols as artifact + uses: actions/upload-artifact@v4 + with: + name: linux-appimage-dbgsym + path: build/principia.debug diff --git a/packaging/build-appimage.sh b/packaging/build-appimage.sh index 2960a4ba..e6cd11e6 100755 --- a/packaging/build-appimage.sh +++ b/packaging/build-appimage.sh @@ -17,11 +17,16 @@ fi # Remove old appdir rm -rf AppDir -# Compile and install into AppDir -cmake .. -G Ninja -DCMAKE_INSTALL_PREFIX=AppDir/usr/ +# Compile +cmake .. -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=AppDir/usr/ ninja -ninja install +# Strip binary and create debug symbol file +objcopy --only-keep-debug principia principia.debug +objcopy --strip-debug --add-gnu-debuglink=principia.debug principia + +# Install into AppDir +ninja install cd AppDir # Put desktop and icon at root