A CMOS-integrated quantum sensor based on nitrogen–vacancy centres