diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4c072fe..197630a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -25,6 +25,7 @@ jobs: triplet: arm64-osx-min1100 host_triplet: x64-osx-min1015 overlay_ports: vcpkg/overlay/osx:vcpkg/overlay/ports + ccache_path: ~/Library/Caches/ccache cpack_generator: DragNDrop package_extension: dmg cmake_args: >- @@ -34,10 +35,24 @@ jobs: triplet: x64-osx-min1015 host_triplet: x64-osx-min1015 overlay_ports: vcpkg/overlay/osx:vcpkg/overlay/ports + ccache_path: ~/Library/Caches/ccache cpack_generator: DragNDrop package_extension: dmg cmake_args: >- -DMACOS_BUNDLE=ON + - name: Linux (x86_64) + os: ubuntu-latest + triplet: x64-linux + host_triplet: x64-linux + overlay_ports: vcpkg/overlay/ports + ccache_path: ~/.ccache + cpack_generator: TGZ + package_extension: tar.gz + # On Linux we build without battery support since this pulls in a + # dependency on GLib which is tricky to get right in a static linking scenario. + # See https://github.com/fwcd/m1xxx/pull/48#issuecomment-1807378063 + cmake_args: >- + -DBATTERY=OFF name: '${{ matrix.name }}' runs-on: '${{ matrix.os }}' @@ -62,6 +77,9 @@ jobs: done echo "mixxx_version=$(scripts/mixxx-version)" >> "$GITHUB_ENV" shell: bash + - name: Set up Linux build environment + if: runner.os == 'Linux' + run: ${{ env.SCRIPTS_ROOT }}/install-apt-deps - name: Set up macOS build environment if: runner.os == 'macOS' run: | @@ -121,12 +139,12 @@ jobs: - name: Set up build cache uses: actions/cache@v3 with: - path: $HOME/Library/Caches/ccache - key: ccache-${{ env.mixxx_commit }}-${{ github.ref }}-${{ github.run_number }} + path: ${{ matrix.ccache_path }} + key: ccache-${{ matrix.triplet }}-${{ env.mixxx_commit }}-${{ github.ref }}-${{ github.run_number }} restore-keys: | - ccache-${{ env.mixxx_commit }}-${{ github.ref }}- - ccache-${{ env.mixxx_commit }}- - ccache- + ccache-${{ matrix.triplet }}-${{ env.mixxx_commit }}-${{ github.ref }}- + ccache-${{ matrix.triplet }}-${{ env.mixxx_commit }}- + ccache-${{ matrix.triplet }}- - name: Configure Mixxx build run: >- cmake @@ -146,6 +164,13 @@ jobs: - name: Build Mixxx run: cmake --build build --target mixxx working-directory: mixxx + - name: Save build cache + if: always() + uses: actions/cache/save@v3 + with: + # TODO: Share the key with the setup step + path: ${{ matrix.ccache_path }} + key: ccache-${{ matrix.triplet }}-${{ env.mixxx_commit }}-${{ github.ref }}-${{ github.run_number }} - name: Package Mixxx run: cpack -G ${{ matrix.cpack_generator }} -V && mv *.${{ matrix.package_extension }} "mixxx-${{ matrix.triplet }}-${{ env.mixxx_version }}.${{ matrix.package_extension }}" working-directory: mixxx/build diff --git a/mixxx b/mixxx index 8a5855c..3252675 160000 --- a/mixxx +++ b/mixxx @@ -1 +1 @@ -Subproject commit 8a5855cebc3d1e2dc36aee8ad63bf2512a74c12b +Subproject commit 3252675a03f85758f59b99bedd24dbed26aa5654 diff --git a/scripts/install-apt-deps b/scripts/install-apt-deps new file mode 100755 index 0000000..e605009 --- /dev/null +++ b/scripts/install-apt-deps @@ -0,0 +1,27 @@ +#!/bin/bash + +set -e + +echo "==> Installing system dependencies with APT..." +sudo apt-get update +sudo apt-get install -y \ + autoconf-archive \ + autotools-dev \ + ccache \ + cmake \ + libasound2-dev \ + '^libxcb.*-dev' \ + libx11-xcb-dev \ + libgl1-mesa-dev \ + libglu1-mesa-dev \ + libsleef-dev \ + libudev-dev \ + libupower-glib-dev \ + libtool \ + libxrender-dev \ + libxi-dev \ + libxkbcommon-dev \ + libxkbcommon-x11-dev \ + mesa-common-dev \ + nasm \ + ninja-build diff --git a/scripts/install-vcpkg-deps b/scripts/install-vcpkg-deps index f2041d3..d8946ed 100755 --- a/scripts/install-vcpkg-deps +++ b/scripts/install-vcpkg-deps @@ -12,11 +12,13 @@ ROOT = Path(__file__).resolve().parent.parent TRIPLET_OSS = { 'Darwin': 'osx', + 'Linux': 'linux', } TRIPLET_ARCHS = { 'x86_64': 'x64', 'arm64': 'arm64', + 'aarch64': 'arm64', } # Packages to be built for the target architecture @@ -67,6 +69,9 @@ PLATFORM_PACKAGES = { 'hss1394', 'qtkeychain-qt6', # libgcrypt seems to be unsupported on iOS ], + 'linux': [ + 'qtkeychain-qt6', + ], } # Packages to be built for the host architecture when crosscompiling