CI/CD

This outlines the CI/CD process for the Gleed2D project.

Purpose

The purpose of the CI/CD process is to ensure the quality and reliability of the Gleed2D codebase. This is achieved through a series of automated steps that are triggered whenever changes are made to the code.

Workflow

The CI/CD process for Gleed2D is implemented using GitHub Actions. It consists of the following steps:

  1. Code Push: When changes are pushed to the repository, GitHub Actions is triggered.
  2. Build: The code is built using the provided build scripts.
  3. Test: The built code is tested using unit tests and integration tests.
  4. Packaging: If the tests pass, the code is packaged into a release artifact.
  5. Deployment: The release artifact is deployed to the appropriate environment (e.g., staging or production).

Workflow Steps

Build

The build step is responsible for compiling the Gleed2D codebase. The build process is defined in the build.sh script.

Test

The test step runs unit tests and integration tests to ensure the Gleed2D code is working correctly. The tests are defined in the tests directory and are run using the run-tests.sh script.

Packaging

The packaging step creates a release artifact that can be deployed. This artifact is typically a zip file containing the compiled code and other necessary files.

Deployment

The deployment step deploys the release artifact to the appropriate environment. The specific deployment process depends on the target environment.

Configuration

The CI/CD process is configured in the .github/workflows directory. This directory contains YAML files that define the workflow steps and their dependencies.

Examples

Workflow File Example

name: CI
          
          on:
            push:
              branches:
                - main
          
          jobs:
            build:
              runs-on: ubuntu-latest
              steps:
                - uses: actions/checkout@v2
                - name: Build
                  run: ./build.sh
                - name: Test
                  run: ./run-tests.sh
          

Build Script Example

#!/bin/bash
          
          # Build Gleed2D
          
          # ... build commands ...
          

Test Script Example

#!/bin/bash
          
          # Run tests
          
          # ... test commands ...
          

Contributing

To contribute to the CI/CD process, please follow these steps:

  1. Create a new branch for your changes.
  2. Make your changes to the relevant files.
  3. Submit a pull request.

Please include a clear description of your changes and their purpose.

References