You can use Gitlab CI cloud or local service to automatically build and test your project in Linux/OSX/Windows environments.
It is free for OSS projects, and offers an easy integration with Gitlab, so builds can be automatically
fired in Gitlab CI after a
git push to Gitlab.
You can use Gitlab CI both for:
- Building and testing your project, which manages dependencies with Conan, and probably a conanfile.txt file
- Building and testing conan binary packages for a given conan package recipe (with a conanfile.py)
Building and testing your project¶
We are going to use the Google Test example now, with Gitlab CI support to run the tests.
Clone the project from github:
$ git clone https://github.com/lasote/conan-gtest-example
.gitlab-ci.yml file and paste this code in it:
image: lasote/conangcc63 build: before_script: # Upgrade Conan version - sudo pip install --upgrade conan # Automatic detection of your arch, compiler, etc. - conan user script: # Download dependencies, build, test and create package - conan test_package
Gitlab CI will install the conan tool and will execute the conan install command. Then, the script section creates the build folder, compiles the project with cmake and runs the tests.