When you are using a Mac as a build machine you need it to run 24/7. By default, Macs have Energy Saver settings such that they will go to sleep. When the Mac goes to sleep, it will take any build agents on the machine offline. To prevent your Mac from going to sleep, we are going to adjust its Energy Saver settings.
- Press Command (⌘) - Space
- Type Energy
- Press Enter
- Check Prevent computer from sleeping automatically when the display is off
Or you can drag the slider to Never
- Click OK to dismiss warning
- Press Command (⌘) - Q
Now your agent will always be available for your CI builds.