CI: Separate & upload debug info for Linux/macOS

This commit is contained in:
Luke Street 2021-04-05 15:26:56 -04:00
parent 2186fc0945
commit 0d1f2a49ff
4 changed files with 44 additions and 3 deletions

View File

@ -37,6 +37,7 @@ jobs:
zlib1g-dev libglu1-mesa-dev libdbus-1-dev libvulkan-dev libxi-dev libxrandr-dev libasound2-dev \
libpulse-dev libudev-dev libpng-dev libncurses5-dev libx11-xcb-dev python3 python-is-python3 qt5-default \
libcurl4-openssl-dev
yarn global add @sentry/cli
# free up disk space
# https://github.com/actions/virtual-environments/issues/2840#issuecomment-790492173
echo Before
@ -63,6 +64,13 @@ jobs:
working-directory: ${{github.workspace}}/build
run: cmake --build . --config $BUILD_TYPE
- name: Upload debug information
if: matrix.name == "Clang"
env:
SENTRY_AUTH_TOKEN: ${{secrets.SENTRY_AUTH_TOKEN}}
SENTRY_URL: ${{secrets.SENTRY_URL}}
run: ci/upload-debug-linux.sh
- name: Generate AppImage
run: ci/build-appimage.sh
@ -70,7 +78,9 @@ jobs:
uses: actions/upload-artifact@v2
with:
name: urde-${{env.URDE_VERSION}}-linux-${{matrix.cc}}-x86_64
path: URDE-*.AppImage
path: |
URDE-*.AppImage
build/Binaries/*.dbg
build-macos:
name: Build macOS (AppleClang x86_64)
@ -83,7 +93,7 @@ jobs:
- name: Install dependencies
run: |
brew install ninja qt@5 graphicsmagick imagemagick
brew install ninja qt@5 graphicsmagick imagemagick getsentry/tools/sentry-cli
brew link qt@5
yarn global add create-dmg
@ -101,6 +111,12 @@ jobs:
working-directory: ${{github.workspace}}/build
run: cmake --build . --config $BUILD_TYPE
- name: Upload debug information
env:
SENTRY_AUTH_TOKEN: ${{secrets.SENTRY_AUTH_TOKEN}}
SENTRY_URL: ${{secrets.SENTRY_URL}}
run: ci/upload-debug-macos.sh
- name: Import signing certificate
uses: devbotsxyz/xcode-import-certificate@master
with:
@ -134,6 +150,7 @@ jobs:
LLVM_VERSION: 10.0.1
Qt_VERSION: 5.15.2
# IPP_VERSION: 2021.2.0.210
SENTRY_CLI_VERSION: 1.63.2
steps:
- uses: actions/checkout@v2
with:
@ -156,6 +173,12 @@ jobs:
(New-Object Net.WebClient).DownloadFile("https://axiodl.com/files/$Filename", "$TempDir\$Filename")
7z x "-o$env:RUNNER_WORKSPACE" -aos "$TempDir\$Filename"
- name: Download sentry-cli
run: |
$TempDir = "$env:RUNNER_WORKSPACE\temp"
New-Item -Path "$TempDir" -ItemType Directory -ea 0
(New-Object Net.WebClient).DownloadFile("https://github.com/getsentry/sentry-cli/releases/download/$env:SENTRY_CLI_VERSION/sentry-cli-Windows-x86_64.exe", "$TempDir\sentry-cli.exe")
# - name: Install Intel IPP
# run: |
# $TempDir = "$env:RUNNER_WORKSPACE\temp"
@ -189,6 +212,9 @@ jobs:
working-directory: ${{github.workspace}}/build
run: cmake --build . --config $BUILD_TYPE
- name: Upload debug information
run:
- name: Compress PDBs
working-directory: ${{github.workspace}}/build/Binaries
run: 7z a -t7z debug.7z urde.pdb hecl.pdb hecl-gui.pdb visigen.pdb

View File

@ -8,7 +8,7 @@ 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}
strip -S appdir/usr/bin/{hecl,hecl-gui,urde,visigen}
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

7
ci/upload-debug-linux.sh Executable file
View File

@ -0,0 +1,7 @@
#!/bin/bash -ex
cd build/Binaries
for f in hecl hecl-gui urde visigen; do
objcopy --only-keep-debug $f $f.dbg
done
strip -S hecl hecl-gui urde visigen
sentry-cli upload-dif --org axiodl --project urde {hecl,hecl-gui,urde,visigen}{,.dbg} --include-sources

8
ci/upload-debug-macos.sh Executable file
View File

@ -0,0 +1,8 @@
#!/bin/bash -ex
cd build/Binaries/hecl-gui.app/Contents/MacOS
for f in hecl hecl-gui urde visigen; do
dsymutil $f
done
strip -S hecl hecl-gui urde visigen crashpad_handler
sentry-cli upload-dif --org axiodl --project urde {hecl,hecl-gui,urde,visigen}{,.dSYM} --include-sources
rm -r -- *.dSYM