I'm not sure that to run a CI you have to violate the Apple license. I mean most core components of macOS (the Darwin project) are actually open source, and thus can be built and used freely. And for a CI you don't need a GUI and other stuff, only the kernel and the compiler basically. So maybe it's possible to compile a version of Darwin so close to the real macOS that has the bare minimum to run the compiler to build and test software.
Of course the problem are the SDK that you need to use to build most software, they are obviously proprietary, but does its license say that they can only be used to compile software on a real Mac?