Skip to content
Snippets Groups Projects
Commit 62784004 authored by kongr45gpen's avatar kongr45gpen
Browse files

Merge branch 'faster-ci' into 'master'

CI pipeline optimization

Resolves #46 and #40.

The average pipeline time is ~11 minutes until failure or success with the current CI configuration. Main causes of this are:
- The original Docker image used for the runners (`lycantropos/cmake`) is bloated, weighing at about **600 MB** for the [latest tag](https://hub.docker.com/r/lycantropos/cmake/tags). This image is downloaded for every stage of the pipeline separately, and due to its size, there is a huge delay between setup and start of the stage.
- There are too many calls to `apt-get update` and `install`, that are executed at every stage without reason. Plus, downloading and installing additional packages *for every stage* is also time-consuming, which contributes to the delays.

This problem is solved by creating a lighter Docker image (`lightspot21/acubesat-ci`), based on Alpine Linux, which contains all the necessary tools for linting and building (`cmake`, `cppcheck`, `clang-tidy`, `gcc`, `vera++`) plus the code coverage tools `gcovr` and `lcov`. The whole package weighs at **168 MB** for the [latest tag](https://cloud.docker.com/repository/docker/lightspot21/acubesat-ci/tags), which is **73%** less than what we use currently.

Gains:
- Average pipeline time down to **5-7 minutes** from 11-13 (variation is due to server load) with some times even earlier when failing, resulting in quicker fixes.
- Ability to directly control tool versions.

All comments/ideas are welcome, especially on optimizing the Docker image size even more!

See merge request acubesat/obc/ecss-services!51
parents 2ecbc48b f50456c8
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment