Two simple tricks to tune your github actions runtime – Michael Ablassmeier – ..

submited by
Style Pass
2021-08-18 08:00:05

Github actions are a nice thing, spin up your preferred operating system and execute some tests. While implementing them in one of my projects, i had to trial and error and: waiting for the tests to complete is an annoying situation!

Using the ubuntu-latest image and installing several software components, two lines catched my eyes while waiting for the packages to install:

The reason for these log messages is quite simple. If you install any package on ubuntu-latest, it detects added manpages and altered system settings that need to be applied to the systems initramfs.

Re-computing the initramfs is a quite cpu and storage intensive operation and it comes with some real time penalty! Updating the manpages database does so too.

So why do it if you spin up just a throwaway machine? Lets disable these triggers with two simple commands in your github workflow:

I’ve seen these to save up to 30 seconds during testing, depending on how many packages you install (for man-db) and general actions load, of course!

Leave a Comment