Today you can run macOS and current Xcode in kvm/qemu on any modern amd64 server. Next macOS will be arm only and likely DRM’d up the wazoo.
https://github.com/kholia/OSX-KVM