From 6dec39e95939699f1cfd11d34b47e5cfbfb9a219 Mon Sep 17 00:00:00 2001 From: Martin Robinson Date: Fri, 24 Nov 2023 11:26:36 +0100 Subject: [PATCH] Try to kill XProtect before running Mac CI (#30779) This is an attempt to fix errors on the Mac CI when running `hdiutil` that look like this: ``` Run python3 ./mach package --release hdiutil: create failed - Resource busy Creating Servo.app Copying files Swapping prefs Finding dylibs and relinking Adding version to Credits.rtf Creating dmg Packaging MacOS dmg exited with return value 1 Error: Process completed with exit code 1. ``` This approach was taken from https://github.com/actions/runner-images/issues/7522. --- .github/workflows/mac.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/mac.yml b/.github/workflows/mac.yml index 2e02efe5300..ea2fe7d35aa 100644 --- a/.github/workflows/mac.yml +++ b/.github/workflows/mac.yml @@ -56,6 +56,13 @@ jobs: name: Mac Build runs-on: macos-13 steps: + # XProtect can cause random failures if it decides that the DMG we create + # during the packaging phase is malware. + # TODO(mrobinson): Is there a way we can do things in a less suspicious way so + # we don't have to kill this service? + - name: Kill XProtectBehaviorService + run: | + echo Killing XProtect.; sudo pkill -9 XProtect >/dev/null || true; - uses: actions/checkout@v3 if: github.event_name != 'pull_request_target' with: