From 24 minutes to 10: faster FreeCAD builds on Linux and Windows
Faster runners halved FreeCAD's Linux and Windows CI time. Preparing the Windows dependencies in Fleet pools took off the wait before every build.
Updated on 19 Oct 2026: every number is now the average of three runs per cache state, and the post now covers FreeCAD’s Windows build too.
FreeCAD is a popular, actively maintained open-source 3D modeller written in C++.
The product is shipped regularly via GitHub Actions with their linux builds taking ~24m and windows builds taking ~44m on GitHub managed standard public instances. This is pretty reasonable for a large project such as this and is also a good enough time to stretch and make a coffee (or a small meal) between builds.
But not for us.
We believe Continuous Integration needs to be, well, continuous, as much as possible. There’s no reason why you’d have an agent speed up code production and not speed up shipping it out to the world.
So here’s how we got FreeCAD’s Linux workflow from 24m to 10, and its Windows workflow from 44m to 21:
First, we created a better baseline#
We swapped GitHub’s hosted runner for an equivalent AWS m8azn instance with RunsOn and kept everything else the same.
runs-on: ubuntu-24.04runs-on: runs-on=${{ github.run_id }}/family=m8azn.xlarge/image=ubuntu24-full-x64m8azn.large matches the 2 vCPU and 8 GB of GitHub’s private runner, and m8azn.xlarge matches the 4 vCPU and 16 GB of the public one.
And thanks to just better hardware, this halved the total workflow time right out the gate:
| Runner | CPU / RAM | Cold | Warm | Warm + change | Cost/run, warm (On-demand) | Cost/run, warm (Spot) |
|---|---|---|---|---|---|---|
GitHub ubuntu-24.04, private | 2 / 8 GB | 174m02s | 37m38s | 33m57s | $0.230 | — |
RunsOn m8azn.large | 2 / 8 GB | 67m42s ↓61% | 14m01s ↓63% | 14m18s ↓58% | $0.0548 ↓76% | $0.0173 ↓92% |
GitHub ubuntu-24.04, public | 4 / 16 GB | 86m37s | 23m11s | 21m13s | Free | — |
GitHub github24-4cpu-x64, larger runner | 4 / 16 GB | 93m15s | 22m18s | 22m40s | $0.272 | — |
RunsOn m8azn.xlarge | 4 / 16 GB | 38m59s ↓58% | 10m04s ↓55% | 10m12s ↓55% | $0.0754 ↓72% | $0.0282 ↓90% |
The public ubuntu-24.04 runner is free, so we also ran GitHub’s 4 vCPU larger runner to have a GitHub runner we can compare with on both performance and price. The 2 vCPU arrows are against the private ubuntu-24.04 runner and the 4 vCPU ones against the larger runner.
For most people, this is more than reasonable value by swapping just 1 line of config.
Then we did the same for Windows#
FreeCAD’s Windows workflow is a different beast altogether.
Every run downloads a ccache binary and FreeCAD’s 651 MB LibPack, which bundles every prebuilt dependency FreeCAD needs on Windows, then compiles with msbuild through ccache and runs the CLI tests.
It runs on windows-2022, so we gave it the same m8azn instances running Windows:
runs-on: windows-2022runs-on: runs-on=${{ github.run_id }}/family=m8azn.xlarge/image=windows25-full-x64/volume=100gb:gp3:400mbs:3000iopsSame story, the build time halved:
| Runner | CPU / RAM | Cold | Warm | Warm + change | Cost/run, warm (On-demand) | Cost/run, warm (Spot) |
|---|---|---|---|---|---|---|
GitHub windows-2022, private | 2 / 8 GB | 296m20s | 66m20s | 60m47s | $0.670 | — |
RunsOn m8azn.large | 2 / 8 GB | 129m40s ↓56% | 29m54s ↓55% | 29m29s ↓51% | $0.172 ↓74% | $0.0750 ↓89% |
GitHub windows-2022, public (priced at the larger-runner rate) | 4 / 16 GB | 191m00s | 43m33s | 43m23s | $0.968 | — |
RunsOn m8azn.xlarge | 4 / 16 GB | 88m47s ↓54% | 22m06s ↓49% | 21m47s ↓50% | $0.248 ↓74% | $0.101 ↓90% |
GitHub’s 4 vCPU Windows larger runner only runs the Windows Server 2025 and Windows 11 images, and GitHub’s 2025 image now ships Visual Studio 2026, which FreeCAD’s pinned CMake can’t build with. So we priced the public windows-2022 runner’s time at the 4 vCPU Windows larger runner’s $0.022/min instead.
Now, if you want to go further, RunsOn provides a few neat tricks that we can make use of, as easily:
Making way for the critical path#
The fundamental idea of CI is to test what you built and get feedback on it so that you can iterate on your product as quickly as possible at scale.
So ideally you’d want your CI to build the code and test it as quickly as possible and do just that.
But it gets tricky when you have a product as large and intricate as FreeCAD that needs dependencies installed every time it needs to be built in an ephemeral CI environment. This eventually becomes a significant problem as the codebase and the dependencies grow over time.
On Linux, RunsOn already installs FreeCAD’s 771 apt packages in 51 seconds, against about 3 minutes on GitHub, so there isn’t much left to take off there. On Windows there’s more in the way:
| Step | GitHub private, 2 vCPU | RunsOn, 2 vCPU | GitHub public, 4 vCPU | RunsOn, 4 vCPU |
|---|---|---|---|---|
| Waiting for a runner | 3s | 1m26s | 3s | 1m34s |
| LibPack and ccache | 1m50s | 54s | 1m53s | 56s |
| CMake configure | 6m15s | 2m20s | 2m40s | 1m30s |
| Compile | 52m31s | 22m54s | 34m09s | 16m07s |
| CLI tests | 3m17s | 2m25s | 3m07s | 2m02s |
Every run fetches the same LibPack and ccache again, and a fresh Windows instance takes a minute and a half to boot before the job can even start.
However with RunsOn, this problem becomes trivial.
Prepare before the build arrives#
The preinstall hook runs setup while preparing the machine, and on Windows it takes a PowerShell script. In our Fleet stack, we defined the two Windows runners with one:
runners = { windows-freecad-large = { cpu = [2] ram = [8] family = ["m8azn"] image = "windows25-full-x64" volume = "100gb:gp3:400mbs:3000iops" preinstall = file("${path.module}/scripts/freecad-preinstall.ps1") } windows-freecad-xlarge = { cpu = [4] ram = [16] family = ["m8azn"] image = "windows25-full-x64" volume = "100gb:gp3:400mbs:3000iops" preinstall = file("${path.module}/scripts/freecad-preinstall.ps1") }}The script downloads the same LibPack and ccache the workflow would, into the same folders, checks both against pinned SHA-256s, and only writes a manifest once everything worked:
Get-Verified $libpackUrl "$work\libpack.7z" $libpackSha256& $sevenZip x "$work\libpack.7z" "-o$work\libpack" -y | Out-NullMove-Item -Force "$work\libpack\$libpackName\*" "C:\FC\libpack\"
Get-Verified $ccacheUrl "$work\ccache.zip" $ccacheSha256Expand-Archive -Force "$work\ccache.zip" "$work\ccache"Copy-Item -Force "$work\ccache\$ccacheName\ccache.exe" "C:\FC\ccache\cl.exe"
Set-Content -Path "C:\FC\preinstall-manifest.txt" -Value @($libpackName, $ccacheName)Then the workflow can replace both downloads with a quick check that the prepared versions are the ones it expects:
- name: Get Ccache uses: ./.github/workflows/actions/windows/getCcache with: ccachebindir: ${{ env.ccachebindir }}
- name: Get Libpack uses: ./.github/workflows/actions/windows/getLibpack with: libpackdir: ${{ env.libpackdir }}- name: Verify preinstalled LibPack and ccache run: | $expected = @('LibPack-26.3.0-v3.5.3-x64-Release', 'ccache-4.9-windows-x86_64') if (Compare-Object $expected @(Get-Content C:\FC\preinstall-manifest.txt)) { throw "preinstall manifest mismatch" }But since RunsOn also spawns ephemeral runners by default, these dependencies will still get prepared every time this workflow is queued, while the job waits for its runner. This presents us with 2 solutions:
- Create, use and maintain a custom runner image thats purpose built for this project.
- Preinstall dependencies in a runner machine once, and keep it running.
One is not better than the other as it totally depends on what you need. Though I’d assume most people would prefer not having to create and maintain a whole runner image right of the bat. So choosing the second option becomes much more feasible without being a fuss.
Enter pools#
What’s better is that you don’t even need an instance running at all times if you choose to. You can just have the disk an instance uses already warmed up and ready to go:
fleets = { windows-freecad-build = { runner = "windows-freecad-xlarge" runner_group = github_enterprise_actions_runner_group.runs_on.name max_runners = 3 timezone = "UTC" schedule = [ { name = "default" hot = 0 stopped = 3 } ] }}When you define a schedule for your Fleet runners, you essentially create a pool with that amount of runner instances.
A stopped instance is an instance that boots with the runner image, prepares the EBS volume (with preinstalled dependencies if any) and stops. This only stops the AWS instance and doesn’t detach the prepared EBS volume. When queued, it only boots the instance and is ready to go.
You can also have a hot instance that is always running if you prefer.
So by using a stopped instance with pre-installed dependencies, the warm Windows builds lost both the downloads and most of the wait:
| Runner | Queue | Job execution | Total |
|---|---|---|---|
m8azn.large, 2 vCPU | 1m26s | 29m54s | 31m20s |
m8azn.large, 2 vCPU, stopped pool + preinstall | 31s | 28m02s | 28m33s ↓9% |
m8azn.xlarge, 4 vCPU | 1m34s | 22m06s | 23m40s |
m8azn.xlarge, 4 vCPU, stopped pool + preinstall | 30s | 21m20s | 21m50s ↓8% |
The pool rows’ cost per run doesn’t include the pool sitting idle: each stopped instance pays for its 100 GB disk, about $0.62 a day, so a pool of three costs about $1.87 a day before it runs anything.
And thats that.
This is how you speed up your workflows with RunsOn by optimising what you need and making way for the critical path: the build and tests.
How the timings and costs stack up across all configs#
On Linux, the better runner does all the work:
| Configuration | Queue | Job execution | Cost/Run (Spot) | Cost/Run (On-demand) |
|---|---|---|---|---|
| GitHub public, 4 vCPU | 3s | 23m11s | — | Free |
| GitHub private, 2 vCPU | 3s | 37m38s | — | $0.230 |
| GitHub larger runner, 4 vCPU | 3s | 22m18s | — | $0.272 |
| RunsOn 2 vCPU | 18s | 14m01s ↓63% | $0.0173 ↓92% | $0.0548 ↓76% |
| RunsOn 4 vCPU | 18s | 10m04s ↓55% | $0.0282 ↓90% | $0.0754 ↓72% |
On Windows, the pool takes off the wait on top of that:
| Configuration | Queue | Job execution | Cost/Run (Spot) | Cost/Run (On-demand) |
|---|---|---|---|---|
| GitHub public, 4 vCPU (larger-runner rate) | 3s | 43m33s | — | $0.968 |
| GitHub private, 2 vCPU | 3s | 66m20s | — | $0.670 |
| RunsOn 2 vCPU | 1m26s | 29m54s ↓55% | $0.0750 ↓89% | $0.172 ↓74% |
| RunsOn 4 vCPU | 1m34s | 22m06s ↓49% | $0.101 ↓90% | $0.248 ↓74% |
| RunsOn 2 vCPU, stopped + preinstall | 31s | 28m02s ↓58% | — | $0.157 ↓77% |
| RunsOn 4 vCPU, stopped + preinstall | 30s | 21m20s ↓51% | — | $0.229 ↓76% |
As you can see, the runner swap is where the money is: a 2 vCPU RunsOn run costs about a quarter of a private GitHub one ($0.172 against $0.670 on-demand, $0.075 on Spot). The pool is about time: 1m50s to 2m47s back on every build, for the price of keeping its disks around.
Plus you get back your time to make coffee and have a proper stretch.
Cheers.