Very little of the components of macOS are open source, except for XNU kernel, WebKit, and compiler. You’d have a hard time taking what’s on opensource.apple.com and making an OS.
You can already do that via cross compiling with osxcross[0], but you need the native SDK (you can copy it from any Mac). I have used it at the past as a part of a (Linux hosted) build process to create OSX binaries for some (GUI) stuff i was working on (the same process created Linux and Win32 binaries too).
Thank you very much for information. I'll look into it since Travis Mac builds sometimes so annoyingly slow so for majority of builds we can just use cross compiler.