ci: set up a macos host Script to set up dependencies on a macOS build system. (cherry picked from commit 8734240417a02930593e3a76b56ce6b51441723c)