BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News AWS CodeBuild Now Supports Mac Builds

AWS CodeBuild Now Supports Mac Builds

Amazon has recently announced that AWS CodeBuild, its managed build service, now supports building applications on macOS. However, due to Apple's licensing requirements, developers must still reserve a dedicated macOS fleet to utilize this new option.

Building, testing, signing, and distributing applications for Apple systems (iOS, iPadOS, watchOS, tvOS, and macOS) require the use of Xcode, which runs exclusively on macOS. Although running CI/CD pipelines on Mac instances has always been possible, managing and automating macOS machines has presented various challenges in the fast. Sébastien Stormacq, principal developer advocate at AWS, writes:

The first is to prepare the Amazon Machine Image (AMI) with all the required tools for the build. A minimum build environment requires Xcode, but it is very common to install Fastlane (and Ruby), as well as other build or development tools and libraries. Most organizations require multiple build environments for multiple combinations of macOS and Xcode versions.

AWS CodeBuild is a continuous integration service that provides prepackaged build environments for popular programming languages and tools like Apache Maven and Gradle. It compiles source code, runs unit tests, and produces artifacts. The new CodeBuild images for Mac builds come with macOS and Xcode pre-installed and support a variety of tools and frameworks, including Java, Kotlin, Node.js, Python, Ruby, Rust, and Swift.

CodeBuild for macOS utilizes reserved fleets, leveraging the reserved capacity feature introduced earlier this year, which is designed for building and testing in latency-sensitive scenarios. The service builds artifacts on Apple M2 instances running macOS 14 Sonoma. Stormacq explains the second major challenge that Mac builds on AWS CodeBuild addresses:

Large organizations typically have hundreds or thousands of builds per day, requiring dozens of build machines. Scaling in and out of that fleet helps to save on costs. EC2 Mac instances are reserved for your dedicated use. One instance is allocated to one dedicated host. Scaling a fleet of dedicated hosts requires a specific configuration.

Unlike on-demand fleets, where customers pay per minute of build time, reserved fleets are charged for the entire duration that the build machines are reserved for exclusive use, even when no builds are running. The capacity reservation adheres to Amazon EC2 Mac's 24-hour minimum allocation period, as required by the SLA for macOS. Piero Bozzolo, cloud engineer and serverless developer at Claranet, comments:

For teams or developers with low build frequency (just a few dozen builds a month), this might not be cost-effective. I sincerely hope that Apple will consider and remove the 24-hour minimum lease for their OSs.

According to the AWS documentation, preparing an EC2 Mac instance takes 8-10 minutes. While this isn't specific to CodeBuild, any builds submitted during this preparation time are queued and will be run in order as soon as the machine becomes available.

Mac builds are currently available in only five regions: Ohio, Northern Virginia, Oregon, Frankfurt, and Sydney.

 

About the Author

Rate this Article

Adoption
Style

BT