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.

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

  • Ignoring paths with non-relevant files
  • Use caching dependencies

Hints with OS setup

Compilation and linking

  • Profile build system
  • Use parallel mode.
  • Replace Make with Ninja.
  • 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

  • Fail fast
  • Parallel execution
  • Profile your tests
  • Test prioritization
  • Test minimization
  • Test impact analysis

Setup test environment

Clone this wiki locally