feat: add linux dependencies build #1169
Workflow file for this run
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: Build | |
| on: | |
| push: | |
| pull_request: | |
| types: [opened, synchronize, reopened, edited] | |
| permissions: | |
| contents: read # Fetch code (actions/checkout) | |
| packages: write # Upload and publish packages to GitHub Packages | |
| jobs: | |
| build: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: windows-2022 | |
| deps_name: x64-windows | |
| vcpkg_path: C:\mixxx-vcpkg | |
| vcpkg_bootstrap: .\bootstrap-vcpkg.bat | |
| vcpkg_triplet: x64-windows | |
| vcpkg_host_triplet: x64-windows | |
| check_disk_space: Get-PSDrive | |
| - os: windows-11-arm | |
| deps_name: arm64-windows | |
| vcpkg_path: C:\mixxx-vcpkg | |
| vcpkg_bootstrap: .\bootstrap-vcpkg.bat | |
| vcpkg_triplet: arm64-windows | |
| vcpkg_host_triplet: arm64-windows | |
| check_disk_space: Get-PSDrive | |
| - os: macos-15-intel | |
| deps_name: x64-osx | |
| vcpkg_path: /Users/runner/mixxx-vcpkg | |
| vcpkg_bootstrap: ./bootstrap-vcpkg.sh | |
| vcpkg_triplet: x64-osx-min1100 | |
| vcpkg_host_triplet: x64-osx-min1100 | |
| developer_dir: /Applications/Xcode_16.4.app/Contents/Developer | |
| check_disk_space: df -h | |
| - os: macos-15-intel | |
| deps_name: arm64-osx-cross | |
| vcpkg_path: /Users/runner/mixxx-vcpkg | |
| vcpkg_bootstrap: ./bootstrap-vcpkg.sh | |
| vcpkg_triplet: arm64-osx-min1100 | |
| vcpkg_host_triplet: x64-osx-min1100-release | |
| developer_dir: /Applications/Xcode_16.4.app/Contents/Developer | |
| check_disk_space: df -h | |
| - os: macos-15 | |
| deps_name: arm64-osx | |
| vcpkg_path: /Users/runner/mixxx-vcpkg | |
| vcpkg_bootstrap: ./bootstrap-vcpkg.sh | |
| vcpkg_triplet: arm64-osx-min1100 | |
| vcpkg_host_triplet: arm64-osx-min1100 | |
| developer_dir: /Applications/Xcode_16.4.app/Contents/Developer | |
| brew_extra: libtool | |
| check_disk_space: df -h | |
| - os: ubuntu-24.04 | |
| deps_name: x64-linux | |
| vcpkg_path: /home/runner/mixxx-vcpkg | |
| vcpkg_bootstrap: ./bootstrap-vcpkg.sh | |
| vcpkg_triplet: x64-linux | |
| vcpkg_host_triplet: x64-linux | |
| check_disk_space: df -h | |
| - os: ubuntu-24.04 | |
| deps_name: arm64-android | |
| vcpkg_path: /home/runner/mixxx-vcpkg | |
| vcpkg_bootstrap: ./bootstrap-vcpkg.sh | |
| vcpkg_triplet: arm64-android | |
| vcpkg_host_triplet: x64-linux-release | |
| android_api: 35 | |
| android_version: 35.0.0 | |
| android_ndk: 27.2.12479018 | |
| check_disk_space: df -h | |
| env: | |
| VCPKG_DEFAULT_TRIPLET: ${{ matrix.vcpkg_triplet }} | |
| VCPKG_DEFAULT_HOST_TRIPLET: ${{ matrix.vcpkg_host_triplet }} | |
| DEPS_BASE_NAME: mixxx-deps | |
| DEVELOPER_DIR: ${{ matrix.developer_dir }} | |
| MIXXX_VERSION: 2.7 | |
| name: ${{ matrix.deps_name }} | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Check out git repository | |
| uses: actions/checkout@v4 | |
| with: | |
| path: mixxx-vcpkg | |
| # Workaround for issues https://github.com/microsoft/vcpkg/issues/8272 | |
| # and https://github.com/actions/checkout/issues/197 | |
| # to keep the build path short and work around size limits on the windows runner D: drive | |
| - name: Move checkout | |
| run: cmake -E copy_directory ${{ github.workspace }}/mixxx-vcpkg ${{ matrix.vcpkg_path }} | |
| - name: "Work around actions/runner-images#9966" | |
| if: matrix.os == 'macos-15-intel' | |
| run: | | |
| brew list -1 | grep python@ | while read formula; do | |
| brew unlink $formula | |
| brew link --overwrite $formula | |
| done | |
| - name: "[macOS] Install dependencies for nuget & vcpkg" | |
| if: runner.os == 'macOS' | |
| run: | | |
| brew update-if-needed && brew install automake nasm autoconf-archive nuget ${{ matrix.brew_extra }} | |
| sudo xcode-select --switch "$DEVELOPER_DIR" | |
| xcrun --show-sdk-version | |
| - name: "[Ubuntu] Install dependencies for nuget & vcpkg" | |
| if: runner.os == 'Linux' | |
| run: | | |
| # Install all dependencies needed for the host (x64-linux-release). | |
| # Most of them are related to Qt-related ports build also include some build essentials as well as the Android SDK manager | |
| sudo apt-get update && \ | |
| sudo apt-get install -y \ | |
| '^libxcb.*-dev' \ | |
| autoconf \ | |
| autoconf-archive \ | |
| automake \ | |
| bison \ | |
| flex \ | |
| mono-complete \ | |
| libasound2-dev \ | |
| libegl1-mesa-dev \ | |
| libgl1-mesa-dev \ | |
| libdrm-dev \ | |
| libgbm-dev \ | |
| libghc-resolv-dev \ | |
| libglu1-mesa-dev \ | |
| libltdl-dev \ | |
| libsm-dev \ | |
| libudev-dev \ | |
| libx11-xcb-dev \ | |
| libxi-dev \ | |
| libxkbcommon-dev \ | |
| libxkbcommon-x11-dev \ | |
| libxrender-dev \ | |
| linux-libc-dev \ | |
| nasm \ | |
| pkg-config \ | |
| python3-jinja2 | |
| # Install NuGET | |
| sudo curl -o /usr/local/bin/nuget.exe https://dist.nuget.org/win-x86-commandline/latest/nuget.exe | |
| sudo tee /usr/local/bin/nuget <<EOF | |
| #!/bin/sh | |
| mono /usr/local/bin/nuget.exe "\$@" | |
| EOF | |
| sudo chmod +x /usr/local/bin/nuget | |
| echo "VCPKG_MAX_CONCURRENCY=3" >> "${GITHUB_ENV}" | |
| - name: "Authenticate to GitHub Packages (readwrite)" | |
| if: github.event_name == 'push' && github.repository_owner == 'mixxxdj' | |
| shell: bash | |
| run: | | |
| nuget sources add -Name "mixxx-github-packages" -Source "https://nuget.pkg.github.com/mixxxdj/index.json" -UserName "${{ github.repository_owner }}" -Password "${{ secrets.GITHUB_TOKEN }}" -StorePasswordInClearText | |
| nuget setapikey "${{ secrets.GITHUB_TOKEN }}" -Source "mixxx-github-packages" | |
| echo "VCPKG_BINARY_SOURCES=clear;nuget,mixxx-github-packages,readwrite;" >> "${GITHUB_ENV}" | |
| - name: "Authenticate to GitHub Packages (read only)" | |
| if: github.event_name == 'pull_request' | |
| shell: bash | |
| run: | | |
| nuget sources add -Name "mixxx-github-packages" -Source "https://nuget.pkg.github.com/mixxxdj/index.json" -UserName "${{ github.repository_owner }}" -Password "${{ secrets.GITHUB_TOKEN }}" -StorePasswordInClearText | |
| nuget setapikey "${{ secrets.GITHUB_TOKEN }}" -Source "mixxx-github-packages" | |
| echo "VCPKG_BINARY_SOURCES=clear;nuget,mixxx-github-packages,read;" >> "${GITHUB_ENV}" | |
| - name: Read sha_short | |
| id: vars | |
| shell: bash | |
| run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT | |
| working-directory: ${{ matrix.vcpkg_path }} | |
| - name: Bootstrap vcpkg | |
| run: ${{ matrix.vcpkg_bootstrap }} | |
| working-directory: ${{ matrix.vcpkg_path }} | |
| - name: "[android] Install Android SDK" | |
| if: startsWith(matrix.deps_name, 'arm64-android') | |
| run: | | |
| sudo apt-get install -y \ | |
| google-android-cmdline-tools-13.0-installer \ | |
| openjdk-17-jdk | |
| yes | sudo sdkmanager "platforms;android-${{ matrix.android_api }}" "platform-tools" "build-tools;${{ matrix.android_version }}" "ndk;${{ matrix.android_ndk }}" | |
| echo "ANDROID_NDK_HOME=/usr/lib/android-sdk/ndk/${{ matrix.android_ndk }}" >> "${GITHUB_ENV}" | |
| sudo sdkmanager --list_installed | |
| - name: Check available disk space | |
| run: ${{ matrix.check_disk_space }} | |
| # Remove unused pre-installed software as the runner runs out of space otherwise | |
| # Currently freeing up about 17.7G, ~20% | |
| - name: "[ubuntu/android] Free up disk space" | |
| if: runner.os == 'Linux' | |
| run: | | |
| df -h | |
| sudo apt-get autoremove -y && sudo apt-get clean | |
| sudo rm -rf /home/packer # Free up 677M | |
| sudo rm -rf /opt/az # Free up 649M | |
| sudo rm -rf /opt/google # Free up 378M | |
| sudo rm -rf /opt/hostedtoolcache/CodeQL # Free up 1.6G | |
| sudo rm -rf /opt/hostedtoolcache/go # Free up 808M | |
| sudo rm -rf /opt/hostedtoolcache/node # Free up 532M | |
| sudo rm -rf /opt/hostedtoolcache/PyPy # Free up 520M | |
| sudo rm -rf /opt/hostedtoolcache/Python # Free up 1.5G | |
| sudo rm -rf /opt/microsoft # Free up 781M | |
| sudo rm -rf /opt/pipx # Free up 499M | |
| sudo rm -rf /usr/lib/google-cloud-sdk # Free up 957M | |
| sudo rm -rf /usr/local/julia1.11.7 # Free up 996M | |
| sudo rm -rf /usr/local/share/powershell # Free up 1.3G | |
| sudo rm -rf /usr/share/dotnet # Free up 3.4G | |
| sudo rm -rf /usr/share/swift # Free up 3.2G | |
| sudo rm -rf /usr/local/share/vcpkg # Size unknown, but obvious duplicate | |
| - name: Check available disk space after cleanup | |
| if: runner.os == 'Linux' | |
| run: ${{ matrix.check_disk_space }} | |
| - name: Build packages | |
| run: ./vcpkg install --vcpkg-root=${{ matrix.vcpkg_path }} --clean-after-build --recurse --feature-flags="-compilertracking,manifests,registries,versions" --x-abi-tools-use-exact-versions | |
| working-directory: ${{ matrix.vcpkg_path }} | |
| - name: "[Windows] Sign release DLLs" | |
| env: | |
| AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} | |
| if: runner.os == 'Windows' && env.AZURE_TENANT_ID | |
| uses: azure/trusted-signing-action@v0.5.11 | |
| with: | |
| azure-tenant-id: ${{ secrets.AZURE_TENANT_ID }} | |
| azure-client-id: ${{ secrets.AZURE_CLIENT_ID }} | |
| azure-client-secret: ${{ secrets.AZURE_CLIENT_SECRET }} | |
| endpoint: https://weu.codesigning.azure.net/ | |
| trusted-signing-account-name: mixxx | |
| certificate-profile-name: mixxx | |
| files-folder: ${{ matrix.vcpkg_path }}/vcpkg_installed/${{ matrix.vcpkg_triplet }}/bin | |
| files-folder-filter: dll | |
| file-digest: SHA256 | |
| timestamp-rfc3161: http://timestamp.acs.microsoft.com | |
| timestamp-digest: SHA256 | |
| timeout: 600 | |
| - name: "[Windows] Sign release plugins" | |
| env: | |
| AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} | |
| if: runner.os == 'Windows' && env.AZURE_TENANT_ID | |
| uses: azure/trusted-signing-action@v0.5.11 | |
| with: | |
| azure-tenant-id: ${{ secrets.AZURE_TENANT_ID }} | |
| azure-client-id: ${{ secrets.AZURE_CLIENT_ID }} | |
| azure-client-secret: ${{ secrets.AZURE_CLIENT_SECRET }} | |
| endpoint: https://weu.codesigning.azure.net/ | |
| trusted-signing-account-name: mixxx | |
| certificate-profile-name: mixxx | |
| files-folder: ${{ matrix.vcpkg_path }}/vcpkg_installed/${{ matrix.vcpkg_triplet }}/Qt6/plugins | |
| files-folder-filter: dll | |
| files-folder-recurse: true | |
| file-digest: SHA256 | |
| timestamp-rfc3161: http://timestamp.acs.microsoft.com | |
| timestamp-digest: SHA256 | |
| timeout: 600 | |
| - name: "[Windows] Sign qml DLLs" | |
| env: | |
| AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} | |
| if: runner.os == 'Windows' && env.AZURE_TENANT_ID | |
| uses: azure/trusted-signing-action@v0.5.11 | |
| with: | |
| azure-tenant-id: ${{ secrets.AZURE_TENANT_ID }} | |
| azure-client-id: ${{ secrets.AZURE_CLIENT_ID }} | |
| azure-client-secret: ${{ secrets.AZURE_CLIENT_SECRET }} | |
| endpoint: https://weu.codesigning.azure.net/ | |
| trusted-signing-account-name: mixxx | |
| certificate-profile-name: mixxx | |
| files-folder: ${{ matrix.vcpkg_path }}/vcpkg_installed/${{ matrix.vcpkg_triplet }}/Qt6/qml | |
| files-folder-filter: dll | |
| files-folder-recurse: true | |
| file-digest: SHA256 | |
| timestamp-rfc3161: http://timestamp.acs.microsoft.com | |
| timestamp-digest: SHA256 | |
| timeout: 600 | |
| - name: Upload GitHub Actions artifacts of build logs | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: logs-${{ matrix.deps_name }} | |
| path: ${{ matrix.vcpkg_path }}/buildtrees/**/*.log | |
| - name: Create buildenv archive | |
| run: ./vcpkg export --vcpkg-root=${{ matrix.vcpkg_path }} --x-all-installed --zip --output=${{ env.DEPS_BASE_NAME }}-${{ env.MIXXX_VERSION }}-${{ matrix.deps_name }}-${{ steps.vars.outputs.sha_short }} --output-dir=${{ matrix.vcpkg_path }} | |
| working-directory: ${{ matrix.vcpkg_path }} | |
| - name: "[Windows x64] Install additional tools" | |
| if: matrix.os == 'windows-2022' && env.SSH_PASSWORD != null | |
| env: | |
| SSH_PASSWORD: ${{ secrets.DOWNLOADS_HOSTGATOR_DOT_MIXXX_DOT_ORG_KEY_PASSWORD }} | |
| run: | | |
| $Env:PATH="C:\msys64\usr\bin;$Env:PATH" | |
| pacman -S --noconfirm coreutils bash rsync openssh | |
| Add-Content -Path "$Env:GITHUB_ENV" -Value "PATH=$Env:PATH" | |
| - name: "[Windows ARM64] Install additional tools" | |
| if: matrix.os == 'windows-11-arm' && env.SSH_PASSWORD != null | |
| env: | |
| SSH_PASSWORD: ${{ secrets.DOWNLOADS_HOSTGATOR_DOT_MIXXX_DOT_ORG_KEY_PASSWORD }} | |
| run: | | |
| choco install msys2 -y | |
| $Env:PATH="C:\tools\msys64\usr\bin;$Env:PATH" | |
| pacman -S --noconfirm coreutils bash rsync openssh | |
| Add-Content -Path "$Env:GITHUB_ENV" -Value "PATH=$Env:PATH" | |
| - name: "Upload build to downloads.mixxx.org" | |
| if: github.event_name == 'push' && env.SSH_PASSWORD != null | |
| # Use retry loop to work around intermittent transfer issue | |
| uses: nick-fields/retry@9417ab499314dfe692edb043ded2ff9b3f5f0a68 # v3 | |
| with: | |
| max_attempts: 10 | |
| timeout_minutes: 20 | |
| retry_wait_seconds: 5 | |
| command: | | |
| cd ${{ matrix.vcpkg_path }} | |
| .github/deploy.sh ${{ env.DEPS_BASE_NAME }}-${{ env.MIXXX_VERSION }}-${{ matrix.deps_name }}-${{ steps.vars.outputs.sha_short }}.zip | |
| env: | |
| DESTDIR: public_html/downloads/dependencies | |
| OS: ${{ runner.os }} | |
| SSH_HOST: downloads-hostgator.mixxx.org | |
| SSH_KEY: ${{ secrets.DOWNLOADS_HOSTGATOR_DOT_MIXXX_DOT_ORG_KEY }} | |
| SSH_PASSWORD: ${{ secrets.DOWNLOADS_HOSTGATOR_DOT_MIXXX_DOT_ORG_KEY_PASSWORD }} | |
| SSH_USER: mixxx | |
| UPLOAD_ID: ${{ github.run_id }} | |
| - name: Upload GitHub Actions artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ env.DEPS_BASE_NAME }}-${{ env.MIXXX_VERSION }}-${{ matrix.deps_name }}-${{ steps.vars.outputs.sha_short }} | |
| path: ${{ matrix.vcpkg_path }}/${{ env.DEPS_BASE_NAME }}-${{ env.MIXXX_VERSION }}-${{ matrix.deps_name }}-${{ steps.vars.outputs.sha_short }}.zip | |
| # Workaround for https://github.com/actions/cache/issues/531 | |
| - name: Use system tar & zstd from Chocolatey for caching | |
| shell: bash | |
| run: | | |
| echo "C:/Windows/System32;C:/ProgramData/Chocolatey/bin" >> $GITHUB_PATH |