I've made it a habit to setup Continuous Integration (CI) pipelines for each of my personal side projects. A CI pipeline can run all tests within a project automatically, and provide immediate feedback if there's any failures. This has given me more confidence in the software I write, and has resulted in better quality code written.
If you're building an open source project, there are a number of free solutions available to automatically build and test your code. These services also have Continuous Deployment (CD) built-in as well, so you can also automatically deploy your project to production after all tests pass. In no particular order, I list each of the services I have found below, and what they offer for free, open source, users.
Image Source: https://boards.greenhouse.io/circleci
CircleCI is one of the most well-known providers of CI and CD out there. Originally founded in 2011 and based in San Francisco, they provide solutions for open source developers and business alike.
They have a free plan that includes 1 concurrent job and 2,500 free credits per week for builds. Under the free usage plan, tests run on machines offering 2 CPUs and 4GB of memory. There is also no active user limit on the free usage plan. I have several side projects on CircleCI, and the free plan suits my needs.
edit (Oct. 12): CircleCI also provides a free, open-source plan for public repositories, which contains 400,000 free credits per month for Linux builds, and 25,000 credits per month for macOS builds (on request).
Image Source: https://docs.travis-ci.com/
Founded in 2011 and based in Berlin, Germany, Travis CI is also a popular solution for both public and private projects.
Travis CI states that there will be no explicit pricing plan for open source projects and that for these types of projects, they'll always be free. All open source projects get 5 concurrent jobs and unlimited builds for free.
I have several of my older side projects on Travis, but have since switched over to CircleCI because I found them to be more reliable in my personal (anecdotal) experience.
Image Source: https://status.appveyor.com/
AppVeyor is another CI service founded in 2011, and based in Vancouver, Canada. They specialize in CI solutions for Windows software — providing more Windows Server images than the other solutions mentioned in this article. However, they also provide macOS and Linux build options too.
Their free plan only allows you to run 1 concurrent job, but if you hook up your own machines to run your builds, you can get 5 concurrent jobs for free. They also have a build time restriction of 60 minutes for free plans.
Image Source: https://github.com/drone/drone
Founded in 2012, acquired in August 2020 by Harness, and based in San Francisco, Drone CI specializes in providing a simple, lightweight Docker image that can be deployed onto a server. Additional runners can then be installed that poll the server container for tasks to run.
They also provide a free service for open source repositories called Drone Cloud.
GitHub also provides their own CI/CD solution called GitHub Actions. It can also be used for many other purposes such as issue creation and automatic comments in PRs. You can also utilize third-party plugins to automate workflows. This can be a good option if your repository is hosted on GitHub.
Free plans include 2,000 minutes per month, and they are used up at different rates depending on operating system. At the time of this writing, a minute used up in a Linux system uses 1 minute of the plan, a minute in Windows uses up 2 minutes, and a minute in macOS uses up 10 minutes. Read more here.
Like GitHub, GitLab also provides their own CI/CD solution for their repositories. Also, like GitHub Actions, they provide third-party plugins and the ability to automate workflows besides building and testing.
Their free plan has sadly been reduced to 400 a month from 2,000 as of September 1. However, like with GitHub Actions, it's still an option to consider if your project is hosted on GitLab. You can learn more about the specs of the runners they use here.
edit (Sept. 26): @_garybell mentions in the comments that GitLab also has an Open Source Program that allows open source projects to have Gold status for free, which contains 50,000 CI minutes. If your open source project(s) are eligible you can apply here.
As someone just using CI for personal, open source, side projects, I can go with any of the options mentioned in this article. However, if I were to have an open source project with a large contributor base, I would have to consider the tradeoffs more carefully. I think it's great though that there are many options available to set up CI for a project. I wanted the focus of this article to be on highlighting the different solutions available and make it known for software developers what they can use for CI in their projects.
I personally recommend anyone working on side projects to practice using CI. I have worked at several workplaces now that use CI for their projects, and I realize it's great to have a system like this in place to ensure correctness of new features and bugfixes. Therefore, I believe it's important to get familiar with these types of tools and understand how they can help software developers write better code.
If there's another free CI solution out there that I did not mention in this article, do not hesitate to mention it in the comments. Cheers!