CMake / CI / TDD on discussion

Sylvain Fargier, CERN

13/05/2024

Introduction

Introduction

  • About the speaker : Sylvain Fargier
    • Started to work in 2006 ~17 years ago
    • For various companies : SAGEM, WyPlay, Somfy, CERN ...
    • With different roles : Software developer / integrator / architect
    • Always diligent about tooling and work-environment, all environments created in past jobs are still in use

Introduction

  • This training is a second step after the "Let's talk about workflow !" presentation.
  • In a few words :
    • The goal is to share and exchange on TDD
    • Focusing on constrained environments
    • Using CMake, Docker and GitLab-CI
    • To make the previous presentation a bit more concrete and have some material, a limited-time project (~ a week of development) has been created
  • Everything is there, but we'll get into this !

Project Presentation

Context, goals and approach

Project Presentation

  • Let's review the main README file together !
  • We should now be ready to get through :
    1. Docker and Development Environment

    2. CMake and Rules

    3. Tests and Validation

    4. Code Quality

    5. Continuous Integration

  • That's quite a lot of information

  • Let's organize this as an exchange and don't hesitate to interrupt the speaker ! (it'll be interresting for both sides !)

Docker and dev-envs

Turning CI/CD builders into developer-friendly environments

Docker and dev-envs

  • Let's step into that one together !
    • And don't be shy, don't hesitate to ask the speaker to jump into his console and show you how it works !

 

  • You should now better understand :
    • how to build a container and use it as a development toolbox
    • what are the benefits from using such environments

CMake and rules

Wrapping up a toolchain getting prepared for baremetal developments

CMake and Rules

  • Let's step into another one together !
    • Remember that this is not an in-depth CMake training, still questions are welcome !
  • You should now better understand :
    • how to get started on a project with CMake
    • how to wrap a toolchain for CMake
    • how to re-use rules from one project to another
  • We can now make a short detour through IDE integration !

Tests and Validation

Stubbing and testing patterns on baremetal platform

Tests and Validation

  • Let's jump into another one together !
    • Yet another topic, if you think the presenter is going wrong way, don't hesitate to intervene !

 

  • You should now better understand :
    • how to prepare an application for TDD
    • differences between different tests categories
    • stub and mocking techniques

Code Quality

Step-back and see where we're getting to

Code Quality

  • This one is a short one, let's have a look !
    • This one smells like coffee, let's have a short break ?

 

  • You should now better understand :
    • where we're getting to with all those rules and tools
    • how fast a project can grow once you have proper tools

Continuous Integration

Where all this starts to make sense

Continuous Integration

  • Very last topic, I promise, let's dive into it !
    • Last opportunity to interrupt the speaker, he may not have all the answers but at least we can discuss.

 

  • You should now better understand :
    • how to create GitLab-CI jobs and the basics of its syntax
    • how to extend and scale this using includes and configuration tools

Questions ?