diff options
| author | 2023-10-08 14:51:29 -0400 | |
|---|---|---|
| committer | 2023-10-10 11:55:55 -0400 | |
| commit | 00b0938f1070bc817bbef1b30d4567dacd29c07e (patch) | |
| tree | 96b2171b8d8c3d21148831204cd661e32f3609ed | |
| parent | Merge pull request #11656 from liamwhite/recreate-surface-automatically (diff) | |
| download | yuzu-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.sh | 2 | ||||
| -rwxr-xr-x | .ci/scripts/linux/docker.sh | 15 | ||||
| -rwxr-xr-x | .ci/scripts/linux/upload.sh | 5 |
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 | ||
| 6 | GITDATE="`git show -s --date=short --format='%ad' | sed 's/-//g'`" | 6 | GITDATE="`git show -s --date=short --format='%ad' | sed 's/-//g'`" |
| 7 | GITREV="`git show -s --format='%h'`" | 7 | GITREV="`git show -s --format='%h'`" |
| 8 | ARTIFACTS_DIR="artifacts" | 8 | ARTIFACTS_DIR="$PWD/artifacts" |
| 9 | 9 | ||
| 10 | mkdir -p "${ARTIFACTS_DIR}/" | 10 | mkdir -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 | |||
| 11 | mkdir build || true && cd build | 11 | mkdir build || true && cd build |
| 12 | cmake .. \ | 12 | cmake .. \ |
| 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 | ||
| 32 | ctest -VV -C Release | 32 | ctest -VV -C Release |
| 33 | 33 | ||
| 34 | # Separate debug symbols from specified executables | ||
| 35 | for 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 | ||
| 43 | done | ||
| 44 | # Strip debug symbols from all executables | ||
| 45 | find -type f bin/ -not -regex '.*.debug' -exec strip -g {} ';' | ||
| 46 | |||
| 34 | DESTDIR="$PWD/AppDir" ninja install | 47 | DESTDIR="$PWD/AppDir" ninja install |
| 35 | rm -vf AppDir/usr/bin/yuzu-cmd AppDir/usr/bin/yuzu-tester | 48 | rm -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" |
| 60 | fi | 60 | fi |
| 61 | 61 | ||
| 62 | # Copy debug symbols to artifacts | ||
| 63 | cd build/bin | ||
| 64 | tar $COMPRESSION_FLAGS "${ARTIFACTS_DIR}/${REV_NAME}-debug.tar.xz" *.debug | ||
| 65 | cd - | ||
| 66 | |||
| 62 | . .ci/scripts/common/post-upload.sh | 67 | . .ci/scripts/common/post-upload.sh |