wiki:CI

Version 1 (modified by Vojtech Horky, 8 years ago) ( diff )

Created

Automated building of HelenOS and all ported software

The tool described here is not meant to be used for normal development of HelenOS with the classical "edit - incrementally compile - test" loop but rather for pre-merge tests or automated nightly builds.

The tool for automated builds is in the CI repository and can be obtained by cloning it:

bzr branch bzr://helenos.org/ci

The repository consists of several parts. The build.py master script for building everything for HelenOS (i.e. all ported software and all supported architectures), tool for automated script execution test-in-vm.sh (with several testing scenarios) and a wrapper shell script ci.sh for generating nightly builds (with a web front-end).

Build everything

Running build.py without any arguments defaults to building HelenOS for all available architectures (note: the tool assumes the toolchain is installed) and building all harbours from Coastline for all architectures. build.py fetches by default the mainline/coastline branches from helenos.org.

The tool detects the amount of available CPUs and runs the individual tasks in parallel. On a decent machine, about 2h are currently needed to build everything.

Once the tool finishes, directory out/ contains the results. index.html displays the summary with links to individual log files (basically stdout and stderr of all the started processes) and downloadable files (e.g. HelenOS images or harbour tarballs). For machine processing, report.xml contains the same data.

Note that a lot of disk space is needed. About 1GB alone is the out directory with downloadable artefacts and tens of GBs are needed for temporary files (build directories).

Limiting what to build

If you are interested in building only for certain architectures or building several harbours only, following switches might be helpful.

./build.py --platforms ia32,arm32/* --harbours binutils,gcc

Note that dependencies are resolved and added automatically.

If you do not wish to build Coastline at all, either specify invalid repository (see switch below) or choose to build none harbour.

Limiting the parallelism

If you need to keep working on the machine, limit the number of parallel jobs:

./build.py --jobs 2

Note that the actual load will be a little bit higher as many tools (GCC for example) internally spawn multiple children that may run in parallel for some time.

Building your branches

To build your branch, you can use the --helenos-repository switch.

./build.py --helenos-repository lp:~maresja1/helenos/coastline_qemu_porting

By default, bzr branch command is used so this will clone up to your latest commit. If you want to build upon uncommitted changes, prepend wip:// to use rsync instead of bzr to copy the directory.

./build.py --helenos-repository wip://$HOME/helenos/my_branch
Note: See TracWiki for help on using the wiki.