macos job image: Ensure 25GiB free space in the image
According to the docs the images have 25GiB of space to be used.
The disk image size is predetermined by the packer build task, typically 100GiB, to allow enough space for macos, the various software packages we install, and xcode.
We don't enforce the amount of free space anywhere, and as software dependencies in the images change, so will the amount of free space.
At time of writing the free space in each image is:
- macos-13: 13Gi (this image is set to 80GiB)
- macos-14: 28Gi (100GiB image)
- macos-15: 20Gi (100GiB image)
We could do with either:
- finding a way to analyze free space and increase disk space as required (on the runner host or in the image build process)
- would be ideal, not sure how feasible it is.
- simply verify the amount of free space in the image build, enforcing that it must be at least 25GiB (perhaps at most 30GiB?)
- while simple, this could be annoying when building new images, it'll have to be the very last step in the process.