In the dynamic world of app development, tackling a large-scale project brings its own set of challenges, especially when adopting a poly-repo approach. This strategy, where each app feature is developed as an independent library and then integrated into the main client application, is a boon for teams distributed worldwide. However, it also means dealing with a multitude of repositories, which can make the build and release processes complex. In this context, efficiency isn’t just beneficial; it’s critical.
Here’s a look at our experience transitioning from a Jenkins-based CI/CD setup to leveraging GitHub Actions. This move significantly streamlined our workflow, enhancing productivity and release agility in our Android development endeavours.
The initial challenge we faced was immense, managing over 25 Android repositories through Jenkins, where each had its own pipeline. This setup demanded an extraordinary amount of time and resources, with developers spending upwards of 132 hours per sprint on build-related tasks alone. The monthly release cycle was slow and fraught with manual processes and disjointed workflows.
We encountered a slew of specific issues:
These challenges made it clear that we needed to find a more effective, scalable approach to our CI/CD processes.
The pivotal shift came with the adoption of GitHub Actions. We harnessed the power of reusable workflows by centralising the CI/CD process. This strategic move allowed for the creation of a single, scalable workflow file that could be shared across all repositories. The impact was immediate and striking: developer hours plummeted to just 25 per sprint — that’s a stunning 83% improvement in developer productivity. Release cycles accelerated from a monthly to a weekly cadence, and release engineering tasks were automated, reducing manual intervention to mere clicks for creating and deleting releases.
Centralising the workflow not only streamlined processes but also enhanced consistency and quality across projects. Pre-configured workflows ensured that each repository adhered to the same high standards for unit tests, integration tests, and code quality checks. This uniformity facilitated the early detection of issues, ensuring that all repositories remained release-ready at all times.
The benefits of this centralised approach were multifaceted. It significantly reduced the overhead of maintaining multiple pipelines, freeing up developer time for more critical tasks. Moreover, the consistent application of quality checks across all repositories improved the overall code quality, contributing to a more robust and reliable software delivery process.
The second transformative element was the utilisation of GitHub Packages to manage over 25 Android libraries. We unlocked new efficiencies in the development workflow by publishing and releasing these libraries through GitHub Packages. Integrating library packages into client apps became seamless, drastically improving the debugging process for developers.
A notable advantage of this method was the ability to upload source code alongside the library AAR files. This feature enabled developers to place breakpoints directly within the library source code when debugging client applications, a game-changer for troubleshooting and quality assurance. The enhanced debugging capabilities led to a noticeable improvement in the developer experience and productivity, as issues could be identified and resolved more swiftly and accurately.
The transition to a GitHub Actions-based CI/CD model and the strategic use of GitHub Packages have collectively transformed our Android development landscape. The quantifiable impact on efficiency, quality and developer experience is substantial:
Embracing GitHub Actions and GitHub Packages has revolutionised our approach to managing Android repositories, proving that with the right tools, the challenges of scale and complexity can be transformed into opportunities for efficiency and growth. This journey from chaos to consistency optimised our internal processes and set a new standard for Android development in our organisation.
Reflecting on this journey, I had the opportunity to share these insights at last year’s Droidcon San Francisco, highlighting the practical benefits and the transformative impact of our approach. For those interested in delving deeper, the code snippets and presentation deck from the event are available here. They provide a comprehensive view of how we went from chaos to consistency in our build and release processes.
Shrikant Ballal is a senior staff engineer at Code and Theory.