For third party libraries, you'd need to handle them the same way as in other languages: either install the development files during your CI/CD run, or have them bundled in the repository.

Thanks for the question, though - it made me realize it could be useful to have some kind of "exclude-files" input in the Action, so that you could ignore compiler messages pertaining to 3rd-party files.