It depends.Would not it be cheaper to own your Mac Mini?
If you rent a Mac Mini for at least 24 hours whenever you make a commit of your code, you most likely need one Mac Mini every day.
Let's say your team has 200 developers. Let's say each developer needs to build once/day, then you'll need to build and test 200x/day.
This might mean you need 20 Mac Minis sitting there ready to work. You'll need to store these Minis, maintain them, replace them if they break, create secure connections to them, etc. All this costs people and money.
Conversely, if you can just rent them whenever you need them via the cloud, it could cost much less and can scale much better. For example, what if once in a while, you need to build 400x/day? Do you run to the Apple store and make a purchase for 20 more Mac Minis? No, it's a hassle. But on AWS, you can just rent 40 Mac Minis for that day.