Continuous Integration Demo

March 17, 2021 ยท View on GitHub

THIS REPO IS COMPLETELY OUT OF DATE AND REFLECTS MY KNOWLEGDE ABOUT CMAKE FROM SOME YEARS AGO

Please read Craig Scott's "Professional CMake: A Practical Guide" instead of trying to find answers here.

TravisCI: Travis CI Build Status CircleCI: Circle CI Build Status

Continuous Integration Demo

This project serves as an example for

Make a Duplicate

If you want to use this code in your own project, please follow the advice on how to make a duplicate. In short:

git clone --bare https://github.com/daixtrose/continuous-integration-demo.git
cd continuous-integration-demo.git
git push --mirror https://github.com/youraccount/new-repository.git

Do not forget to change the links to the build status icons on the top of README.md!

Local Usage

Retrieve this repository

git clone --recursive https://github.com/daixtrose/continuous-integration-demo
cd continuous-integration-demo

Prepare for a build

mkdir build
cd build
cmake ..

Build

make

Test

Execute

make test

or

ctest -VV

for some detailed information.

Package Creation

make package
make package_source

Some Comments

Download of External Projects via CMake

About TravisCI

  • Hint: TravisCI can additionally be configured not to run on commits in branches unless those are under a pull request
  • Caveats: Travis CI only knows the status build passing or build failing, but this is misleading: A build failure is even reported in case the build succeeds and one single unit test fails. So I consider Travis CI to be a Continuous Deployment environment in the first place - with CI capability, of course.
  • Comment: IMHO the C++ integration is somewhat tricky. At the time of this writing (August 2017) Travis uses Ubuntu-14.04 (not version 16.04 or higher) which adds extra headache with regard to the available CMake version. See how others are installing a newer version of CMake before going on with the build.