7aee3fa5bdd1ed8fcb54802ae769725ad5c94f94
[apps/native/sample/sample-core-components.git] / tool / development / buildbot / README
1 These are build and check scripts related with sample apps development.
2
3 A) There is script which checks every gerrit change for:
4 1. Compilation error using tizen binary from SDK
5 2. Compatibility with sample templates using TCC
6 3. Code quality using checkpatch_tizen.pl
7 4. Code typos using aspell
8
9 B) There is also daily routine check for listed projects
10
11 C) There is sctript which sends notification if update is available for sample-core-components.
12
13 Prerequisites:
14
15 1. Install pip
16     sudo apt-get install python-pip
17 2. Install pygerrit using pip
18     sudo pip install pygerrit
19 3. Install pyparsing using pip
20     sudo pip install pyparsing
21 4. Install aspell
22     sudo apt-get install aspell
23 5. Install cloc
24     sudo apt-get install cloc
25 6. Configure ssh connection to gerrit using ssh key without password.
26 7. For convenience and easier description of set up process we assume that sample-core-components is installed in ~/
27
28
29 A) Set up process for gerrit change check:
30
31 1. Create build directory. In this directory project repositories will be downloaded and checked:
32     mkdir ~/tizen_native_samples_build
33 2. Copy sample configuration template to actual samples configuration file:
34     cp ~/sample-core-components/tool/development/buildbot/native-samples.cfg.template ~/tizen_native_samples_build/.native-samples.cfg
35 3. Fill fields in ~/tizen_native_samples_build/.native-samples.cfg with correct data.
36     Configuration file has comments which describe configuration options
37 4. Test if everything is correct:
38    ~/sample-core-components/tool/development/buildbot/test_configuration.py ~/tizen_native_samples_build/ YOUR_EMAIL@SERVER.COM
39 5. Install crontab entry for polling and building changes every minute. Copy line with poll_and_build_changes.py from ~/sample-core-components/tool/development/buildbot/crontab.template
40 to users crontab:
41     crontab -e
42
43 That's all.
44 From now on scripts polls for gerrit changes in projects listed in configuration files.
45 Saves those changes to ~/tizen_native_samples_build/.native-samples.db sqlite database.
46 Then for every change from database performs build and sanity checks
47 and adds comments to gerrit.
48
49 B) Set up process for daily routine check:
50
51 1. Create daily build directory. In this directory project repositories will be downloaded and checked:
52     mkdir ~/tizen_native_samples_daily_build
53 2. Copy sample configuration template to actual samples configuration file:
54     cp ~/sample-core-components/tool/development/buildbot/native-samples.cfg.template ~/tizen_native_samples_daily_build/.native-samples.cfg
55 3. Fill fields in ~/tizen_native_samples_build/.native-samples.cfg with correct data.
56     Configuration file has comments which describe configuration options
57 4. Test if everything is correct:
58    ~/sample-core-components/tool/development/buildbot/test_configuration.py ~/tizen_native_samples_daily_build/ YOUR_EMAIL@SERVER.COM
59 5. Install crontab entry for polling and building changes every minute. Copy line with daily_regression_check.py from ~/sample-core-components/tool/development/buildbot/crontab.template
60 to users crontab:
61     crontab -e
62
63 That's all - now every day check sumarry emails will be sent to configured email addresses.
64
65 C) Set up update notification check:
66 1. Use already configured directory in A or B ( ~/tizen_native_samples_daily_build or  ~/tizen_native_samples_build) and copy line with check_for_updates.py
67 from ~/sample-core-components/tool/development/buildbot/crontab.template to users crontab:
68 crontab -e
69
70 That's all now update notifications will be sent to emails configured in certain configuration directory