
12 Improving workflow performance and costs
This chapter covers
- Dealing with high-volume builds
- Reducing the costs of maintaining artifacts
- Improving performance
This short and final chapter of this book will share some insights into how you can improve the performance and costs of your GitHub Actions workflows. We will first look into how we can deal with repos with a high volume of commits that need to be merged. This can incur long wait times for the integration and high costs regarding the number of minutes of build time consumed. Next, we will look into some optimizations you can implement by reducing the cost of artifacts and improving the performance of your workflows by using concepts like caching and changing the runners you use. Let us get started with high-volume repos.
12.1 Dealing with high-volume builds
When you have a team of developers submitting code to the repository frequently using pull requests (PRs), you might have long wait times before your changes are accepted in the main branch. This is caused by the fact that jobs take a long time to complete, which will delay the feedback. You can use two approaches to deal with the number of builds becoming larger and getting slower feedback. One option is to use concurrency groups, and the other is to use merge queues. The next sections will describe this in further detail.