diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 38217b2..3a9bd93 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -122,24 +122,6 @@ jobs: 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 - - 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 unload -w "system/$daemon" - echo " -> $?" - 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 @@ -238,7 +220,19 @@ jobs: key: ccache-${{ matrix.triplet }}-${{ env.mixxx_commit }}-${{ github.ref }}-${{ github.run_number }} - 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 }}" + run: | + set -e + + # Work around 'Resource busy' errors likely caused by a race condition + # between hdiutil and CPack by killing XProtect. We should replace this + # with a better solution once fixed upstream. + # See https://github.com/actions/runner-images/issues/7522 + while true; do sudo pkill -9 XProtect; sleep 0.2; done & + while pgrep XProtect; do sleep 0.5; done + + cpack -G ${{ matrix.cpack_generator }} -V + mv *.${{ matrix.package_extension }} \ + "mixxx-${{ env.mixxx_version }}-${{ matrix.triplet }}${{ matrix.suffix }}.${{ matrix.package_extension }}" working-directory: ${{ env.MIXXX_ROOT }}/build - name: Upload packaged Mixxx binaries if: matrix.package_extension && matrix.cpack_generator