Building Tools

How To Build Go & C Code for Windows using Github Actions

A few weeks ago, a friend of mine needed a small program that accepts data in a CSV format and produces some reports. The code itself was very simple – I’ve chosen Go because I wanted to produce an executable that could run on any machine. No runtime dependencies are required.
The fun part started when he asked to generate the PDF reports. I’ve found a good C library, wkhtmltopdf, and a Go bindings library. I got it working and was able to produce PDF files on my Mac machines pretty fast. The problem: My friend needed a Windows binary! How can I set up a CI/CD pipeline to build the executable with support for the native C library? This is the story I am planning to tell today. If you’re just interested in the TL;DR, you can just check the workflow file on Github.
So, without further ado, let’s begin! Continue reading “How To Build Go & C Code for Windows using Github Actions”