I just started to use gitlab for a C/C++ project.
- apt update && apt -y install make cmake libeigen3-dev
which allows me to run cmake.
But I also need some libraries that are not available as Ubuntu packages. For example the library zlog:
How can I install it so that it can be used by the compiler for continues integration?
Ok, I set up my local machine as runner and use that one now to compile my code and to run the unit tests. This works. But it is was hard to found out the steps that are needed.
- configure local machine as runner:
Install GitLab Runner using the official GitLab repositories | GitLab
I used the shell executor. Give it a tag that describes what the machine can be used for
- Add the tag that you added in the last step to your build job, like this:
build-job: # This job runs in the build stage, which runs first.
- echo "Compiling the code..."
- make all
- echo "Compile complete."
Works fine now…
I was positively surprised that I can use a local machine behind a firewall as build server…
Another approach could be to create another project, which just contains a Dockerfile.
Install required libraries via apt-get resp. by checking out zlog and build it inside of the image.
Store the image at GitLab and use it as your image.
Rebuild the build image maybe once per week as scheduled build to get updates automatically .