Continuous Integration

CI is the practice of automating the integration of code changes from multiple contributors into a single software project. There are a few tools that you can use for continuous integration.

1. Warning

Note that your project submission is going to be tested locally.

Please ensure that your project builds correctly on local machines, even if it builds successfully on CI tools.

2. Jenkins

Jenkins is one of the tools that you can use for kick-starting CI directly in your repository. It provides hundreds of plugins to support building, deploying and automating any project.

You can look into how to integrate your repository with Jenkins here and here.

3. GitHub Actions

GitHub Actions is another tool that you can use. It makes use of workflows, which are custom automated processes that you can set up in your repository to build, test, package, release or deploy any project on GitHub. A workflow should be configured using YAML syntax, and save them as workflow files in your repository. You must store workflows in the .github/workflows directory in the root of your repository.

Please refer GitHub Docs on GitHub Actions for more information.

3.1. Sample GitHub Actions Workflow

The following are sample workflows that you can use for Github Actions.

Workflow for building on Windows CMake solution

Workflow for building on MacOS

Workflow for building on Linux

Notes:

  1. Please note that the sample workflow only helps to automate build processes, but it does not consist of a linter to check for stylistic errors.
  2. The scheduling (commented) on Windows/Linux will trigger the workflow at 0900hrs and 2300hrs, and the scheduling on MacOS will trigger the workflow at 2300hrs. Please feel free to change the scheduling that suits your project team.
  3. If you are building on Linux, please also note that the sample workflow for Linux is build for Ubuntu, but not Fedora. GitHub Actions do not support Fedora at the time of writing. Please use it with discretion.
  4. If you are building on Linux for GitHub Actions, you should also add the line at line 4 of Team00/Code00/src/autotester/CMakeLists.txt: target_link_options(autotester PUBLIC "-no-pie")