Skip to content

Commit

Permalink
Replace Xprotect workaround with running hdiutil via sudo
Browse files Browse the repository at this point in the history
  • Loading branch information
fwcd committed Jul 8, 2024
1 parent 951f76a commit 70a6d24
Showing 1 changed file with 4 additions and 18 deletions.
22 changes: 4 additions & 18 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,12 @@ env:
MIXXX_ROOT: '${{ github.workspace }}/mixxx'
SCRIPTS_ROOT: '${{ github.workspace }}/scripts'
XCODE_ROOT: /Applications/Xcode_15.2.app
# On macOS we have to work around an issue with hdiutil and CPack,
# hence why we force it to run with elevated permissions
# See https://github.com/actions/runner-images/issues/7522#issuecomment-1564467252
CMAKE_ARGS_MACOS: >-
-DMACOS_BUNDLE=ON
-DCPACK_COMMAND_HDIUTIL='/usr/bin/sudo /usr/bin/hdiutil'
# 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
Expand Down Expand Up @@ -128,24 +132,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

0 comments on commit 70a6d24

Please sign in to comment.