Tutorial how to use Travis CI with C++

Overview

travis_cpp_tutorial

Branch Travis CI logo
master Build Status
develop Build Status
richel Build Status

Tutorial how to use Travis CI with C++.

C++ libraries and tools explored

In alphabetical order

  • Bio++: C++ biology libraries
  • Boost: Boost is a collection of C++ libraries (homepage)
  • Boost.Test: Boost.Test is a C++ testing framework within the Boost libraries
  • ChaiScript: embedded scripting language (ChaiScript GitHub)
  • clang: C++ compiler
  • CMake: makefile generator
  • Codecov: Codecov is a webservice to display a gcov code coverage result, that plays well with GitHub. It can be actived from a Travis script
  • Coverity: a static code analysis tool [FAILS]
  • cppcheck: static code analysis
  • fparser: Warp's function parser
  • GCC: GNU Compiler Collection, a collection of compilers, in this case, the C++ compiler called g++
  • gcov: gcov is a GNU tool to measur the code coverage of (among others) C++ code. It can be actived from a Travis script
  • git: git is a version control system. It tracks the changes made in the project and allows for viewing the project its history
  • GitHub: GitHub is a site where git repositories are hosted. It gives a git project a website where the files can be viewed. Next to this, there is a project page for issues like bug reports and feature requests
  • gprof: gprof is a GNU tool to profile (among others) C++ code. It can be actived from a Travis script
  • GSL: Microsoft implementation of the Guidelines Support Library
  • helgrind: a thread error detector
  • libnds: Nintendo DS library
  • memcheck: detect memory leaks
  • OCLint: static code analyis (homepage) (GitHub)
  • qmake: makefile generator for Qt projects
  • Qt: a C++ GUI library
  • QTest: the Qt testing framework
  • Qwt: a Qt charts/graphs library
  • Rcpp: Rcpp is an R package that allows mixing R and C++ code
  • Rcpp11: Rcpp is an R package that allows mixing R and C++11 code
  • SFML: a C++ multimedia library
  • SLOCcount: estimate the value of your code
  • Travis CI: Travis CI is a continuous integration (hence the 'CI' in its name) tool that plays well with GitHub. It is activated when someone uploads his/her code to the GitHub
  • Unreal Engine 4: a proprietary C++ game engine
  • Urho3D: a free and open-source C++ game engine
  • Wt: a C++ web application library

Non-C++ tools explored

In alphabetical order. Go to statuses to find these.

  • C: some C code examples
  • convert: convert images using ImageMagick
  • cowsay: an ASCII art cow displaying a message
  • lyx: convert LyX to PDF
  • proselint: check your prose for style
  • R: some R code examples
  • spell: check your prose for spelling
  • shunit2: bash script testing framework

Statuses

Go to statuses.

Contributing

Great! See CONTRIBUTING.md.

Code of conduct

This project follows the Contributor Covenant. See code_of_conduct.md.

Contributors

Other Travis tutorials

