Skip to content

ci/local: Test macOS build #14

ci/local: Test macOS build

ci/local: Test macOS build #14

Workflow file for this run

name: macOS build
permissions:
contents: read
on:
pull_request:
push:
jobs:
build:
runs-on: macos-14
steps:
- name: Install Docker
run: |
brew cask install docker
# allow the app to run without confirmation
xattr -d -r com.apple.quarantine /Applications/Docker.app
# preemptively do docker.app's setup to avoid any gui prompts
sudo /bin/cp /Applications/Docker.app/Contents/Library/LaunchServices/com.docker.vmnetd /Library/PrivilegedHelperTools
sudo /bin/cp /Applications/Docker.app/Contents/Resources/com.docker.vmnetd.plist /Library/LaunchDaemons/
sudo /bin/chmod 544 /Library/PrivilegedHelperTools/com.docker.vmnetd
sudo /bin/chmod 644 /Library/LaunchDaemons/com.docker.vmnetd.plist
sudo /bin/launchctl load /Library/LaunchDaemons/com.docker.vmnetd.plist
open -g -a Docker.app || exit
echo "Checking Docker service..."
ls -l /var/run/docker.sock || echo "Socket not found"
cat ~/Library/Containers/com.docker.docker/Data/log/host/docker.log || echo "Log not found"
# ps aux | grep -i docker
# pgrep Docker
TIMEOUT=20
SECONDS=0
while ! docker system info > /dev/null 2>&1; do
if [ $SECONDS -ge $TIMEOUT ]; then
echo "Docker failed to start within $TIMEOUT seconds."
docker system info
exit 1
fi
echo "Waiting for Docker to be available... ($SECONDS seconds elapsed)"
sleep 1
done
echo "Docker is now available."
- run: |
docker --version