Build Audacity Dependencies #89
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Audacity Dependencies | |
on: | |
workflow_dispatch: | |
inputs: | |
audacity_repo: | |
description: Audacity Repository | |
required: true | |
default: audacity/audacity | |
audacity_ref: | |
description: Audacity Branch or Tag | |
required: true | |
default: master | |
build_order: | |
description: The build order YAML file | |
required: true | |
default: build_order.yml | |
build_config: | |
description: The build config used | |
required: true | |
default: audacity3 | |
env: | |
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | |
SENTRY_HOST: ${{ secrets.SENTRY_HOST }} | |
SENTRY_ORG_SLUG: ${{ secrets.SENTRY_ORG_SLUG }} | |
SENTRY_PROJECT_SLUG: ${{ secrets.SENTRY_PROJECT_SLUG }} | |
ARTIFACTORY_SYMBOLS_URL: ${{ secrets.ARTIFACTORY_SYMBOLS_URL }} | |
ARTIFACTORY_SYMBOLS_KEY: ${{ secrets.ARTIFACTORY_SYMBOLS_KEY }} | |
ARTIFACTORY_MIRROR_URL: ${{ secrets.ARTIFACTORY_MIRROR_URL }} | |
ARTIFACTORY_CACHE_URL: ${{ secrets.ARTIFACTORY_CACHE_URL }} | |
CONAN_RECIPES_REMOTE: ${{ secrets.CONAN_RECIPES_REMOTE }} | |
CONAN_BINARIES_REMOTE: ${{ secrets.CONAN_BINARIES_REMOTE }} | |
CONAN_LOGIN_USERNAME: ${{ secrets.CONAN_LOGIN_USERNAME }} | |
CONAN_PASSWORD: ${{ secrets.CONAN_PASSWORD }} | |
jobs: | |
build_linux: | |
name: ${{ matrix.config.name }} | |
runs-on: ${{ matrix.config.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
# GCC 9 | |
- name: Ubuntu 20.04 x86_64 GCC 9 | |
os: ubuntu-20.04 | |
gcc: 9 | |
release_args: --enable-debug-processor sentry --skip-debug-data-upload | |
metadata: | | |
upload_build_tools: true | |
platform: linux | |
# GCC 10 | |
- name: Ubuntu 20.04 x86_64 GCC 10 | |
os: ubuntu-20.04 | |
gcc: 10 | |
release_args: --enable-debug-processor sentry --skip-debug-data-upload | |
metadata: | | |
platform: linux | |
# GCC 11 | |
- name: Ubuntu 20.04 x86_64 GCC 11 | |
os: ubuntu-20.04 | |
gcc: 11 | |
release_args: | |
metadata: "platform: linux" | |
# GCC 12 | |
- name: Ubuntu 22.04 x86_64 GCC 12 | |
os: ubuntu-22.04 | |
build_type: rel | |
gcc: 12 | |
release_args: | |
metadata: "platform: linux" | |
# GCC 13 | |
- name: Ubuntu 22.04 x86_64 GCC 13 | |
os: ubuntu-22.04 | |
build_type: rel | |
gcc: 13 | |
release_args: | |
metadata: "platform: linux" | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v3 | |
- name: Checkout Audacity | |
uses: actions/checkout@v3 | |
with: | |
repository: ${{ github.event.inputs.audacity_repo }} | |
ref: ${{ github.event.inputs.audacity_ref }} | |
path: audacity | |
- name: Setup Dependencies | |
shell: bash | |
run: | | |
sudo add-apt-repository --yes --update ppa:ubuntu-toolchain-r/test | |
sudo apt update --yes | |
apt_packages=( | |
# For self hosted runners | |
build-essential cmake | |
# For Audacity | |
libasound2-dev libgtk2.0-dev libjack-jackd2-dev gettext python3-pip libgl1-mesa-dev uuid-dev oss4-dev | |
# For Qt building | |
libx11-dev libx11-xcb-dev libfontenc-dev libice-dev libsm-dev libxau-dev | |
libxaw7-dev libxcomposite-dev libxcursor-dev libxdamage-dev libxdmcp-dev libxext-dev | |
libxfixes-dev libxi-dev libxinerama-dev libxkbfile-dev libxmu-dev libxmuu-dev | |
libxpm-dev libxrandr-dev libxrender-dev libxres-dev libxss-dev libxt-dev libxtst-dev | |
libxv-dev libxvmc-dev libxxf86vm-dev libxcb-render0-dev libxcb-render-util0-dev | |
libxcb-xkb-dev libxcb-icccm4-dev libxcb-image0-dev libxcb-keysyms1-dev | |
libxcb-randr0-dev libxcb-shape0-dev | |
libxcb-sync-dev libxcb-xfixes0-dev | |
libxcb-xinerama0-dev libxcb-dri3-dev | |
libxcb-util0-dev libxcb-cursor-dev | |
# xkeyboard-config | |
xkb-data | |
# It appears that CCI M4 package does not work correctly | |
m4 | |
) | |
sudo apt-get update | |
sudo apt-get install -y --no-install-recommends "${apt_packages[@]}" | |
sudo apt-get remove -y ccache | |
sudo apt install --yes gcc-${{ matrix.config.gcc }} g++-${{ matrix.config.gcc }} | |
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${{ matrix.config.gcc }} 100 | |
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-${{ matrix.config.gcc }} 100 | |
sudo update-alternatives --install /usr/bin/gcov gcov /usr/bin/gcov-${{ matrix.config.gcc }} 100 | |
sudo update-alternatives --set gcc /usr/bin/gcc-${{ matrix.config.gcc }} | |
sudo update-alternatives --set g++ /usr/bin/g++-${{ matrix.config.gcc }} | |
sudo update-alternatives --set gcov /usr/bin/gcov-${{ matrix.config.gcc }} | |
gcc --version | |
g++ --version | |
gcov --version | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.11.3 | |
cache: 'pip' | |
cache-dependency-path: utils/requirements.txt | |
- uses: BSFishy/pip-action@v1 | |
with: | |
requirements: utils/requirements.txt | |
- name: Setup Environment | |
shell: bash | |
run: | | |
python3 utils/conan-utils.py init-env --clean | |
python3 utils/conan-utils.py add-remote --name conan-utils-audacity-binaries-conan2 --url ${CONAN_BINARIES_REMOTE} | |
- name: Validate Audacity Recipe | |
shell: bash | |
run: | | |
python3 utils/conan-utils.py export-recipes --build-order ${{ github.event.inputs.build_order }} | |
python3 utils/conan-utils.py validate-recipe --remote conan-utils-audacity-binaries-conan2 --profile-host host/linux/gcc${{ matrix.config.gcc }}_x86_64_rel --profile-build build/linux/gcc${{ matrix.config.gcc }}_x86_64 --build-order ${{ github.event.inputs.build_order }} --recipe-config ${{ github.event.inputs.build_config }} --recipe audacity/conan/conanfile.py ${{ matrix.config.release_args }} | |
python3 utils/conan-utils.py validate-recipe --remote conan-utils-audacity-binaries-conan2 --profile-host host/linux/gcc${{ matrix.config.gcc }}_x86_64_deb --profile-build build/linux/gcc${{ matrix.config.gcc }}_x86_64 --build-order ${{ github.event.inputs.build_order }} --recipe-config ${{ github.event.inputs.build_config }} --recipe audacity/conan/conanfile.py | |
- name: Upload to Cache | |
shell: bash | |
run: | | |
echo "${{ matrix.config.metadata }}" > metadata.yml | |
ls -la | |
python3 utils/conan-utils.py store-cache --group-id ${{ github.run_id }} --cache-id gcc${{ matrix.config.gcc }} --metadata-file metadata.yml | |
build_windows: | |
name: ${{ matrix.config.name }} | |
runs-on: ${{ matrix.config.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
- name: MSVC 2019 x86_64 | |
os: windows-2019 | |
compiler: msvc2019 | |
release_args: --enable-debug-processor symstore --skip-debug-data-upload | |
debug_args: --enable-debug-processor symstore --skip-debug-data-upload | |
metadata: "platform: win32" | |
- name: MSVC 2022 x86_64 | |
os: windows-2022 | |
compiler: msvc2022 | |
release_args: --enable-debug-processor sentry --enable-debug-processor symstore --skip-debug-data-upload | |
debug_args: --enable-debug-processor symstore --skip-debug-data-upload | |
metadata: | | |
upload_build_tools: true | |
platform: win32 | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v3 | |
- name: Checkout Audacity | |
uses: actions/checkout@v3 | |
with: | |
repository: ${{ github.event.inputs.audacity_repo }} | |
ref: ${{ github.event.inputs.audacity_ref }} | |
path: audacity | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.11.3 | |
cache: 'pip' | |
cache-dependency-path: utils/requirements.txt | |
- uses: BSFishy/pip-action@v1 | |
with: | |
requirements: utils/requirements.txt | |
- name: Setup Environment | |
shell: bash | |
run: | | |
python3 utils/conan-utils.py init-env --clean | |
python3 utils/conan-utils.py add-remote --name conan-utils-audacity-binaries-conan2 --url ${CONAN_BINARIES_REMOTE} | |
- name: Validate Audacity Recipe | |
shell: bash | |
run: | | |
python3 utils/conan-utils.py export-recipes --build-order ${{ github.event.inputs.build_order }} | |
python3 utils/conan-utils.py --build-dir "${{ github.workspace }}/../../t" validate-recipe --remote conan-utils-audacity-binaries-conan2 --profile-host host/windows/${{ matrix.config.compiler }}_x86_64_rel --profile-build build/windows/${{ matrix.config.compiler }}_x86_64 --build-order ${{ github.event.inputs.build_order }} --recipe-config ${{ github.event.inputs.build_config }} --recipe audacity/conan/conanfile.py ${{ matrix.config.release_args }} | |
python3 utils/conan-utils.py --build-dir "${{ github.workspace }}/../../t" validate-recipe --remote conan-utils-audacity-binaries-conan2 --profile-host host/windows/${{ matrix.config.compiler }}_x86_rel --profile-build build/windows/${{ matrix.config.compiler }}_x86_64 --build-order ${{ github.event.inputs.build_order }} --recipe-config ${{ github.event.inputs.build_config }} --recipe audacity/conan/conanfile.py ${{ matrix.config.release_args }} | |
python3 utils/conan-utils.py --build-dir "${{ github.workspace }}/../../t" validate-recipe --remote conan-utils-audacity-binaries-conan2 --profile-host host/windows/${{ matrix.config.compiler }}_x86_64_deb --profile-build build/windows/${{ matrix.config.compiler }}_x86_64 --build-order ${{ github.event.inputs.build_order }} --recipe-config ${{ github.event.inputs.build_config }} --recipe audacity/conan/conanfile.py ${{ matrix.config.debug_args }} | |
python3 utils/conan-utils.py --build-dir "${{ github.workspace }}/../../t" validate-recipe --remote conan-utils-audacity-binaries-conan2 --profile-host host/windows/${{ matrix.config.compiler }}_x86_deb --profile-build build/windows/${{ matrix.config.compiler }}_x86_64 --build-order ${{ github.event.inputs.build_order }} --recipe-config ${{ github.event.inputs.build_config }} --recipe audacity/conan/conanfile.py ${{ matrix.config.debug_args }} | |
- name: Upload to Cache | |
shell: bash | |
run: | | |
echo "${{ matrix.config.metadata }}" > metadata.yml | |
ls -la | |
python3 utils/conan-utils.py store-cache --group-id ${{ github.run_id }} --cache-id ${{ matrix.config.compiler }} --metadata-file metadata.yml | |
build_macos: | |
name: ${{ matrix.config.name }} | |
runs-on: ${{ matrix.config.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
- name: XCode 14.2 | |
os: macos-12 | |
compiler: 14 | |
xcode_version: 14.2 | |
release_args: --enable-debug-processor sentry --skip-debug-data-upload | |
metadata: "platform: darwin" | |
- name: XCode 13.4.1 | |
os: macos-12 | |
compiler: 13 | |
xcode_version: 13.4.1 | |
release_args: | |
metadata: | | |
upload_build_tools: true | |
platform: darwin | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v3 | |
- name: Checkout Audacity | |
uses: actions/checkout@v3 | |
with: | |
repository: ${{ github.event.inputs.audacity_repo }} | |
ref: ${{ github.event.inputs.audacity_ref }} | |
path: audacity | |
- name: Select Xcode | |
uses: maxim-lobanov/setup-xcode@v1 | |
with: | |
xcode-version: ${{ matrix.config.compiler }} | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.11.3 | |
cache: 'pip' | |
cache-dependency-path: utils/requirements.txt | |
- uses: BSFishy/pip-action@v1 | |
with: | |
requirements: utils/requirements.txt | |
- name: Setup Environment | |
shell: bash | |
run: | | |
python3 utils/conan-utils.py init-env --clean | |
python3 utils/conan-utils.py add-remote --name conan-utils-audacity-binaries-conan2 --url ${CONAN_BINARIES_REMOTE} | |
- name: Validate Audacity Recipe | |
shell: bash | |
run: | | |
python3 utils/conan-utils.py export-recipes --build-order ${{ github.event.inputs.build_order }} | |
python3 utils/conan-utils.py validate-recipe --remote conan-utils-audacity-binaries-conan2 --profile-host host/macos/apple_clang${{ matrix.config.compiler }}_x86_64_rel --profile-build build/macos/apple_clang${{ matrix.config.compiler }}_x86_64 --build-order ${{ github.event.inputs.build_order }} --recipe-config ${{ github.event.inputs.build_config }} --recipe audacity/conan/conanfile.py ${{ matrix.config.release_args }} | |
python3 utils/conan-utils.py validate-recipe --remote conan-utils-audacity-binaries-conan2 --profile-host host/macos/apple_clang${{ matrix.config.compiler }}_arm64_rel --profile-build build/macos/apple_clang${{ matrix.config.compiler }}_x86_64 --build-order ${{ github.event.inputs.build_order }} --recipe-config ${{ github.event.inputs.build_config }} --recipe audacity/conan/conanfile.py ${{ matrix.config.release_args }} | |
python3 utils/conan-utils.py validate-recipe --remote conan-utils-audacity-binaries-conan2 --profile-host host/macos/apple_clang${{ matrix.config.compiler }}_x86_64_deb --profile-build build/macos/apple_clang${{ matrix.config.compiler }}_x86_64 --build-order ${{ github.event.inputs.build_order }} --recipe-config ${{ github.event.inputs.build_config }} --recipe audacity/conan/conanfile.py | |
python3 utils/conan-utils.py validate-recipe --remote conan-utils-audacity-binaries-conan2 --profile-host host/macos/apple_clang${{ matrix.config.compiler }}_arm64_deb --profile-build build/macos/apple_clang${{ matrix.config.compiler }}_x86_64 --build-order ${{ github.event.inputs.build_order }} --recipe-config ${{ github.event.inputs.build_config }} --recipe audacity/conan/conanfile.py | |
- name: Upload to Cache | |
shell: bash | |
run: | | |
echo "${{ matrix.config.metadata }}" > metadata.yml | |
ls -la | |
python3 utils/conan-utils.py store-cache --group-id ${{ github.run_id }} --cache-id apple_clang${{ matrix.config.compiler }} --metadata-file metadata.yml | |
update_conan_remotes: | |
name: Update Conan remotes | |
runs-on: ubuntu-22.04 | |
needs: [build_linux, build_windows, build_macos] | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v3 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.11.3 | |
cache: 'pip' | |
cache-dependency-path: utils/requirements.txt | |
- uses: BSFishy/pip-action@v1 | |
with: | |
requirements: utils/requirements.txt | |
- name: Update Remotes | |
shell: bash | |
run: | | |
python3 utils/conan-utils.py init-env --clean | |
python3 utils/conan-utils.py list-cache --group-id ${{ github.run_id }} | |
python3 utils/conan-utils.py process-conan-cache --group-id ${{ github.run_id }} | |
upload_debug_symbols: | |
name: Upload ${{ matrix.config.name }} debug symbols | |
runs-on: ${{ matrix.config.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
- name: Linux | |
os: ubuntu-20.04 | |
- name: Windows | |
os: windows-2022 | |
- name: MacOS | |
os: macos-12 | |
needs: [update_conan_remotes] | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v3 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.11.3 | |
cache: 'pip' | |
cache-dependency-path: utils/requirements.txt | |
- uses: BSFishy/pip-action@v1 | |
with: | |
requirements: utils/requirements.txt | |
- name: Update Remotes | |
shell: bash | |
run: | | |
python3 utils/conan-utils.py init-env --clean | |
python3 utils/conan-utils.py process-debug-cache --group-id ${{ github.run_id }} | |
cleanup_remote_cache: | |
name: Cleanup Remote Cache | |
runs-on: ubuntu-22.04 | |
needs: [build_linux, build_windows, build_macos, update_conan_remotes, upload_debug_symbols] | |
if: always() && !cancelled() | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v3 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.11.3 | |
cache: 'pip' | |
cache-dependency-path: utils/requirements.txt | |
- uses: BSFishy/pip-action@v1 | |
with: | |
requirements: utils/requirements.txt | |
- name: Update Remotes | |
shell: bash | |
run: | | |
python3 utils/conan-utils.py init-env --clean | |
python3 utils/conan-utils.py delete-cache --group-id ${{ github.run_id }} |