I was working on a desktop application for a client. The application needed installers for Windows, Mac, and Linux for every release. In addition, I wanted to run automated tests to catch any bugs introduced through code changes.
A continuous integration (CI) server could run automated tests and build installers automatically. Implementing CI tests and builds prevents bugs and simplifies development workflow, ultimately saving time and money.
Why CI?
The naive approach to making a software release would be to log into each supported operating system, run the tests, then build the installers.
Doing these tasks manually is not only time-consuming, but also error-prone. Consider the infamous trope of the lazy developer who declares "It works on my machine!" when confronted with a misbehaving program.
Ideally, we want to test and build installers in a pristine, standardized environment that isn't affected by an individual developer's setup. For this desktop application, I knew I would need a Continuous Integration (CI) server to run the tests and build the installers.
What’s CI?
What is Continuous Integration? Like a spellchecker that runs every time you edit a document, a CI server runs tests every time I save my code. Since running tests may take a few minutes, the CI server will email me if there are any problems running the tests. Additionally, the CI server runs security scans to make sure the code is not vulnerable.
For my application, I also configured the CI server to build an installer every time code was marked as ready for a new release. The Mac and Windows installers are additionally signed so they are trusted by the respective operating systems and tied to the organization's identity.
Benefits of CI
Configuring the signing process on the CI servers was time-consuming, but the effort has more than paid off. I can mark code as release-worthy, and the CI system will have installers ready to go in a few minutes. Any developer joining the project can trigger tests and installer builds simply by saving their code, no additional setup required.
While a CI server has initial setup cost and ongoing maintenance, it more than pays for itself in time saved and potential problems avoided. At Level 12, CI is just one of the many ways that we strive to protect your investment in custom software.