A runner that ran out of disk halfway through a build

A hosted runner has about fourteen gigabytes free, and a Docker build with a large cache uses all of it without saying so.

- name: reclaim disk
  run: |
    df -h / | tail -1
    sudo rm -rf /usr/share/dotnet /usr/local/lib/android 
                /opt/ghc /usr/local/share/boost
    sudo docker image prune -af
    df -h / | tail -1

# 14 GB free → 38 GB free, in about 40 seconds

The preinstalled toolchains for languages this project does not use are twenty-four gigabytes, and removing them is the standard workaround because there is no smaller image on offer. The forty seconds is a real cost on every build and it is cheaper than the failure mode, which is a build that dies two thirds of the way through with a message about no space left on device.