From f98b106cc9431acb4128c8db811cea015fdc7e57 Mon Sep 17 00:00:00 2001 From: Vito Van Date: Fri, 24 Nov 2023 16:05:27 +0800 Subject: [PATCH] try fixing create-dmg resource busy --- .github/workflows/calm.yml | 3 +++ s/dev/darwin/pack.sh | 8 ++++++++ s/usr/macos/dmg.lisp | 2 ++ 3 files changed, 13 insertions(+) diff --git a/.github/workflows/calm.yml b/.github/workflows/calm.yml index e7875d0..57294d0 100644 --- a/.github/workflows/calm.yml +++ b/.github/workflows/calm.yml @@ -95,6 +95,9 @@ jobs: - name: Build run: | + # install it before executing the script + # to work around resource busy thing + brew install create-dmg bash build/build.sh ls -lah . diff --git a/s/dev/darwin/pack.sh b/s/dev/darwin/pack.sh index dd82fa9..1137069 100644 --- a/s/dev/darwin/pack.sh +++ b/s/dev/darwin/pack.sh @@ -18,6 +18,14 @@ export DIST_DIR=./calm-dist/ ./calm make-bundle +if [ -n "${CI}" ]; then + echo working around for macos-13 on github ... + # A workaround mentioned here https://github.com/actions/runner-images/issues/7522 + echo killing...; sudo pkill -9 XProtect >/dev/null || true; + echo waiting...; while pgrep XProtect; do sleep 3; done; +fi + + export DMG_ICON=./build/calm-dmg.icns ./calm make-dmg diff --git a/s/usr/macos/dmg.lisp b/s/usr/macos/dmg.lisp index 1f39704..8cad3ff 100644 --- a/s/usr/macos/dmg.lisp +++ b/s/usr/macos/dmg.lisp @@ -16,6 +16,8 @@ (u:exec (str:concat + ;; https://github.com/actions/runner-images/issues/7522#issuecomment-1566746364 + (if (uiop:getenv "CI") "sudo " "") "create-dmg " " --hdiutil-verbose --volname \"" app-name " - CALM\"" " --volicon \"" dmg-icon "\""