How to make a C project using gitlab CI/CD

I have a typical C project in gitlab that I need to build and test whenever a developer checks in a modification.

I would like to use my own docker image which is built from the gcc image.

I need to make the makefiles using a script called makeprojects.sh, then call make on each individual folder in the project:

makeprojects.sh
make a
make b
[…]

Can someone point me to a realistic .gitlab-ci.yml file which does something similar?