CI pipeline improvments for C++ Insights

A little over a year ago, I added support for running C++ Insights natively on ARM (see this post for more details C++ Insights with Clang 18 and more). I use the ARM build for my local instance of C++ Insights I'm running for all my training classes or talks, along with Compiler Explorer.

Building ARM binary with QEMU and Docker

As I mentioned in the previous post, the ARM build did increase build times. I used a QEMU image together with Docker to get an ARM Linux on an AMD Linux and all that in a GitHub Action runner. I accepted compile times going up from 15 minutes to something like 45 minutes. However, things seem to have worsened over time. Build times did go up to 4 hours! Here is a screenshot:

GitHub build time with QEMU Docker approach

While I was still grateful for GitHub providing all the infrastructure for free for open-source projects, fixing things or adding new features stopped being fun. Pushing a new thing took practically a day (and this is without me forgetting after 4 hours to trigger the next step in the CI pipeline).

Trying to speed it uo

Luckily, the other day I stumbled over this post from GitHub: Linux arm64 hosted runners now available for free in public repositories

So the not so fun part was adjusting the workflow yml, removing the hand-rolling Docker setup, and instead going back to GitHub's native way of running a Docker container instead of the normal runner. Adjusting the build matrix and making the usual mistakes with yml. The question was, how fast will this new setup be? Will it be worth the effort? Effort-wise, I spent an evening after the WG21 in Sofia. Here is the result:

GitHub build time with native Linux ARM

Yes, the build time is now around 5 minutes! That's a super speed up.

Thank you, GitHub and ARM, for brining this ability for open-source projects (and paid customers, of course) to GitHub Actions!

The good thing is that at the same time, I also adjusted the CI building the Docker container, which is run by the C++ Insights website. Due to the bad build times, I recently had to remove tests for ARM, which worried me a lot. With the new native ARM Linux ability, I could add the tests again, and the build is still faster.

Unless you're using ARM, you might notice little from this change, accept that I might be more tempted to fix the issues you alert me about or merge your PRs.

Support the project

You can support the project by becoming a GitHub Sponsor, or Patreon or, of course, with code contributions.

Andreas