From 0ebd86f454e7672f618b1448f23f4b8836da6a8f Mon Sep 17 00:00:00 2001 From: fwcd Date: Sun, 12 Nov 2023 12:31:54 +0000 Subject: [PATCH 1/6] Build on macOS 13 in CI --- .github/workflows/build.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 767d94f..6f9afee 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,7 +21,7 @@ jobs: matrix: include: - name: macOS (arm64) - os: macos-11 + os: macos-13 suffix: '' triplet: arm64-osx-min1100-release host_triplet: x64-osx-min1100-release @@ -31,7 +31,7 @@ jobs: cmake_args: >- -DMACOS_BUNDLE=ON - name: macOS (x86_64) - os: macos-11 + os: macos-13 suffix: '' triplet: x64-osx-min1100-release host_triplet: x64-osx-min1100-release @@ -41,7 +41,7 @@ jobs: cmake_args: >- -DMACOS_BUNDLE=ON - name: macOS (arm64, Debug Assertions) - os: macos-11 + os: macos-13 suffix: '-debugasserts' triplet: arm64-osx-min1100-release host_triplet: x64-osx-min1100-release @@ -52,7 +52,7 @@ jobs: -DDEBUG_ASSERTIONS_FATAL=ON -DMACOS_BUNDLE=ON - name: macOS (x86_64, Debug Assertions) - os: macos-11 + os: macos-13 suffix: '-debugasserts' triplet: x64-osx-min1100-release host_triplet: x64-osx-min1100-release From fa1d7f912f152c459f01c289d7036c95289bd719 Mon Sep 17 00:00:00 2001 From: fwcd Date: Sun, 12 Nov 2023 14:32:58 +0000 Subject: [PATCH 2/6] Kill XProtect in CI Hopefully this fixes the issue with `hdiutil` during the creation of the disk image. Other projects such as OBS use the same workaround for now. See https://github.com/actions/runner-images/issues/7522 --- .github/workflows/build.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6f9afee..08feb24 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -212,6 +212,13 @@ jobs: # 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: Work around race condition in CPack + if: runner.os == 'macOS' + run: | + # TODO: Replace this with a better solution + # See https://github.com/actions/runner-images/issues/7522 + echo Killing XProtect...; sudo pkill -9 XProtect >/dev/null || true; + echo Waiting for XProtect process...; while pgrep XProtect; do sleep 3; done; - name: Package Mixxx if: matrix.package_extension && matrix.cpack_generator run: cpack -G ${{ matrix.cpack_generator }} -V && mv *.${{ matrix.package_extension }} "mixxx-${{ env.mixxx_version }}-${{ matrix.triplet }}${{ matrix.suffix }}.${{ matrix.package_extension }}" From e731b4118e2ddde506175b18fcd057708b6186b0 Mon Sep 17 00:00:00 2001 From: fwcd Date: Wed, 28 Feb 2024 22:03:27 +0100 Subject: [PATCH 3/6] Disable XProtect via launchd in CI --- .github/workflows/build.yml | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 08feb24..592af4b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -116,6 +116,24 @@ jobs: run: | ${{ env.SCRIPTS_ROOT }}/install-macos-deps xcrun --show-sdk-version + # TODO: Replace this with a better solution + # See https://github.com/actions/runner-images/issues/7522 + - name: Disable XProtect to work around race condition in CPack + if: runner.os == 'macOS' + run: | + set +e + set -x + daemons=( + com.apple.XProtect.daemon.scan + com.apple.XprotectFramework.PluginService + com.apple.XprotectFramework.scan + com.apple.metadata.mds + com.apple.metadata.mds.index + ) + for daemon in "${daemons[@]}"; do + sudo launchctl stop "$daemon" + sudo launchctl disable "system/$daemon" + done # TODO: Remove this workaround once CMake in GitHub's runner image is # updated to 3.29.2, i.e. the `PACKAGE_PREFIX_DIR` issue is fixed again (the @@ -212,13 +230,6 @@ jobs: # 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: Work around race condition in CPack - if: runner.os == 'macOS' - run: | - # TODO: Replace this with a better solution - # See https://github.com/actions/runner-images/issues/7522 - echo Killing XProtect...; sudo pkill -9 XProtect >/dev/null || true; - echo Waiting for XProtect process...; while pgrep XProtect; do sleep 3; done; - name: Package Mixxx if: matrix.package_extension && matrix.cpack_generator run: cpack -G ${{ matrix.cpack_generator }} -V && mv *.${{ matrix.package_extension }} "mixxx-${{ env.mixxx_version }}-${{ matrix.triplet }}${{ matrix.suffix }}.${{ matrix.package_extension }}" From b32609e5616227234e4f010529d97baf0f9a42ad Mon Sep 17 00:00:00 2001 From: fwcd Date: Wed, 28 Feb 2024 22:06:29 +0100 Subject: [PATCH 4/6] Use Xcode 15.2 in CI --- .github/workflows/build.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 592af4b..6de13b3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -14,6 +14,7 @@ env: VCPKG_ROOT: '${{ github.workspace }}/vcpkg' MIXXX_ROOT: '${{ github.workspace }}/mixxx' SCRIPTS_ROOT: '${{ github.workspace }}/scripts' + XCODE_ROOT: /Applications/Xcode_15.2.app jobs: build: @@ -100,6 +101,8 @@ jobs: with: fetch-depth: '0' # to compute the monotonic version correctly submodules: true + - name: Output runner info + run: uname -a - name: Fetch versions and paths run: | for mod in "${{ env.VCPKG_ROOT }}" "${{ env.MIXXX_ROOT }}"; do @@ -115,6 +118,9 @@ jobs: if: runner.os == 'macOS' run: | ${{ env.SCRIPTS_ROOT }}/install-macos-deps + sudo xcode-select -s "${{ env.XCODE_ROOT }}" + echo "==> Build environment" + xcode-select -p xcrun --show-sdk-version # TODO: Replace this with a better solution # See https://github.com/actions/runner-images/issues/7522 From 995c00291274e9c365b59197cabc86be212517b5 Mon Sep 17 00:00:00 2001 From: fwcd Date: Wed, 28 Feb 2024 22:06:57 +0100 Subject: [PATCH 5/6] Install autoconf and libtool explicitly in CI --- scripts/install-macos-deps | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/install-macos-deps b/scripts/install-macos-deps index ce55a6a..4beac33 100755 --- a/scripts/install-macos-deps +++ b/scripts/install-macos-deps @@ -10,8 +10,10 @@ fi echo "==> Installing system dependencies with Homebrew..." brew install \ automake \ + autoconf \ autoconf-archive \ ccache \ + libtool \ nasm \ ninja \ pkg-config From d33a6d52ea3f311efec7001a1c4c8df396a4fda6 Mon Sep 17 00:00:00 2001 From: fwcd Date: Wed, 28 Feb 2024 22:17:59 +0100 Subject: [PATCH 6/6] Output exit codes --- .github/workflows/build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6de13b3..20eeca0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -138,7 +138,9 @@ jobs: ) for daemon in "${daemons[@]}"; do sudo launchctl stop "$daemon" + echo " -> $?" sudo launchctl disable "system/$daemon" + echo " -> $?" done # TODO: Remove this workaround once CMake in GitHub's runner image is