15 ms·
A few months ago I had some issues with build performance. We're on the free plan with Github so using custom runners is not an issue. But I found a nice workar
by jillesvangurp 3y ago
A few months ago I had some issues with build performance. We're on the free plan with Github so using custom runners is not an issue. But I found a nice workaround:
- create a virtual machine with everything you need in gcloud (would work for aws as well). Pick something nice and fast. Suspend it.
- in your github action, resume the vm, ssh into it to run your build script, and suspend it afterwards.
Super easy to implement and easy to script using gcloud commands. It adds about 30 seconds of time to the build for starting the vm. On the machine, we simply pull from git and checkout the relevant branch. Doesn't work for concurrent builds but it's a nice low tech solution. And you only pay for the time the machine is up and running, which is a few minutes per day. So, you can get away with using vms that have lots of CPU and memory.