Sure, but a CI provider like GitLab provides some assurances that the compiler is not compromised. I can use my own container for the build if I want to
how do you know that the underlying infrastructure is not compromised? Your files are still on their filesystem and all data is in their memory that can be accessed by any employee (in theory)