Skip to content

Commit

Permalink
Update XProtect workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
fwcd committed Jul 8, 2024
1 parent c0ea586 commit 5a35cf3
Showing 1 changed file with 13 additions and 19 deletions.
32 changes: 13 additions & 19 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 5a35cf3

Please sign in to comment.