I have no knowledge of their internal setup, but I suspect they have a big room full of racked ESX servers (non-Apple hardware) running builds on macOS VMs. And probably a ton of networked iPhone motherboards running automated tests.
I just wish they would make that kind of setup (macOS VMs on non-Apple hardware) legal for other developers.
Seriously....would love to be able to install MacOS as a VM on ESXi on a Dell Power Edge, or HP Proliant.
Yes, funny enough my employer likes to keep things on the up-and-up.
I was told that the entire final run of hardware was reserved for Apple internal use.
Our Jenkins CI/CD server was just a VM on the cluster, and ran Xcode to do the iOS and MacOS X builds on one set of slaves, and the Linux back-end server software on another slave.
Dunno what they’ve got now.
I get the sense that Apple's strict devotion to its product line is (to put it nicely) creating a discontinuity between their own practices and what they offer to others. It makes me think Apple needs a separate company or brand to offer practical utilities (and perhaps consulting) to companies wishing to deploy Apple software -- things like licenses to use macOS on non-Apple hardware (like a Dell EMC VxRack SDDC[0]), productizing some of their own IT solutions, special iPhones with a 1Gb RJ45 port attached for automated testing, and even "catch the vision"-style marketing to promote their idea of a data/compute center that integrates macOS and other Apple technologies.
[0] https://www.dellemc.com/en-us/converged-infrastructure/vxrac...
If it has hardware problems they probably need to scrap the entire thing and rebuild it from scratch.
Departments themselves use adhoc apple hardware.
The builds admittedly take a bit longer, but that's a small price to pay for style.