MacOS CI Virtual Image Builder
This package contains a script that can build provisioned virtual box images that contain a minimal installation of macOS for CI purposes. To build such images you'll need:
-
A computer running macOS (you can only virtualize macOS on another computer running macOS)
-
A recent version of Packer
-
The app for the OS you'll want to install. You can obtain installers for most macOS versions through the AppStore. Just install the app through the AppStore on the computer running this script.
-
The Xcode SDK you'll need installed on the image, downloaded to the
xcode
subdirectory of this package. For example, to download the latest release of macOS 10.9 (Mavericks) SDK, do this:$ mkdir xcode && cd xcode $ wget https://github.com/phracker/MacOSX-SDKs/releases/download/10.13/MacOSX10.9.sdk.tar.xz
Once all is in place, run the build.sh
command, passing the version of
macOS you wish to build an image for:
$ ./build.sh 10.9
The build process is divided in 3 (cached) stages:
- Conversion of the macOS installation app into a bootable DMG
- Creation of a OVF file with the base macOS installation
- Creation of the final OVA file with the provisioned macOS installation. The
provisioning consists of the execution, in sequence, of all scripts in the
scripts
directory.
The virtual image, when ready, will be available at the ova
directory.
Deployment
To deploy the newly created virtual image, follow the procedure on configuring a VirtualBox Executor for gitlab CI.