Heterogeneous integration of spin–photon interfaces with a CMOS platform