We're excited to announce Apple Silicon M1 support in the Harness Continuous Integration (CI) module, enabling faster and more efficient iOS build pipelines.
Apple marked a significant shift in the hardware architecture of its Mac devices when it introduced the M1 chip in 2020. The M1 chip offers major performance improvements over Apple's previous Intel processors, especially in areas such as processing speed, power efficiency, graphics performance, and machine learning. For iOS developers, the potential for faster and more efficient app development has never been greater, and mobile teams are already seeing faster build times when using M1.
At Harness, we recognize the importance of speed and efficiency in CI/CD. To meet this need, we have incorporated M1 machines into our system, enabling our customers to take advantage of the exceptional performance of M1 machines. By combining this powerful hardware with the Harness Cloud infrastructure (our fully managed cloud service offering), developers can optimize their workflow and reduce build times like never before.
In this blog, we'll explore how to use M1 machines in CI/CD pipelines, configure your pipeline to run on our Cloud M1 machines, and build a macOS app using a demo project. Whether you're an iOS developer looking to optimize your workflow or simply curious about how to take advantage of M1 machines for your CI/CD pipelines, this blog is for you.
To configure your CI stage to run on our Cloud M1 machines, simply set the stage’s ‘platform’ property to execute on macOS using ‘ARM64’ architecture. For example:
As an iOS developer, you may need to select a specific Xcode version for building your app. When using Harness Cloud, the machines come equipped with preinstalled software that you can instantly leverage, including multiple xcode versions. The following command can be used to select any of the available Xcode versions on the machine:
For example, the following step sets the machine to use Xcode version 13.4.1 rather than the machine’s default version.
As an iOS developer, you may need to use Rosetta if you are working with apps or tools that have not yet been updated to run natively on Apple Silicon. Rosetta is a technology developed by Apple to bridge the compatibility between Intel and Apple silicon processors. It allows you to run apps that contain x86_64 instructions on Apple Silicon machines.
Rosetta is installed and enabled by default on Harness Cloud M1 machines. To use it, add the "arch -x86_64" prefix in front of each command you run in your scripts. This tells the system to use x86_64 instructions.
Although Rosetta can be a valuable tool for iOS developers, it is important to note that running apps through Rosetta may impact performance. Therefore, it’s recommended to use native Apple Silicon apps whenever possible to ensure optimal performance.
You will have a pipeline similar to the following:
Incorporating Apple Silicon M1 machines into your CI/CD pipeline can lead to faster build times and more efficient app development. With the Harness Cloud infrastructure, utilizing M1 machines has never been easier. We hope this blog has been helpful in providing you with the necessary tools to optimize your workflow and take advantage of the exceptional performance offered by Apple Silicon M1 machines.
Ready to get started with Harness CI/CD? Sign up for a free trial today!