Browse Source
Use vcpkg for dependencies and cleanup GH Actions workflow
Use vcpkg for dependencies and cleanup GH Actions workflow
Signed-off-by: Be <be@mixxx.org>pull/228/head
No known key found for this signature in database
GPG Key ID: F4D83691462F656E
14 changed files with 253 additions and 242 deletions
-
185.github/workflows/cmake_build.yml
-
4.gitignore
-
4.gitmodules
-
92CMakeLists.txt
-
2linux/create_appimage.sh
-
44scripts/ci/build.sh
-
53scripts/ci/configure.sh
-
27scripts/ci/dependencies.sh
-
24scripts/ci/environment.sh
-
8scripts/ci/install.sh
-
0scripts/ci/macos/repeat_hdiutil.sh
-
19scripts/ci/package.sh
-
1vcpkg
-
32vcpkg.json
@ -0,0 +1,4 @@ |
|||
[submodule "vcpkg"] |
|||
path = vcpkg |
|||
url = https://github.com/tenacityteam/vcpkg.git |
|||
branch = tenacity |
@ -1,44 +0,0 @@ |
|||
#!/usr/bin/env bash |
|||
|
|||
((${BASH_VERSION%%.*} >= 4)) || { echo >&2 "$0: Error: Please upgrade Bash."; exit 1; } |
|||
|
|||
set -euxo pipefail |
|||
|
|||
if [[ "${OSTYPE}" == msys* ]]; then # Windows |
|||
|
|||
cpus="${NUMBER_OF_PROCESSORS}" |
|||
|
|||
elif [[ "${OSTYPE}" == darwin* ]]; then # macOS |
|||
|
|||
cpus="$(sysctl -n hw.ncpu)" |
|||
|
|||
else # Linux & others |
|||
|
|||
cpus="$(nproc)" |
|||
|
|||
fi |
|||
|
|||
export CMAKE_BUILD_PARALLEL_LEVEL=$(( ${cpus} > 2 ? $((${cpus} - 2)) : ${cpus} )) |
|||
|
|||
echo "Using ${CMAKE_BUILD_PARALLEL_LEVEL} processors for cmake build" |
|||
|
|||
# Build Audacity |
|||
cmake --build build --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 archiving |
|||
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 |
@ -1,53 +0,0 @@ |
|||
#!/usr/bin/env bash |
|||
|
|||
((${BASH_VERSION%%.*} >= 4)) || { echo >&2 "$0: Error: Please upgrade Bash."; exit 1; } |
|||
|
|||
if [ -f "activate.sh" ]; then |
|||
echo "Setting up conan venv" |
|||
source activate.sh |
|||
fi |
|||
|
|||
set -euxo pipefail |
|||
|
|||
conan --version # check it works |
|||
|
|||
cmake_args=( |
|||
-S . |
|||
-B build |
|||
-G "${AUDACITY_CMAKE_GENERATOR}" |
|||
-D use_pch=no |
|||
-D CMAKE_BUILD_TYPE="${AUDACITY_BUILD_TYPE}" |
|||
-D CMAKE_INSTALL_PREFIX="${AUDACITY_INSTALL_PREFIX}" |
|||
) |
|||
|
|||
if [[ -n "${APPLE_CODESIGN_IDENTITY}" && "${OSTYPE}" == darwin* ]]; then |
|||
cmake_args+=( |
|||
-D APPLE_CODESIGN_IDENTITY="${APPLE_CODESIGN_IDENTITY}" |
|||
-D perform_codesign=yes |
|||
) |
|||
|
|||
if [[ ${GIT_BRANCH} == release* ]]; then |
|||
cmake_args+=( |
|||
-D APPLE_NOTARIZATION_USER_NAME="${APPLE_NOTARIZATION_USER_NAME}" |
|||
-D APPLE_NOTARIZATION_PASSWORD="${APPLE_NOTARIZATION_PASSWORD}" |
|||
-D perform_notarization=yes |
|||
) |
|||
fi |
|||
elif [[ -n "${WINDOWS_CERTIFICATE}" && "${OSTYPE}" == msys* ]]; then |
|||
# Windows certificate will be used from the environment |
|||
cmake_args+=( |
|||
-D perform_codesign=yes |
|||
) |
|||
fi |
|||
|
|||
if [[ ${GIT_BRANCH} == release* ]]; then |
|||
cmake_args+=( |
|||
-D package_manual=yes |
|||
) |
|||
fi |
|||
|
|||
# Configure Audacity |
|||
cmake "${cmake_args[@]}" |
|||
|
|||
# Remove build directories and sources to reduce the cache size. |
|||
conan remove "*" --src --builds --force |
@ -1,24 +0,0 @@ |
|||
#!/usr/bin/env bash |
|||
|
|||
if [[ "$0" == "${BASH_SOURCE}" ]]; then |
|||
echo >&2 "$0: Please source this script instead of running it." |
|||
exit 1 |
|||
fi |
|||
|
|||
((${BASH_VERSION%%.*} >= 4)) || { echo >&2 "${BASH_SOURCE}: Error: Please upgrade Bash."; return 1; } |
|||
|
|||
function gh_export() |
|||
{ |
|||
[[ "${GITHUB_ENV-}" ]] || local -r GITHUB_ENV="/dev/null" |
|||
export -- "$@" && printf "%s\n" "$@" >> "${GITHUB_ENV}" |
|||
} |
|||
|
|||
repository_root="$(cd "$(dirname "${BASH_SOURCE}")/.."; echo "${PWD}/${GITHUB_ACTOR}")" |
|||
|
|||
gh_export GIT_HASH="$(git show -s --format='%H')" |
|||
gh_export GIT_HASH_SHORT="$(git show -s --format='%h')" |
|||
|
|||
gh_export AUDACITY_BUILD_TYPE="RelWithDebInfo" |
|||
gh_export AUDACITY_INSTALL_PREFIX="${repository_root}/build/install" |
|||
|
|||
gh_export GIT_BRANCH=$(git rev-parse --abbrev-ref HEAD) |
@ -1,8 +0,0 @@ |
|||
#!/usr/bin/env bash |
|||
|
|||
((${BASH_VERSION%%.*} >= 4)) || { echo >&2 "$0: Error: Please upgrade Bash."; exit 1; } |
|||
|
|||
set -euxo pipefail |
|||
|
|||
# Install Audacity |
|||
cmake --install build --config "${AUDACITY_BUILD_TYPE}" --verbose |
@ -1,19 +0,0 @@ |
|||
#!/usr/bin/env bash |
|||
|
|||
((${BASH_VERSION%%.*} >= 4)) || { echo >&2 "$0: Error: Please upgrade Bash."; exit 1; } |
|||
|
|||
set -euxo pipefail |
|||
|
|||
cd build |
|||
|
|||
if [[ "${OSTYPE}" == msys* && ${GIT_BRANCH} == release* ]]; then # Windows |
|||
cmake --build . --target innosetup --config "${AUDACITY_BUILD_TYPE}" |
|||
else |
|||
# GITHUB_WORKSPACE is set by the checkout action in the action workflow configuration |
|||
export CPACK_COMMAND_HDIUTIL="${GITHUB_WORKSPACE}/scripts/ci/macos/repeat_hdiutil.sh" |
|||
chmod +x $CPACK_COMMAND_HDIUTIL |
|||
cpack -C "${AUDACITY_BUILD_TYPE}" -D CPACK_COMMAND_HDIUTIL="${CPACK_COMMAND_HDIUTIL}" --verbose |
|||
fi |
|||
|
|||
# Remove the temporary directory |
|||
rm -Rf package/_CPack_Packages |
@ -0,0 +1,32 @@ |
|||
{ |
|||
"name": "tenacity", |
|||
"version": "0.10", |
|||
"description": "Tenacity is an easy-to-use, cross-platform multi-track audio editor/recorder for Windows, MacOS, GNU/Linux and other operating systems.", |
|||
"homepage": "https://tenacityaudio.org/", |
|||
"license": "GPL-2.0-or-later", |
|||
"supports": "!uwp", |
|||
"dependencies": [ |
|||
"libsndfile", |
|||
"lilv", |
|||
"libid3tag", |
|||
"libmad", |
|||
"twolame", |
|||
"soxr", |
|||
"soundtouch", |
|||
"libsbsms", |
|||
"portaudio", |
|||
"portmidi", |
|||
"portsmf", |
|||
"mp3lame", |
|||
"libmad", |
|||
"zlib", |
|||
"vamp-sdk", |
|||
"expat", |
|||
"sqlite3", |
|||
"ffmpeg", |
|||
{ |
|||
"name": "wxwidgets", |
|||
"platform": "windows" |
|||
} |
|||
] |
|||
} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue