<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE refentry 
  PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
  "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<refentry id="travis-ci-integration">
<refmeta>
  <refentrytitle role='top_of_page' id='travis-ci-integration.top_of_page'>Travis CI integration</refentrytitle>
  <refmiscinfo>CUTTER Library</refmiscinfo>
</refmeta>
<refnamediv>
  <refname>Travis CI integration</refname>
</refnamediv>
<refsect1>
  <title>Introduction</title>
  <para>
  This section describes about using Cutter on 
  <ulink url='http://travis-ci.org/'>Travis CI</ulink>
  . Travis CI is a hosted continuous integration service for the open source community.
</para>
  <para>
  You can use Travis CI for your open source software. This section only describes about Cutter related configuration. See 
  <ulink url='http://about.travis-ci.org/docs/'>Travis CI:Documentation</ulink>
    about general Travis CI.
</para>
</refsect1>

<refsect1>
  <title>Configuration</title>
  <para>
  Travis CI is running on 64-bit Ubuntu 12.04. (See 
  <ulink url='http://about.travis-ci.org/docs/user/ci-environment/'>Travis CI: About Travis CI Environment</ulink>
  .) You can use apt-line for Ubuntu 12.04 provided by Cutter project to install Cutter on Travis CI.
</para>
  <para>
  You can custom build lifecycle by 
  <code>.travis.yml</code>
  . (See 
  <ulink url='http://about.travis-ci.org/docs/user/build-configuration/'>Travis CI: Conifugration your Travis CI build with .travis.yml</ulink>
  .) You can use 
  <code>before_install:</code>
   hook or 
  <code>install:</code>
   hook.
</para>
  <refsect2>
  <title>Configuration for C/C++</title>
  <para>
  You should execute the setup script at 
  <code>install:</code>
   hook because there is no dominant convention in the community about dependency management, Travis CI skips dependency installation for C/C++ projects. 
  <footnote>
  <para>
   
  <ulink url='http://about.travis-ci.org/docs/user/languages/c/'>Travis CI: Building a C Project</ulink>
  &#39;Dependency Management&#39; or
  <ulink url='http://about.travis-ci.org/docs/user/languages/cpp/'>Travis CI: Building a C Project</ulink>
  &#39;Dependency Management&#39; section explains that Travis CI does not install specific dependency installation. 
</para>
</footnote>
  
</para>
  <para>
  Add the following 
  <code>install:</code>
   configuration to 
  <code>.travis.yml</code>
  :
</para>
  <programlisting>install:
  - curl --silent --location https://raw.github.com/clear-code/cutter/master/data/travis/setup.sh | sh</programlisting>
  <para>With the above configuration, you can use Cutter for your build.</para>
</refsect2>

  <refsect2>
  <title>Configuration for other languages</title>
  <para>
  You should execute the setup script at 
  <code>before_install:</code>
   hook  not to override default dependency management rules  which depends on each project&#39;s language if you are writing language binding for specific C/C++ library and executing its tests by Cutter at your project. 
  <footnote>
  <para>
   
  <ulink url='http://about.travis-ci.org/docs/user/build-configuration/'>Travis CI: Configuring your Travis CI build with  .travis.yml</ulink>
  &#39;Build Lifecycle&#39; section explains that Travis CI executes languange specific dependency installation at 
  <code>install:</code>
   hook. 
</para>
</footnote>
  
</para>
  <para>
  Add the following 
  <code>before_install:</code>
   configuration to 
  <code>.travis.yml</code>
  :
</para>
  <programlisting>before_install:
  - curl --silent --location https://raw.github.com/clear-code/cutter/master/data/travis/setup.sh | sh</programlisting>
  <para>With the above configuration, you can use Cutter for your build.</para>
</refsect2>

</refsect1>

<refsect1>
  <title>Examples</title>
  <para>Here is free software that use Cutter on Travis CI:</para>
  <itemizedlist>
  <listitem>
  <para>
  <ulink url='http://groonga.org/'>Groonga</ulink>
  
</para>
  <itemizedlist>
  <listitem>
  <para>
  <ulink url='http://travis-ci.org/groonga/groonga'>Groonga on Travis CI</ulink>
  
</para>
</listitem>
  <listitem>
  <para>
  <ulink url='https://github.com/groonga/groonga/blob/master/.travis.yml'>.travis.yml for Groonga</ulink>
  
</para>
</listitem>
</itemizedlist>
</listitem>
</itemizedlist>
</refsect1>
</refentry>
