Skip to content
Sergey Bronnikov edited this page Feb 1, 2023 · 12 revisions

There is an article in Russian about speeding up building and testing in CI. This page contains a list of tools that helps with speedup.

CI/CD Pipelines are the fundamental building blocks for CI/CD. Making pipelines more efficient helps you save developer time, which:

  • Speeds up your DevOps processes
  • Reduces costs
  • Shortens the development feedback loop

It’s common that new teams or projects start with slow and inefficient pipelines, and improve their configuration over time through trial and error. A better process is to use pipeline features that improve efficiency right away, and get a faster software development lifecycle earlier.

Fast source code checkout

  • Use --depth N in Git.
  • Enable parallel mode in Git:
    • git config fetch.parallel 0
    • git config submodule.fetchJobs 0

Hints with CI setup

Hints with OS setup

Compilation and linking

  • Profile build system to eliminate bottlenecks:
  • Use parallel mode.
  • Use fast build system. In some projects, Ninja could be faster than Make. CMake supports both build systems, so you could compare build time for both and choose a fastest.
  • Replace default linker with Mold. Faster in 17 times in comparison with GNU gold and 3-5 times in comparison with LLVM lld.
  • Include what you use - is a tool for use with clang to analyze #includes in C and C++ source files.
  • Use cache
    • ccache - is cache is a compiler cache. ccache could speed up your build in 30 (!) times. See performance results.
    • sccache - is ccache with cloud storage. Supported C, C++ and Rust.
  • Use distributed compilation (boost 2-4 times)
    • Goma (C/C++) - is a distributed compiler service for open-source project such as Chromium and Android. It's some kind of replacement of distcc+ccache. Used by Google.
    • nocc (C/C++) - is distributed C++ compiler. Used by VK.
    • distcc is a fast, free distributed C/C++ compiler.
    • icecream - is a distributed compiler with a central scheduler to share build load. Created by SUSE.

Running unit tests

Running e2e tests

Setup test environment

Clone this wiki locally