In earlier posts, I have compared Travis CI vs Circle CI, Travis CI vs Jenkins, and Circle CI vs Jenkins. In this article, I’ll be including what is arguably the most popular newcomer to the group of CI/CD service providers. Do you know which is better for your needs?
One of the newest platforms to offer the CI/CD pipeline space is GitHub Actions. Another option that has been around for a few years now and is a great candidate for any CI/CD pipelines is Circle CI. Circle CI is one of the most popular cloud-based CI/CD pipeline providers available today. In this post, I will compare the two platforms and lay out the differences between each, and provide a list of what I believe are the pros and cons of each. Let’s get started!
Check out our related YouTube video:
This is an awesome new player in the CI/CD pipeline space provided by GitHub. They have been around for a long time and are also the most popular SCM provider in the world. GitHub offers great features and a great user experience for their SCM offerings.
GitHub Actions recently joined in the CI/CD pipeline space back in November 2019. It was an instant hit among many companies and people that already used the platform. This allowed for easier integration with code already hosted on GitHub, as well as the option to reduce the number of services you need to subscribe to or purchase to have a complete CI/CD workflow. This is obviously a great feature regarding GitHub Actions. It also allows for much easier viewing of the pipeline status for each build since you do not have to leave GitHub’s website to see any logs and/or errors; the tab is right there as part of your repository’s UI.
You can utilize containers or VMs in your builds and you can also use GitHub Actions to run on GitHub or on-prem.
Use your own VMs, in the cloud or on-prem, with self-hosted runners.
GitHub Actions also has support for the most popular programming languages today. These include Node.js, Python, Java, Ruby, PHP, Go, Rust, .NET, and more. Just like Circle CI, GitHub Actions is also available to build on Linux, macOS, and Windows. However, Circle CI does have a couple of extra options for building images/OS compared to GitHub Actions.
Another great feature of GitHub Actions is the catalog of community-provided Actions you can add to your workflow without re-inventing the wheel. Don’t waste your precious time doing something that someone else has already done! Wondering if someone has already created the action you need in your workflow? Check out the catalog of available Actions here.
The build matrix is another great feature that GitHub Actions has but Circle CI lacks. This allows you to run multiple builds or tests simultaneously using different language versions, platform versions, etc. This can save quite a bit of time and also allow you to see if any certain language versions or platforms break with your new changes. For more information on creating a build matrix and what it can help with, check out this article.
The configuration of GitHub Actions is very similar to that of Circle CI. You create a .github/workflows directory and create YAML files inside that directory. You can create different YAML files for each job or add them all to a single file if you wish. For a full list of available references, you can add to your GitHub Actions config files, check out the reference guide. For a simple example of how to set up a GitHub Actions configuration file, check out our example repo here.
The pricing structure is similar to that of Circle CI. You pay for the amount of time your CI/CD pipelines are running per billing period. They also have a free tier that can be used indefinitely without any cost as long as you stay below the threshold for the free tier. GitHub Actions gives ~2K action minutes per month for free.
Circle CI is one of the most popular cloud-hosted CI/CD providers. It was founded in 2011 and is based in San Francisco, CA. Circle CI is among the most popular CI/CD platforms for open source projects. It has support for a variety of languages with multiple pricing plans available to suit most peoples’ needs. Circle CI currently, as of this writing, is only available for repositories hosted on GitHub and BitBucket.
You can configure Circle CI easily by just creating a file in the root of your SCM repo called
.circleci/config.yml. You can find details on how to configure this file and all the available options here. This allows for the ability to copy the configuration file to multiple repositories and just edit the relevant details specific to that repo and everything will work. S
Some CI/CD tools require setting up the process manually to start with, and each time you create another project, you have to go through those same steps to set it up each time. Some steps could be overlooked or missed from time to time, which is not ideal. This can cause some of your automated processes to not work correctly, and thus possibly cause issues down the road if it goes unnoticed. You can find steps to set up Circle CI with GitHub here. You can find steps to set up Circle CI with BitBucket here.
Circle CI is always free for open-source projects. For projects with private repositories, Circle CI has a free plan that has limited “credits” per week (as of this writing, it is 2500/week). For the default medium size Docker build container, that would give you about 250 minutes a week in build time since the medium docker image build container uses 10 credits per minute. You can use this free plan forever if your projects are not constantly running builds. If your projects only need a few builds a week, this is a great option!
Below is a screenshot listing the majority of build container options available as of this writing and the number of credits per minute each one uses. One advantage Circle CI has over GitHub Actions is the GPU is they had GPU enhanced build option types. If your builds require the heavy lifting of GPU builds, these are a great option to have.
Beyond the free starter plan, Circle CI pricing is based on what they call “credits”. They do not have a paid plan that offers unlimited builds. This is something to keep in mind if you have many projects that are running builds on a consistent basis as this could spike the costs for your team if you do not estimate correctly. The paid plan starts at $30/month. You can find all pricing details for Circle CI here.
Circle CI supports many of today’s most popular programming languages which can be found here.
Pros and Cons
GitHub Actions Pros
- One interface for both your source code repositories and your CI/CD pipelines
- Only 1 bill to pay that includes both your SCM plan and your CI/CD service (if you pay for either now that is)
- Option to create a Build Matrix
- You get around 2x the amount of build time per month on the free tier compared to Circle CI (2500 for GA and 1000 for Circle CI based on default configurations)
- Catalog of available Actions you can utilize without reinventing the wheel
GitHub Actions Cons
- Newer platform. Thus not as quite many features as Circle CI as of yet (although they sure have had a strong start)
- Only available for project repositories hosted on GitHub or GitHub Enterprise
- Does not have GPU-enhanced build options
Circle CI Pros
- They have GPU-enhanced build options for projects needing the extra boot from GPU builds
- Has a free tier (although not as many free build minutes as GitHub Actions)
- More widely used than GitHub Actions (as of this writing) and thus more community-based support
- Can be hooked up to more SCMs than just GitHub or GitHub Enterprise
Circle CI Cons
- Not as many minutes on the free tier as GitHub Actions
- Not as many available plugins to help ease the configuration of actions others have already completed
- Need multiple subscriptions for both SCM and CI/CD services
- Switching back and forth between Circle CI and SCM to see build logs and errors
The best platform for you all depends on your specific needs. If you host your code somewhere other than GitHub.com or GitHub Enterprise, you will be better off using Circle CI. However, if you host your code on GitHub.com or GitHub Enterprise, the choice can be a little more difficult.
For most people, if they have a small number of projects whose CI/CD config files are relatively simple, I would suggest moving over to try GitHub Actions. Don’t disconnect or delete your current pipelines until you try GA out for a project or two, however. Just add the config files in for GA and see how you like the flow and feel of it. Once you verify that GA has everything you need to do your builds properly and successfully, and they have been running for at least a week or two successfully, you can delete your other config files and cancel your previous CI/CD service.
If you have complex projects or projects that need the hefty boost of GPU builds, I would suggest trying out or sticking with Circle CI. They have a few more options to help with more complex build scenarios since they are the mature CI/CD service provider.
Please let me know which platform you think is better or that you prefer using and why in the comments!