travis-ci/travis-worker — pull request #99 by henrikhodne (2014-10-06 18:39:52+00:00)
Title: Run build script from a Launch Agent (Fix Xcode 6 iOS simulator issue

In Xcode 6, a change was introduced that made Xcode unable to start and connect to the simulator over an SSH connection. We've tried many workarounds for this, and this one seems to work.

It adds a ruby script that listens to a TCP port, and when something connects to it it starts the build script and streams the output back.

This script is then added as a LaunchAgent. Unfortunately, launching a launch agent from an SSH connection still makes the resulting process have the same issues as one launched directly from an SSH session. To work around this, we reboot the VM, which means that launchd itself starts the LaunchAgent as it's supposed to. This currently adds somewhere around 45-55 seconds to the effective "boot time", making builds slower but working.

The plan forward is to move these scripts to the VM itself, so we don't have to reboot the VM every time and speeding up builds again.

See travis-ci/travis-ci#2829.

/cc @travis-ci/mac-team