ar.kalmykov created page: continuous integration authored by Artem Kalmykov's avatar Artem Kalmykov
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. 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: 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 - analyze
- test - test
- crashlytics - crashlytics
...@@ -28,10 +32,12 @@ crashlytics_build: ...@@ -28,10 +32,12 @@ crashlytics_build:
only: only:
- develop - develop
except: except:
- triggers``` - triggers
```
Add only stages you need. Add only stages you need.
2. **Analyzation Stage** **2. Analyzation Stage**
To setup analyzation you need to do the following: To setup analyzation you need to do the following:
* Properly configure the project for Release configuration, especially enable almost all warnings: * Properly configure the project for Release configuration, especially enable almost all warnings:
- Set `Treat Warnings as Errors` to Yes. - Set `Treat Warnings as Errors` to Yes.
...@@ -77,3 +83,19 @@ To setup analyzation you need to do the following: ...@@ -77,3 +83,19 @@ To setup analyzation you need to do the following:
- Set `Floating Point Value used as Loop Counter` to Yes. - Set `Floating Point Value used as Loop Counter` to Yes.
- Set `Use of 'rand' functions` to Yes. - Set `Use of 'rand' functions` to Yes.
- Set `Use of 'strcpy' and 'strcat'` 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
```