# Build preparation stage

The Build preparation stage is an optional step executed right before reading the [Analyses configuration](https://docs.ci.trust-in-soft.com/configuration-file/analyses-configuration-file), hence before running the analyses.

If a **Global configuration** is used, this stage is executed only if the `Build preparation` stage is enabled in the Project settings:

![](https://3982345336-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LpYF4Rmm1tt0M5Cn4E0%2F-Me-LKk69ng5qDqsvA44%2F-Me-MX0t2lx1NgCGLQIO%2Fimage.png?alt=media\&token=a452068d-e9cc-4183-8057-ad06bb5f1c16)

If a **Committed configuration** is used, this stage is executed only if a `.trustinsoft/prepare.sh` file is committed in the analyzed branch/tag/pull request of the GitHub repository.

During this stage, the build preparation script is run with the following specifications:

* The current working directory is:
  * the repository's root for **Global configurations**
  * the`.trustinsoft/` directory at the repository's root for **Committed configurations**
* On an Ubuntu 18.04 distribution
* With GNU bash, version 4.4
* Limited to 30 minutes of execution
* Some programs (such as `bear`,`cmake`, `autoconf`, ...) are already installed and available
* Network access is enable to:
  * install any other required packages/programs
  * clone other repositories to make other source files available for analyses

{% hint style="info" %}
With a **Committed configuration**, the Build preparation script can also be used to generate the [Analyses configuration](https://docs.ci.trust-in-soft.com/configuration-file/analyses-configuration-file) file!
{% endhint %}
