Skip to content

Continuous Integration and Continuous Deployment (CI CD)

Babouye edited this page Dec 16, 2025 · 1 revision

Continuous Integration and Continuous Deployment (CI/CD)

This document describes the architecture and behavior of the automated pipeline set up for the R-Type project using GitHub Actions.


Overview

The workflow is defined in the following file:

.github/workflows/ci.yml

Pipeline objectives:

  • Enforce code quality
  • Compile on multiple platforms
  • Run unit tests
  • Prevent merges when failures occur

Triggers

The pipeline runs automatically in the following situations:

Pull Request

  • Targeting the following branches:

    • main
    • dev

Pipeline Structure

graph TD
    Start([Pull Request]) --> Style[Job: Check Coding Style]
    Style -->|Success only| Matrix{Multi-OS Matrix}

    Matrix --> Linux[Build & Test Ubuntu]
    Matrix --> Mac[Build & Test MacOS]
    Matrix --> Win[Build & Test Windows]

    Linux --> End([End])
    Mac --> End
    Win --> End
Loading

Job Description

1. Coding Style Check

Blocking job.

  • If the coding style check fails, no build jobs are executed.
  • Purpose: fail fast and reduce resource usage.

Environment

  • Ubuntu Latest

Command

./scripts/checker.sh

2. Build and Test

This job uses a matrix strategy to validate portability.

Target Environments

  • Linux : Ubuntu Latest (x86_64)
  • Windows : Windows Latest (x86_64)
  • MacOS : MacOS Latest (ARM64 – Apple Silicon)

Detailed Steps

Tool Installation

  • CMake

  • Ninja

  • Compilers:

    • GCC / Clang (Linux, MacOS)
    • MSVC (Windows)

Linux specific:

  • Automatic installation of X11 / OpenGL development packages required by Raylib

Cache Management (Optimization)

  • Cached directory:
.conan2
  • Cache key:

    • Operating system
    • Hash of conanfile.txt

Benefit

  • Avoids rebuilding external dependencies when unchanged:

    • Raylib
    • Asio
    • ImGui

Dependency Installation

  • Managed with Conan
  • Enforced standard: C++23

Configuration

  • Build type: Release
  • Explicit test activation:
-DBUILD_TESTS=ON
  • Integration of the Conan-generated toolchain

Compilation

  • Parallel build of:

    • Client
    • Server
    • Tests

Unit Tests

  • Executed with:
ctest
  • Only failing tests display logs:
--output-on-failure

Artifacts

  • Saved executables:

    • r-type_client
    • r-type_server
  • Downloadable from GitHub Actions

  • Retention period: 5 days

Clone this wiki locally