summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar lat9nq2023-10-08 14:51:29 -0400
committerGravatar lat9nq2023-10-10 11:55:55 -0400
commit00b0938f1070bc817bbef1b30d4567dacd29c07e (patch)
tree96b2171b8d8c3d21148831204cd661e32f3609ed
parentMerge pull request #11656 from liamwhite/recreate-surface-automatically (diff)
downloadyuzu-00b0938f1070bc817bbef1b30d4567dacd29c07e.tar.gz
yuzu-00b0938f1070bc817bbef1b30d4567dacd29c07e.tar.xz
yuzu-00b0938f1070bc817bbef1b30d4567dacd29c07e.zip
ci/linux: Upload separated debug symbols
Creates a new archive with a debug suffix that contains the debug symbols from compiling yuzu for mainline. The yuzu executable also gets a GNU debug link to the symbols file. ci/linux: Compile with debug symbols and upload separately Currently only uploads for yuzu but yuzu-cmd or other future executables can be added to the for-loop's parameters.
-rw-r--r--.ci/scripts/common/pre-upload.sh2
-rwxr-xr-x.ci/scripts/linux/docker.sh15
-rwxr-xr-x.ci/scripts/linux/upload.sh5
3 files changed, 20 insertions, 2 deletions
diff --git a/.ci/scripts/common/pre-upload.sh b/.ci/scripts/common/pre-upload.sh
index 705362a3c..3583f9840 100644
--- a/.ci/scripts/common/pre-upload.sh
+++ b/.ci/scripts/common/pre-upload.sh
@@ -5,6 +5,6 @@
5 5
6GITDATE="`git show -s --date=short --format='%ad' | sed 's/-//g'`" 6GITDATE="`git show -s --date=short --format='%ad' | sed 's/-//g'`"
7GITREV="`git show -s --format='%h'`" 7GITREV="`git show -s --format='%h'`"
8ARTIFACTS_DIR="artifacts" 8ARTIFACTS_DIR="$PWD/artifacts"
9 9
10mkdir -p "${ARTIFACTS_DIR}/" 10mkdir -p "${ARTIFACTS_DIR}/"
diff --git a/.ci/scripts/linux/docker.sh b/.ci/scripts/linux/docker.sh
index e5d83d4b9..202c07577 100755
--- a/.ci/scripts/linux/docker.sh
+++ b/.ci/scripts/linux/docker.sh
@@ -11,7 +11,7 @@ ccache -s
11mkdir build || true && cd build 11mkdir build || true && cd build
12cmake .. \ 12cmake .. \
13 -DBoost_USE_STATIC_LIBS=ON \ 13 -DBoost_USE_STATIC_LIBS=ON \
14 -DCMAKE_BUILD_TYPE=Release \ 14 -DCMAKE_BUILD_TYPE=RelWithDebInfo \
15 -DCMAKE_CXX_FLAGS="-march=x86-64-v2" \ 15 -DCMAKE_CXX_FLAGS="-march=x86-64-v2" \
16 -DCMAKE_CXX_COMPILER=/usr/lib/ccache/g++ \ 16 -DCMAKE_CXX_COMPILER=/usr/lib/ccache/g++ \
17 -DCMAKE_C_COMPILER=/usr/lib/ccache/gcc \ 17 -DCMAKE_C_COMPILER=/usr/lib/ccache/gcc \
@@ -31,6 +31,19 @@ ccache -s
31 31
32ctest -VV -C Release 32ctest -VV -C Release
33 33
34# Separate debug symbols from specified executables
35for EXE in yuzu; do
36 EXE_PATH="bin/$EXE"
37 # Copy debug symbols out
38 objcopy --only-keep-debug $EXE_PATH $EXE_PATH.debug
39 # Add debug link and strip debug symbols
40 objcopy -g --add-gnu-debuglink=$EXE_PATH.debug $EXE_PATH $EXE_PATH.out
41 # Overwrite original with stripped copy
42 mv $EXE_PATH.out $EXE_PATH
43done
44# Strip debug symbols from all executables
45find -type f bin/ -not -regex '.*.debug' -exec strip -g {} ';'
46
34DESTDIR="$PWD/AppDir" ninja install 47DESTDIR="$PWD/AppDir" ninja install
35rm -vf AppDir/usr/bin/yuzu-cmd AppDir/usr/bin/yuzu-tester 48rm -vf AppDir/usr/bin/yuzu-cmd AppDir/usr/bin/yuzu-tester
36 49
diff --git a/.ci/scripts/linux/upload.sh b/.ci/scripts/linux/upload.sh
index e0f336427..fbb2d9c1b 100755
--- a/.ci/scripts/linux/upload.sh
+++ b/.ci/scripts/linux/upload.sh
@@ -59,4 +59,9 @@ if [ "${RELEASE_NAME}" = "mainline" ] || [ "${RELEASE_NAME}" = "early-access" ];
59 cp "build/${APPIMAGE_NAME}" "${DIR_NAME}/yuzu-${RELEASE_NAME}.AppImage" 59 cp "build/${APPIMAGE_NAME}" "${DIR_NAME}/yuzu-${RELEASE_NAME}.AppImage"
60fi 60fi
61 61
62# Copy debug symbols to artifacts
63cd build/bin
64tar $COMPRESSION_FLAGS "${ARTIFACTS_DIR}/${REV_NAME}-debug.tar.xz" *.debug
65cd -
66
62. .ci/scripts/common/post-upload.sh 67. .ci/scripts/common/post-upload.sh