mirror of
https://github.com/cookiengineer/audacity
synced 2026-01-23 17:25:54 +01:00
Upload symbols for Conan-built libraries
This commit is contained in:
committed by
Dmitry Vedenko
parent
3e237f7aaf
commit
98802ab9ef
4
.github/workflows/cmake_build.yml
vendored
4
.github/workflows/cmake_build.yml
vendored
@@ -74,9 +74,9 @@ jobs:
|
|||||||
cache-name: cache-conan-modules
|
cache-name: cache-conan-modules
|
||||||
with:
|
with:
|
||||||
path: ${{ env.CONAN_USER_HOME }}
|
path: ${{ env.CONAN_USER_HOME }}
|
||||||
key: host-${{ matrix.config.name }}-${{ hashFiles('cmake-proxies/CMakeLists.txt') }}
|
key: host-2-${{ matrix.config.name }}-${{ hashFiles('cmake-proxies/CMakeLists.txt') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
host-${{ matrix.config.name }}-
|
host-2-${{ matrix.config.name }}-
|
||||||
|
|
||||||
- name: Configure
|
- name: Configure
|
||||||
env:
|
env:
|
||||||
|
|||||||
@@ -22,17 +22,21 @@ fi
|
|||||||
cmake --build build -j "${cpus}" --config "${AUDACITY_BUILD_TYPE}"
|
cmake --build build -j "${cpus}" --config "${AUDACITY_BUILD_TYPE}"
|
||||||
|
|
||||||
BIN_OUTPUT_DIR=build/bin/${AUDACITY_BUILD_TYPE}
|
BIN_OUTPUT_DIR=build/bin/${AUDACITY_BUILD_TYPE}
|
||||||
|
SHARED_OUTPUT_DIR=build/shared/${AUDACITY_BUILD_TYPE}
|
||||||
SYMBOLS_OUTPUT_DIR=debug
|
SYMBOLS_OUTPUT_DIR=debug
|
||||||
|
|
||||||
mkdir ${SYMBOLS_OUTPUT_DIR}
|
mkdir ${SYMBOLS_OUTPUT_DIR}
|
||||||
|
|
||||||
if [[ "${OSTYPE}" == msys* ]]; then # Windows
|
if [[ "${OSTYPE}" == msys* ]]; then # Windows
|
||||||
# copy PDBs to debug folder...
|
# copy PDBs to debug folder...
|
||||||
find ${BIN_OUTPUT_DIR} -name '*.pdb' | xargs -I % cp % ${SYMBOLS_OUTPUT_DIR}
|
find ${BIN_OUTPUT_DIR} -name '*.pdb' | xargs -I % cp -v % ${SYMBOLS_OUTPUT_DIR}
|
||||||
|
find ${SHARED_OUTPUT_DIR} -name '*.pdb' | xargs -I % cp -v % ${SYMBOLS_OUTPUT_DIR}
|
||||||
|
find $(cygpath ${CONAN_USER_HOME}) -name '*.pdb' | xargs -I % cp -v % ${SYMBOLS_OUTPUT_DIR}
|
||||||
# and remove debug symbol files from the file tree before archieving
|
# 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
|
find ${BIN_OUTPUT_DIR} -name '*.iobj' -o -name '*.ipdb' -o -name '*.pdb' -o -name '*.ilk' | xargs rm -f
|
||||||
elif [[ "${OSTYPE}" == darwin* ]]; then # macOS
|
elif [[ "${OSTYPE}" == darwin* ]]; then # macOS
|
||||||
find ${BIN_OUTPUT_DIR} -name '*.dSYM' | xargs -J % mv % ${SYMBOLS_OUTPUT_DIR}
|
find ${BIN_OUTPUT_DIR} -name '*.dSYM' | xargs -J % mv % ${SYMBOLS_OUTPUT_DIR}
|
||||||
|
find ${CONAN_USER_HOME} -name '*.dSYM' | xargs -J % cp -R % ${SYMBOLS_OUTPUT_DIR}
|
||||||
else # Linux & others
|
else # Linux & others
|
||||||
chmod +x scripts/ci/linux/split_debug_symbols.sh
|
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} -type f -executable -o -name '*.so' | xargs -n 1 scripts/ci/linux/split_debug_symbols.sh
|
||||||
|
|||||||
@@ -64,5 +64,25 @@ fi
|
|||||||
# Configure Audacity
|
# Configure Audacity
|
||||||
cmake "${cmake_args[@]}"
|
cmake "${cmake_args[@]}"
|
||||||
|
|
||||||
|
if [[ "${OSTYPE}" == msys* ]]; then # Windows
|
||||||
|
# On Windows, preserve PDB files before clearing the build cache
|
||||||
|
|
||||||
|
conanUnixPath=$(cygpath ${CONAN_USER_HOME})
|
||||||
|
pdbOutputPath="${conanUnixPath}/pdbs"
|
||||||
|
|
||||||
|
ls -la ${conanUnixPath}
|
||||||
|
|
||||||
|
mkdir -p "${pdbOutputPath}"
|
||||||
|
find "${conanUnixPath}/.conan" -name '*.pdb' '!' -name "vc14?.pdb" -type f | xargs -I % cp -v % ${pdbOutputPath}
|
||||||
|
elif [[ "${OSTYPE}" == darwin* ]]; then # macOS
|
||||||
|
# On macOS - find all the .dylib files and generate dSYMs from them
|
||||||
|
# in the same folder.
|
||||||
|
# dsymutil requires *.o files, so we need to generate files before clearing
|
||||||
|
# the build directories.
|
||||||
|
|
||||||
|
chmod +x scripts/ci/macos/generate_dsym.sh
|
||||||
|
scripts/ci/macos/generate_dsym.sh
|
||||||
|
fi
|
||||||
|
|
||||||
# Remove build directories and sources to reduce the cache size.
|
# Remove build directories and sources to reduce the cache size.
|
||||||
conan remove "*" --src --builds --force
|
conan remove "*" --src --builds --force
|
||||||
|
|||||||
20
scripts/ci/macos/generate_dsym.sh
Normal file
20
scripts/ci/macos/generate_dsym.sh
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -xe
|
||||||
|
|
||||||
|
function extractDSym()
|
||||||
|
{
|
||||||
|
local lib=$1
|
||||||
|
local libfile=$(basename $lib)
|
||||||
|
local libname="${libfile%.*}"
|
||||||
|
local targetdir=$(dirname $lib)
|
||||||
|
|
||||||
|
if [[ ! -L "$lib" && "$lib" != "{}" && $lib != *"dSYM"* ]]; then
|
||||||
|
echo "Extracting dSYMs from ${libfile} to ${libname}.dSYM"
|
||||||
|
dsymutil "$lib" -o "${targetdir}/${libname}.dSYM"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
export -f extractDSym
|
||||||
|
|
||||||
|
find $CONAN_USER_HOME -name "*.dylib" | xargs -I {} bash -c 'extractDSym "{}"'
|
||||||
Reference in New Issue
Block a user