Skip to main content
This page describes the CI/CD pipeline implemented in the R-Type project. The pipeline ensures smooth development, automatic testing, and clean code standards through a series of actions.

CI/CD Actions

The CI pipeline includes an action for compilation on Windows using MSVC (Microsoft Visual C++).

Key Steps:

  1. Install dependencies with vcpkg.
  2. Build the project using CMake and MSVC.
Example Workflow:
On Ubuntu, the pipeline compiles the project and runs unit tests written with Google Test.

Key Steps:

  1. Install dependencies using vcpkg.
  2. Build the project with GCC/Clang.
  3. Run unit tests using GTest.
Example Workflow:
To comply with Epitech requirements, an action mirrors the repository to the Epitech GitLab server.

Key Steps:

  1. Push updates to the remote Epitech repository.
Example Workflow:
The pipeline ensures code consistency using cpplint and Clang-Format (Google style guide). If formatting errors are detected, a commit with corrected code is pushed automatically.

Linter Configuration:

  • cpplint: Checks for style and structure issues.
  • Clang-Format: Applies automatic formatting.
Example Workflow:

Branch Ruleset

To ensure code quality and prevent unapproved changes, the following ruleset is enforced:
  1. No Direct Pushes to Main: All changes must be submitted through a Pull Request (PR).
  2. Approval Requirements:
    • A minimum of two approvals is required to merge a Pull Request.
  3. CI/CD Validation:
    • All CI/CD actions (compilation, testing, linting) must pass successfully before merging.
  4. Automatic Checks: Code linting and formatting ensure that all committed code adheres to the Google C++ Style Guide.

Conclusion

The CI/CD pipeline automates the build, test, and deployment process, ensuring code quality, consistency, and compliance with project standards. With actions for compilation, testing, mirroring, and linting, the pipeline minimizes manual intervention and streamlines the development workflow.