Slides for a Lightning speech held on Maemo Summit 2009 on 10th of October.
Topic is about how to harness Cruisecontrol to full build / packaging / testing and repository update cycle for development teams big and small.
2. Overview
• What is Continous Integration ?
• Where to start ?
• Setting up environment
• Tie things up with CruiseControl
• Contact details
3. What is Continuous Integration
• Automated builds from SCM
• Runs automated tests
– Unit tests
– Functional tests
– Benchmarks
– Code Coverage
– API / ABI Breaks
• Reporting
• Artifacts handling
4. Where to start ?
• Creating a debian package from your
software is good start!
• Each build phase should just have
simple “make” target.
• Gather the tools you need to produce
all the build artifacts.
5. Setting up the environment
• Maemo sdk and required rootstraps &
build-tools
• Some shell scripts to interact with
scratchbox1
• Local SCM checkouts
6. Tie things up with CC
Think off CI Tools as a fancy
replacement for a cron.
7. Sample: sb-execute
# Notice: most of the error handling stripped
SBTARGET=$1
DIRECTORY=$2
COMMAND=$3
shift; shift; shift
/scratchbox/login sb-conf se $SBTARGET ||
error 3 "Could not select target '$SBTARGET'."
/scratchbox/login -d $DIRECTORY $COMMAND $@
8. Sample: project building
<!-- update the build id in the changelog -->
<exec timeout="2400" command="${homedir}/bin/updatebuildid" args="$
{sbhomedir}/rojects/${project.name} ${label}"/>
<!-- install build dependencies -->
<exec timeout="2400" command="${homedir}/bin/sb-install" args="$
{sbtargegt} ${build_dependencies}"/>
<!-- runs: dpkg-buildpackage -b -rfakeroot on the given document -->
<exec timeout="2400" command="${homedir}/bin/sb-buildpackage" args="$
{sbtargegt} /home/cruise/projects/${project.name}"/>
<!-- run 'make' in given directory to run testsuite and translate the
results to xml -->
<exec timeout="2400" command="${homedir}/bin/sb-make" args="$
{sbtargegt} /home/cruise/projects/${project.name} check-xml"/>
<!-- check if test results were all positive -->
<exec timeout="2400" command="${homedir}/bin/testresults" args="$
{sbhomedir}/projects/${project.name}/tests"/>