According to the GitHub blog, GitHub has unveiled major improvements to its continuous integration and continuous delivery (CI/CD) pipeline by using Apple Silicon Runner to significantly reduce testing time for iOS applications.
GitHub Actions and Apple Silicon integration
As part of a joint effort, the GitHub iOS and GitHub Actions teams have integrated the Apple Silicon-based macOS launcher into their workflow. This integration allowed the team to test new runner images and hardware long before they were released to the developer community. The introduction of the M1 macOS launcher, available for free from public repositories, is a game-changer for performance-intensive tasks.
Improved test efficiency
Previously, the GitHub iOS team used a single workflow to build and test their entire codebase, a process that took 38 minutes to complete. The team decided to leverage the computing power of Apple Silicon to accelerate this process. By switching to the M1 macOS runner and splitting the test suite into separate tasks for each module, the team reduced testing time by 60%, from 38 minutes to just 15 minutes.
This modular approach allows for faster feedback and easier problem identification and resolution within specific modules. Some small modules can complete testing in just 2 to 3 minutes, significantly increasing developer productivity.
Take down the monolith
The transition to Apple Silicon Runner involved splitting the monolithic build and test process into smaller, independent tasks. This granular approach allows for faster feedback loops and faster problem identification, thereby improving the overall efficiency of the development process.
Each build request is processed by GitHub Actions, which prepares the virtual machines needed to run the workflow. This streamlined process ensures that CI work is efficiently distributed across available resources.
CI performance analysis
Additional optimizations were made by dividing the CI process for each module into separate build and test phases using xcodebuild’s Build Without Test and Test Without Build features. This allowed the team to pinpoint long-running tests and optimize them for better performance.
Advantages of Apple Silicon
Apple Silicon offers many benefits, including improved build performance, improved stability, and native testing for all Apple platforms. By avoiding cross-compilation or emulation issues, the GitHub iOS team can ensure compatibility with the latest versions of iOS, iPadOS, watchOS, and tvOS. The availability of concurrent executors further improves your team’s ability to perform parallel testing.
Getting started with macOS Runner
Hosted on GitHub, the macOS launcher is easily accessible through YAML-based configuration of workflow files. This integration allows development teams to leverage the power of Apple Silicon and streamline CI/CD processes.
With these enhancements, GitHub continues to push the boundaries of developer productivity and efficiency, enabling teams to deliver high-quality applications faster than ever before.
Image source: Shutterstock
. . .
tag