Implement label track control panel #1089
This file contains hidden or 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: CMake Build | |
| # Rules: Only run if there's a push to origin/main or a pull request to merge | |
| # a branch into main. Any other branches will NOT be tested, so you must test | |
| # them by yourself, but see #2 for details (this can (should) also be | |
| # discussed there too). The only exception is for 'ci-fixes', having been | |
| # dedicated for CI changes. | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| - tenacity-* | |
| - ci-* # Allow CI test PRs | |
| - fix-issue-* # Feature branches for issue fixes mirrored from Codeberg | |
| - 1.3 | |
| # Add path detection for skipping builds when nothing substantive has been | |
| # changed; this will save us hundreds - thousands of minutes of actions | |
| # time a month on pointless CI builds | |
| paths: | |
| - '**/*.c' | |
| - '**/*.cc' | |
| - '**/*.cpp' | |
| - '**/*.cxx' | |
| - '**/*.h' | |
| - '**/*.hh' | |
| - '**/*.hpp' | |
| - '**/*.hxx' | |
| - '**/*.inc' | |
| - '**/*.inl' | |
| - '**/*.ipp' | |
| - '**/*.m' | |
| - '**/*.mm' | |
| - '**/*.po' | |
| - '**/*.pot' | |
| - '**/*.cmake' | |
| - '**/*.cmake.in' | |
| - '**/CMakeLists.txt' | |
| - '**/CMakePresets.json' | |
| - '**/vcpkg.json' | |
| - '**/vcpkg-configuration.json' | |
| - 'scripts/ci/**' | |
| - 'win/**' | |
| - 'mac/**' | |
| - 'linux/**' | |
| - 'nyquist/**' | |
| - 'plug-ins/**' | |
| - 'locale/**' | |
| - '.gitmodules' | |
| - '.github/workflows/cmake_build.yml' | |
| defaults: | |
| run: | |
| shell: bash | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| name: ${{ matrix.config.name }} | |
| runs-on: ${{ matrix.config.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| config: | |
| - name: Ubuntu | |
| os: ubuntu-latest | |
| arch: x86_64 # as reported by `arch` or `uname -m` | |
| cc: cc | |
| cxx: c++ | |
| compiler_cache: ccache | |
| compiler_cache_path: ~/.cache/ccache | |
| use_vcpkg: OFF | |
| vcpkg_binary_cache: ~/.cache/vcpkg | |
| vcpkg_triplet: x64-linux-dynamic | |
| # Intel macOS is still disabled pending theme-system rewrite; the | |
| # Apple Silicon runner is what macos-latest points at now. | |
| # | |
| #- name: macOS_Intel | |
| # os: macos-latest | |
| # arch: Intel # as reported by Apple menu > About This Mac | |
| # cc: cc | |
| # cxx: c++ | |
| # compiler_cache: ccache | |
| # compiler_cache_path: ~/Library/Caches/ccache | |
| # use_vcpkg: ON | |
| # vcpkg_binary_cache: ~/.cache/vcpkg | |
| # vcpkg_triplet: x64-osx-dynamic | |
| # additional_cmake_flags: -DCMAKE_APPLE_SILICON_PROCESSOR="x86_64" | |
| - name: macOS_Apple_Silicon | |
| os: macos-latest | |
| arch: arm64 | |
| cc: cc | |
| cxx: c++ | |
| compiler_cache: ccache | |
| compiler_cache_path: ~/Library/Caches/ccache | |
| use_vcpkg: ON | |
| vcpkg_binary_cache: ~/.cache/vcpkg | |
| vcpkg_triplet: arm64-osx-dynamic | |
| # Windows (x86) config | |
| - name: Windows_32bit | |
| os: windows-latest | |
| arch: x86 | |
| dev_cmd_arch: x86 | |
| # required so CMake uses MSVC rather than MinGW | |
| cc: cl | |
| cxx: cl | |
| compiler_cache: ccache | |
| compiler_cache_path: C:\Users\runneradmin\AppData\Local\ccache | |
| use_vcpkg: ON | |
| vcpkg_binary_cache: C:\Users\runneradmin\AppData\Local\vcpkg | |
| vcpkg_triplet: x86-windows | |
| exe_suffix: .exe | |
| # Windows (x64) config | |
| - name: Windows_64bit | |
| os: windows-latest | |
| arch: x86_64 | |
| dev_cmd_arch: x86_64 | |
| compiler_cache: ccache | |
| compiler_cache_path: C:\Users\runneradmin\AppData\Local\ccache | |
| # required so CMake uses MSVC rather than MinGW | |
| cc: cl | |
| cxx: cl | |
| use_vcpkg: ON | |
| vcpkg_binary_cache: C:\Users\runneradmin\AppData\Local\vcpkg | |
| vcpkg_triplet: x64-windows | |
| exe_suffix: .exe | |
| - name: Windows_ARM | |
| os: windows-11-arm | |
| arch: arm | |
| dev_cmd_arch: amd64_arm64 | |
| # required so CMake uses MSVC rather than MinGW | |
| compiler_cache: ccache | |
| compiler_cache_path: C:\Users\runneradmin\AppData\Local\ccache | |
| cc: cl | |
| cxx: cl | |
| use_vcpkg: ON | |
| vcpkg_binary_cache: C:\Users\runneradmin\AppData\Local\vcpkg | |
| vcpkg_triplet: arm64-windows | |
| exe_suffix: .exe | |
| env: | |
| CMAKE_BUILD_TYPE: Release | |
| CMAKE_C_COMPILER_LAUNCHER: ${{ matrix.config.os.compiler_cache }} | |
| CMAKE_CXX_COMPILER_LAUNCHER: ${{ matrix.config.os.compiler_cache }} | |
| MACOSX_DEPLOYMENT_TARGET: 11 | |
| VCPKG_DISABLE_METRICS: true | |
| VCPKG_DEFAULT_TRIPLET: ${{ matrix.config.vcpkg_triplet }} | |
| # Windows codesigning | |
| # This variables will be used by all the steps | |
| WINDOWS_CERTIFICATE: ${{ secrets.WINDOWS_CERTIFICATE }} | |
| WINDOWS_CERTIFICATE_PASSWORD: ${{ secrets.WINDOWS_CERTIFICATE_PASSWORD }} | |
| TENACITY_ARCH_LABEL: ${{ matrix.config.arch }} | |
| steps: | |
| - name: Checkout Git repository | |
| uses: actions/checkout@v7 | |
| with: | |
| submodules: true | |
| - name: Install dependencies | |
| if: runner.os != 'Windows' | |
| run: | | |
| exec bash "scripts/ci/dependencies.sh" | |
| # Note: currently only the Windows 11 ARM runner image doesn't have ccache | |
| # installed. It's okay if we run this on the 32-bit and 64-bit runners, so | |
| # just run this step for all Windows runners. | |
| - name: "[Windows] Install dependencies" | |
| if: runner.os == 'Windows' | |
| run: choco install ccache | |
| - name: Install Apple codesigning certificates | |
| uses: apple-actions/import-codesign-certs@v7 | |
| if: startswith( matrix.config.os, 'macos' ) && github.event_name == 'push' && github.repository_owner == 'audacity' | |
| with: | |
| p12-file-base64: ${{ secrets.APPLE_CERTIFICATE }} | |
| p12-password: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }} | |
| - name: Get Git commit of vcpkg submodule | |
| run: echo VCPKG_COMMIT=$(git ls-tree HEAD vcpkg | awk '{print $3}') >> ${GITHUB_ENV} | |
| - name: Setup vcpkg cache | |
| uses: actions/cache@v6 | |
| if: runner.os != 'Linux' | |
| with: | |
| # cache the vcpkg executable to avoid having to bootstrap vcpkg every time | |
| path: | | |
| ${{ github.workspace }}/vcpkg/vcpkg${{ matrix.config.exe_suffix }} | |
| ${{ matrix.config.vcpkg_binary_cache }} | |
| key: ${{ matrix.config.name }}-${{ hashFiles('**/vcpkg.json') }}-${{ env.VCPKG_COMMIT }}-${{ github.run_number }} | |
| restore-keys: | | |
| ${{ matrix.config.name }}-${{ hashFiles(' **/vcpkg.json') }}-${{ env.VCPKG_COMMIT }}- | |
| ${{ matrix.config.name }}-${{ hashFiles(' **/vcpkg.json') }}- | |
| ${{ matrix.config.name }}- | |
| # Compiler caching on Windows currently doesn't work, so don't setup the | |
| # cache on Windows. | |
| - name: "Set up compiler cache" | |
| uses: actions/cache@v6 | |
| with: | |
| path: ${{ matrix.config.compiler_cache_path }} | |
| key: ${{ matrix.config.os }}-${{ matrix.config.arch }}-${{ github.head_ref }}-${{ github.run_number }} | |
| restore-keys: | | |
| ${{ matrix.config.os }}-${{ matrix.config.arch }}-${{ github.head_ref }}- | |
| ${{ matrix.config.os }}-${{ matrix.config.arch }}- | |
| - name: "[Windows] Setup Developer Command Prompt" | |
| uses: TheMrMilchmann/setup-msvc-dev@v4 | |
| if: runner.os == 'Windows' | |
| with: | |
| arch: ${{matrix.config.dev_cmd_arch}} | |
| - name: Configure | |
| run: >- | |
| cmake | |
| -G Ninja | |
| -D CMAKE_BUILD_TYPE=${{ env.CMAKE_BUILD_TYPE }} | |
| -D CMAKE_INSTALL_PREFIX=${{ github.workspace }}/build/install | |
| -D VCPKG=${{ matrix.config.use_vcpkg }} | |
| -D SBSMS=ON | |
| -D X_VCPKG_APPLOCAL_DEPS_SERIALIZED=ON | |
| -S . | |
| -B build | |
| "${{ matrix.config.additional_cmake_flags }}" | |
| env: | |
| # Apple code signing | |
| APPLE_CODESIGN_IDENTITY: ${{ secrets.APPLE_CODESIGN_IDENTITY }} | |
| APPLE_NOTARIZATION_USER_NAME: ${{ secrets.APPLE_NOTARIZATION_USER_NAME }} | |
| APPLE_NOTARIZATION_PASSWORD: ${{ secrets.APPLE_NOTARIZATION_PASSWORD }} | |
| CC: ${{ matrix.config.cc }} | |
| CXX: ${{ matrix.config.cxx }} | |
| - name: Build | |
| run: cmake --build build --config ${{ env.CMAKE_BUILD_TYPE }} | |
| - name: "Print compiler cache stats" | |
| run: ${{ matrix.config.compiler_cache }} -s | |
| - name: Install | |
| run: cmake --install build --config ${{ env.CMAKE_BUILD_TYPE }} --verbose | |
| - name: "Package" | |
| working-directory: build | |
| run: >- | |
| cpack | |
| -C ${{ env.CMAKE_BUILD_TYPE }} | |
| -D CPACK_COMMAND_HDIUTIL=${{ github.workspace }}/scripts/ci/macos/repeat_hdiutil.sh | |
| --verbose | |
| && rm -r package/_CPack_Packages | |
| - name: Upload package artifact | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: tenacity_${{ matrix.config.name }}_${{ github.run_id }}_${{ env.GIT_HASH_SHORT }} | |
| path: | | |
| build/package/* | |
| !build/package/_CPack_Packages | |
| !build/package/*.json* | |
| if-no-files-found: error | |
| - name: Upload artifact of vcpkg build logs | |
| if: runner.os != 'Linux' | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: vcpkg-logs-${{ runner.os }}-${{ matrix.config.arch }} | |
| path: ${{ github.workspace }}/vcpkg/buildtrees/**/*.log |