1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-10 00:23:32 +02:00

Crashreporting

This commit is contained in:
Vitaly Sverchinsky
2021-05-04 21:43:19 +03:00
parent 5c05f6b421
commit e8b186a9b4
24 changed files with 1363 additions and 19 deletions

View File

@@ -20,3 +20,21 @@ fi
# Build Audacity
cmake --build build -j "${cpus}" --config "${AUDACITY_BUILD_TYPE}"
BIN_OUTPUT_DIR=build/bin/${AUDACITY_BUILD_TYPE}
SYMBOLS_OUTPUT_DIR=debug
mkdir ${SYMBOLS_OUTPUT_DIR}
if [[ "${OSTYPE}" == msys* ]]; then # Windows
# copy PDBs to debug folder...
find ${BIN_OUTPUT_DIR} -name '*.pdb' | xargs -I % cp % ${SYMBOLS_OUTPUT_DIR}
# and remove debug symbol files from the file tree before archieving
find ${BIN_OUTPUT_DIR} -name '*.iobj' -o -name '*.ipdb' -o -name '*.pdb' -o -name '*.ilk' | xargs rm -f
elif [[ "${OSTYPE}" == darwin* ]]; then # macOS
find ${BIN_OUTPUT_DIR} -name '*.dSYM' | xargs -J % mv % ${SYMBOLS_OUTPUT_DIR}
else # Linux & others
chmod +x scripts/ci/linux/split_debug_symbols.sh
find ${BIN_OUTPUT_DIR} -type f -executable -o -name '*.so' | xargs -n 1 scripts/ci/linux/split_debug_symbols.sh
find ${BIN_OUTPUT_DIR} -name '*.debug' | xargs -I % mv % ${SYMBOLS_OUTPUT_DIR}
fi

View File

@@ -17,6 +17,10 @@ cmake_args=(
)
if [[ "${AUDACITY_CMAKE_GENERATOR}" == "Visual Studio"* ]]; then
cmake_args+=(
# skip unneeded configurations
-D CMAKE_CONFIGURATION_TYPES="${AUDACITY_BUILD_TYPE}"
)
case "${AUDACITY_ARCH_LABEL}" in
32bit) cmake_args+=( -A Win32 ) ;;
64bit) cmake_args+=( -A x64 ) ;;
@@ -24,6 +28,8 @@ if [[ "${AUDACITY_CMAKE_GENERATOR}" == "Visual Studio"* ]]; then
esac
elif [[ "${AUDACITY_CMAKE_GENERATOR}" == Xcode* ]]; then
cmake_args+=(
# skip unneeded configurations
-D CMAKE_CONFIGURATION_TYPES="${AUDACITY_BUILD_TYPE}"
-T buildsystem=1
)
fi

View File

@@ -21,5 +21,5 @@ gh_export CONAN_USER_HOME_SHORT="${repository_root}/conan-home/short"
gh_export GIT_HASH="$(git show -s --format='%H')"
gh_export GIT_HASH_SHORT="$(git show -s --format='%h')"
gh_export AUDACITY_BUILD_TYPE="Release"
gh_export AUDACITY_BUILD_TYPE="RelWithDebInfo"
gh_export AUDACITY_INSTALL_PREFIX="${repository_root}/build/install"

View File

@@ -0,0 +1,8 @@
#!/usr/bin/env bash
set -x
objcopy --only-keep-debug --compress-debug-section=zlib "${1}" "${1}.debug"
if [ -f "${1}.debug" ]; then
objcopy --strip-debug --strip-unneeded "${1}"
objcopy --add-gnu-debuglink="${1}.debug" "${1}"
fi

View File

@@ -0,0 +1,19 @@
#!/usr/bin/env bash
((${BASH_VERSION%%.*} >= 4)) || { echo >&2 "$0: Error: Please upgrade Bash."; exit 1; }
set -euxo pipefail
# download sentry-cli
# TODO: currently this script downloads binaries and install them
# each time job is started, workarounds?
curl -sL https://sentry.io/get-cli/ | bash
#Where debug symbols will go
UPLOAD_URL=https://${SENTRY_HOST}/api/${SENTRY_PROJECT}/minidump/?sentry_key=${SENTRY_DSN_KEY}
SYMBOLS=$(find debug | xargs)
${INSTALL_DIR}/sentry-cli --auth-token ${SENTRY_AUTH_TOKEN} --url ${UPLOAD_URL} \
--org ${SENTRY_ORG_SLUG}} \
--project ${SENTRY_PROJECT_SLUG} ${SYMBOLS}