This repository contains the scripts and instructions for setting up an OS X VM like the way the Travis CI OS X build environments are provisioned.
Please note that these instructions were written for the environment that Travis CI runs OS X VMs in (currently vSphere), so you may have to tweak the steps quite a bit if you're trying to set up a VM elsewhere.
This should generally be re-done whenever a new "major" version of OS X comes out (for example OS X 10.9 to OS X 10.10).
- Create a new virtual machine in vSphere. 1 CPU, 4096 MB memory, 50 GiB disk space, attach the OS X install ISO from the datastore (current install ISO is 10.9, we'll upgrade to 10.10 later).
- Power on the VM, and open the console.
- "Use English for the main language".
- Open "Disk Utility" in the "Utilities" menu at the top of the screen.
- Select the main disk (for me it's "53.69 VMware Virtual SATA Hard Drive Media") in the left sidebar, then select the "Erase" tab. Make sure the format is set to "Mac OS Extended (journaled)" and type "Macintosh HD" in the name ("Macintosh HD" is the standard name for the "main system disk" on most Macs). Click "Erase". This sets up the partition table and adds a partition to the disk. Close Disk Utility to go back to the installer.
- Select "Continue" in the installer, then select the "Macintosh HD" disk you just created as the install disk.
- Click "Install". Go have lunch (this step usually takes 20-30 minutes).
- Select "United States" as the region.
- Select "U.S." as the keyboard layout.
- Select "Don't transfer any information now" in the "Transfer information to this Mac" dialogue.
- Skip signing in with an Apple ID.
- Accept the the OS X T&C / Software License Agreement.
- Create an account with the following settings:
- Full name: Travis CI
- Account name:
travis
- Password:
travis
- Do not require password to unlock screen
- Uncheck "Set time zone based on current location"
- Uncheck "Send Diagnostics & Usage data to Apple"
- Select "UTC - United Kingdom" as the location.
- Don't register the Mac.
- Update to the latest version of OS X in the App Store.
- Enable "Remote Login" in the Sharing Preference Pane. This enables SSH.
- Run
xcode-select --install
and work through the dialog boxes that pop up - Disable automatic updates in the App Store preference pane
- Disable every sleep option in the Energy Saver preference pane
- Make sure automatic login is enabled in the Users and Groups preference pane (under Login Options).
- Disable the Screen Saver
- Check in Spotlight that indexing isn't running (wait until it's finished if it is).
- Power off the VM and save this as a new "vanilla image".
- Clone a vanilla image with the right version of OS X.
- Download and install Xcode. Open it and download all the simulators.
- Run
DevToolsSecurity -enable
. - Open the iOS simulator from Xcode โ Open Developer Tools โ iOS Simulator
- Create a test project, build and run unit tests. Then delete the test project.
- Give
travis
no-password sudo access by addingtravis ALL=(ALL) NOPASSWD: ALL
to /etc/sudoers (usevisudo
to prevent breaking sudo) - Run
bootstrap.sh
in this repository. - Run the RubyMotion installer in /opt/homebrew-cask/Caskroom/rubymotion/latest/RubyMotion\ Installer.app