Use a Custom Docker Image
No more full-blown system setup 3x in a row! A simple custom image has all the required libs and utilities pre-installed. This already took builds from 10 minutes to 2 or 3.
Here's the Dockerfile:
FROM gcc
RUN apt update && apt -y install make autoconf libsdl2-dev libsdl2-image-dev doxygen graphviz
I should probably put it up somewhere.