|  |  | Continuous integration is this guide is based on Gitlab CI. Each step of this setup, except of the first one, is optional - implement only what you need. | 
|  |  |  | 
|  |  | 1.  **Gitlab CI.** | 
|  |  |  | 
|  |  | **1. Gitlab CI.** | 
|  |  |  | 
|  |  | To setup Gitlab CI you need to add .gitlab-ci.yml file to the root of project's source. It should look like this: | 
|  |  | ```stages: | 
|  |  |  | 
|  |  | ``` | 
|  |  | stages: | 
|  |  | - analyze | 
|  |  | - test | 
|  |  | - crashlytics | 
| ... | ... | @@ -28,10 +32,12 @@ crashlytics_build: | 
|  |  | only: | 
|  |  | - develop | 
|  |  | except: | 
|  |  | - triggers``` | 
|  |  | - triggers | 
|  |  | ``` | 
|  |  | Add only stages you need. | 
|  |  |  | 
|  |  | 2.  **Analyzation Stage** | 
|  |  | **2. Analyzation Stage** | 
|  |  |  | 
|  |  | To setup analyzation you need to do the following: | 
|  |  | *  Properly configure the project for Release configuration, especially enable almost all warnings: | 
|  |  | - Set `Treat Warnings as Errors` to Yes. | 
| ... | ... | @@ -77,3 +83,19 @@ To setup analyzation you need to do the following: | 
|  |  | - Set `Floating Point Value used as Loop Counter` to Yes. | 
|  |  | - Set `Use of 'rand' functions` to Yes. | 
|  |  | - Set `Use of 'strcpy' and 'strcat'` to Yes. | 
|  |  | *  Add analyze.sh script to the project's root folder: | 
|  |  |  | 
|  |  |  | 
|  |  | Replace MyWorkspace, MyScheme and MyConfiguration with appropriate values. | 
|  |  |  | 
|  |  | *  Add analyzation stage to .gitlab-ci.yml file, it should look like the following: | 
|  |  |  | 
|  |  | ``` | 
|  |  | analyzation: | 
|  |  | stage: analyze | 
|  |  | script: | 
|  |  | - ./analyze.sh | 
|  |  | except: | 
|  |  | - triggers | 
|  |  | ``` | 
|  |  |  |