Issues
  • Include Submodule Files in Documentation

    Include Submodule Files in Documentation

    The tutorial requires files from repositories used as Submodules. The MkDocs Snippets extension requires files to be local, as would displaying documentation off-line.

    Suggest downloading Submodules to consume but not update.

    Cloning a Project with Submodules

    Here we’ll clone a project with a submodule in it. When you clone such a project, by default you get the directories that contain submodules, but none of the files within them yet:

    If you pass --recurse-submodules to the git clone command, it will automatically initialize and update each submodule in the repository, including nested submodules if any of the submodules in the repository have submodules themselves.

    Pulling in Upstream Changes from the Submodule Remote

    The simplest model of using submodules in a project would be if you were simply consuming a subproject and wanted to get updates from it from time to time but were not actually modifying anything in your checkout. ...

    Recommendation? Best adding to wiki.

    opened by flywire 11
  • Fuzzing link goes to 404

    Fuzzing link goes to 404

     * [libFuzzer](https://github.com/richelbilderbeek/cpp/blob/master/content/CppLibFuzzer.md): [a library for coverage-guided fuzz testing](http://llvm.org/docs/LibFuzzer.html)
    

    This is 404 error and I also could not find that in your cpp repo. Could only find https://github.com/richelbilderbeek/cpp/blob/master/content/CppFuzzy_equal_to.md

    opened by rugk 3
  • Add: only test on Travis

    Add: only test on Travis

    USER = $$(USER)
    contains(USER, p230198) {
      message(Richels computer)
    }
    
    !contains(USER, p230198) {
      message(Not Richels computer)
    }
    
    IS_ON_TRAVIS = $$(TRAVIS)
    
    count(IS_ON_TRAVIS, 0) {
      message(Not building on Travis)
    }
    
    count(IS_ON_TRAVIS, 1) {
      message(Building on Travis)
    }
    
    opened by richelbilderbeek 1
  • Render Tutorial in Browser

    Render Tutorial in Browser

    Tutorial is difficult to work with because it is only available as a pdf which does not display well on the monitor. The mkdocs version displays well but must be maintained separately.

    opened by flywire 0
  • Answer feedback

    Answer feedback

    Some awesome feedback I got by email from flywire:

    I'm interested in setting up Travis CI for LibreCad V3, a c++ program. Your tutorial (and blog etc) should be the ideal intro as it's the same environment but I'm having trouble following it. I'd like to provide feedback and ideally contribute to addressing these issues. (Maybe you're not so interested in this old project now.)

    I'm using https://github.com/richelbilderbeek/travis_cpp_tutorial/blob/master/travis_cpp_tutorial.pdf

    From Travis to source

    So right from the start:

    • 2.1 create https://github.com/flywire/cold_fusion_reactor

    • 2.2 git clone https://github.com/richelbilderbeek/travis_cpp_tutorial

    • 2.3 Create a Qt Creator project

      Why did we go from the cold_fusion_reactor repository to https://github.com/richelbilderbeek/travis_cpp_tutorial ?

    I think @flywire has a point and I do not connect the chapters of the tutorial well enough.

    What is Qt? (I know what it is but I don't see how it fits into the context of the tutorial.)
    

    So I haven't got going yet but I can see from the code snippets this tutorial contains exactly what I'm after.

    I find the font in the pdf to small to view on one side of a 22" monitor as I work through the tutorial. (I guess I'm getting spoilt with mkdocs.)

    I see the point. As can be seen here, I tried to do a proper conversion, but fail for now. If anyone know how to properly run the script, we can adapt it to people's need. Now, I think I just used the LyX default setting.

    btw, where does https://github.com/richelbilderbeek/simplify_cpp_travis_intro fit in?

    AFAICS, I do not mention this in the tutorial. The tutorial is far from finished and I see what I intend it to become. The https://github.com/richelbilderbeek/simplify_cpp_travis_intro is a general article.

    Hopefully you'll take these comments as constructive criticism as they are intended.

    I definitely am! Thanks and please send more if needed :+1:

    opened by richelbilderbeek 11
  • Disable the compiler optimiser for qmake examples

    Disable the compiler optimiser for qmake examples

    qmake defaults to adding -O2 when compiling, which can cause gcov to miss that some lines were optimised out.

    I fixed this by adding this setting to my .pro file:

    QMAKE_CXXFLAGS_RELEASE -= -O2

    opened by pento 1
Releases(v1.1)
Owner
Richel Bilderbeek
Postdoc in genetic epidemiology. Thinks Open Science is a pleonasm. For fun, I teach programming (e.g. to kids) and lead programming teams.
Richel Bilderbeek
📚 Modern C++ Tutorial: C++11/14/17/20 On the Fly

The book claims to be "On the Fly". Its intent is to provide a comprehensive introduction to the relevant features regarding modern C++ (before 2020s). Readers can choose interesting content according to the following table of content to learn and quickly familiarize the new features you would like to learn. Readers should be aware that not all of these features are required. Instead, it should be learned when you really need it.

Changkun Ou 17.9k Jun 28, 2022
Nvidia contributed CUDA tutorial for Numba

This is an adapted version of one delivered internally at NVIDIA - its primary audience is those who are familiar with CUDA C/C++ programming, but perhaps less so with Python and its ecosystem.

Numba 157 Jun 14, 2022
Unicorn CPU emulator framework tutorial

使用unicorn-engine开发模拟器 什么是unicorn引擎 Unicorn是基于qemu开发的一个CPU模拟器,支持常见的各种指令集,能在各种系统上运行。 GITHUB项目地址:https://github.com/unicorn-engine/unicorn 官网地址:https://w

null 9 Mar 9, 2022
A Simple 32-bit OS lab tutorial.

一个支点撬动操作系统大山 项目名称:逸仙OS简明教程 ( YatSenOS Volume First ) 所属机构:中山大学操作系统实验课程组 写在前面 本项目已经成功用于2021年中山大学春季操作系统实验课程,课程的地址是https://gitee.com/nelsoncheung/sysu-20

Yat-Sen OS 412 Jun 27, 2022
Zephyr Tutorial for Beginners

Zephyr: Tutorial for Beginners This repository contains a step-by-step guide that teaches you how to use Zephyr RTOS. It assumes: no previous experien

null 84 Jun 21, 2022
C++ OpenGL 3D Game Tutorial Series - Learn to code an OpenGL 3D Game in C++ from scratch

C++ OpenGL 3D Game Tutorial Series is a YouTube Tutorial Series, whose purpose is to help all those who want to take their first steps in the game dev

 PardCode 88 Jun 8, 2022
Tutorial: Writing a "bare metal" operating system for Raspberry Pi 4

Tutorial: Writing a "bare metal" operating system for Raspberry Pi 4

Adam Greenwood-Byrne 2.3k Jun 24, 2022
A library of language lexers for use with Scintilla

README for Lexilla library. The Lexilla library contains a set of lexers and folders that provides support for programming, mark-up, and data languag

Scintilla 63 Jun 10, 2022
Welcome to my dungeon. Here, I keep all my configuration files in case I have a stroke and lose all my memory. You're very welcome to explore and use anything in this repository. Have fun!

Fr1nge's Dotfiles Welcome to my dungeon. Here, I keep all my configuration files in case I have a stroke an d lose all my memory. You're very welcome

Fr1nge 32 Apr 16, 2022
A reliable and easy to use CPP program header file for simplifying, code writing in cpp

CPP Custom Header This header file main purpose is to implement most famous and most used algorithm that are easy to implement but quite lengthy and t

Jitesh Kumar 1 Dec 22, 2021
C++ intrusive container templates. Abstract node links, no use of new/delete.

C-plus-plus-intrusive-container-templates C++ intrusive container templates. Abstract node links, no use of new/delete (AVL tree, singly-linked list,

Walt Karas 11 Feb 10, 2022
learn how to use BPF/eBPF

学习Linux BPF/eBPF 编程 打造学习BPF知识的中文社区。

Wen-Quan Li 295 Jun 25, 2022
Boiler plate template for C++ projects, with CMake, Doctest, Travis CI, Appveyor, Github Actions and coverage reports.

Boiler plate for C++ projects This is a boiler plate for C++ projects. What you get: Sources, headers and mains separated in distinct folders Use of m

Bendik Samseth 475 Jun 27, 2022
Minimal C++17 project using the GCC compiler and is checked by Travis CI

travis_gcc_cpp17 Branch Status master develop This GitHub is part of the Travis C++ Tutorial. The goal of this project is to have a clean Travis CI bu

Richel Bilderbeek 22 Jul 22, 2021
Example of a gtest and cmake set up for C++ on Travis-CI.

What is this? This is an example setup of Travis-CI with cmake and google test. I finally got all three working together nicely with the help of dmono

Gunnar 41 Apr 30, 2021
In this tutorial, we will use machine learning to build a gesture recognition system that runs on a tiny microcontroller, the RP2040.

Pico-Motion-Recognition This Repository has the code used on the 2 parts tutorial TinyML - Motion Recognition Using Raspberry Pi Pico The first part i

Marcelo Rovai 16 Jun 18, 2022
A gtk4 tutorial for beginners

This tutorial illustrates how to write C programs with Gtk4 library. It focuses on beginners so the contents are limited to basic things such as widgets, GObject, signal, menus and build system. Please refer Gnome API reference for further topics.

ToshioCP 231 Jun 18, 2022
📚 Modern C++ Tutorial: C++11/14/17/20 On the Fly

The book claims to be "On the Fly". Its intent is to provide a comprehensive introduction to the relevant features regarding modern C++ (before 2020s). Readers can choose interesting content according to the following table of content to learn and quickly familiarize the new features you would like to learn. Readers should be aware that not all of these features are required. Instead, it should be learned when you really need it.

Changkun Ou 17.8k Jun 23, 2022
This is a code repository for pytorch c++ (or libtorch) tutorial.

LibtorchTutorials English version 环境 win10 visual sutdio 2017 或者Qt4.11.0 Libtorch 1.7 Opencv4.5 配置 libtorch+Visual Studio和libtorch+QT分别记录libtorch在VS和Q

null 323 Jun 27, 2022
📚 Modern C++ Tutorial: C++11/14/17/20 On the Fly

The book claims to be "On the Fly". Its intent is to provide a comprehensive introduction to the relevant features regarding modern C++ (before 2020s). Readers can choose interesting content according to the following table of content to learn and quickly familiarize the new features you would like to learn. Readers should be aware that not all of these features are required. Instead, it should be learned when you really need it.

Changkun Ou 17.9k Jun 28, 2022
Nvidia contributed CUDA tutorial for Numba

This is an adapted version of one delivered internally at NVIDIA - its primary audience is those who are familiar with CUDA C/C++ programming, but perhaps less so with Python and its ecosystem.

Numba 157 Jun 14, 2022
Unicorn CPU emulator framework tutorial

使用unicorn-engine开发模拟器 什么是unicorn引擎 Unicorn是基于qemu开发的一个CPU模拟器,支持常见的各种指令集,能在各种系统上运行。 GITHUB项目地址:https://github.com/unicorn-engine/unicorn 官网地址:https://w

null 9 Mar 9, 2022
A Simple 32-bit OS lab tutorial.

一个支点撬动操作系统大山 项目名称:逸仙OS简明教程 ( YatSenOS Volume First ) 所属机构:中山大学操作系统实验课程组 写在前面 本项目已经成功用于2021年中山大学春季操作系统实验课程,课程的地址是https://gitee.com/nelsoncheung/sysu-20

Yat-Sen OS 412 Jun 27, 2022
Zephyr Tutorial for Beginners

Zephyr: Tutorial for Beginners This repository contains a step-by-step guide that teaches you how to use Zephyr RTOS. It assumes: no previous experien

null 84 Jun 21, 2022
C++ OpenGL 3D Game Tutorial Series - Learn to code an OpenGL 3D Game in C++ from scratch

C++ OpenGL 3D Game Tutorial Series is a YouTube Tutorial Series, whose purpose is to help all those who want to take their first steps in the game dev

 PardCode 88 Jun 8, 2022
Tutorial: Writing a "bare metal" operating system for Raspberry Pi 4

Tutorial: Writing a "bare metal" operating system for Raspberry Pi 4

Adam Greenwood-Byrne 2.3k Jun 24, 2022
FFmpeg coding tutorial - learn how to code custom transmuxing, transcoding, metadata extraction, frame-by-frame reading and more

FFmpeg code examples FFmpeg coding tutorial - learn how to code custom transmuxing, transcoding, metadata extraction, frame-by-frame reading and more

Rim Zaidullin 5 Jun 19, 2022
Gtk4 Tutorial for beginners

Gtk4 Tutorial for beginners

ToshioCP 232 Jun 22, 2022
Tutorial to connect the Waveshare display ST7789V to the ESP32

ESP32-ST7789V This repository contains the required configuration to connect a display Waveshare ST7789V to an ESP32 board. The correct connection to

Pedro Paulo Amorim 1 Nov 14, 2021