Changes between Version 1 and Version 2 of BuildAutomation


Ignore:
Timestamp:
Aug 9, 2018, 8:35:04 PM (8 months ago)
Author:
chris
Comment:

continuous integration

Legend:

Unmodified
Added
Removed
Modified
  • BuildAutomation

    v1 v2  
    11= Build Automation =
    22
    3 The Bitten plugin for Trac has been installed to allow automation of builds. Build slaves can be configured to run in the background so that whenever a source code checkin is made, the affected part of the tree is rebuilt and tested. This mainly applies to [source:box/trunk trunk].
     3We use continuous integration to test new commits before merging them to the master branch. This should ensure that the master branch always passes all of our tests, and is of sufficient quality for a release. We do not plan to make any specific numbered version releases any more, since the master branch is always of release quality.
    44
    5 For a list of currently configured build slaves, check the [/build Build Status] page.
     5Every commit is tested using the following three Continuous Integration services:
    66
    7 == Setting Up a Build Slave ==
     7* [https://travis-ci.org/boxbackup/boxbackup/builds Travis] for Linux (Ubuntu LTS) and Mac OS X builds and tests (Autoconf and CMake).
     8* [https://ci.appveyor.com/project/qris/boxbackup/history AppVeyor] for Windows builds and tests (CMake only).
     9* [http://builds.boxbackup.org/builders Buildbot] for Linux (CentOS, Debian, Ubuntu), FreeBSD, SmartOS and Mac OS X builds and tests (Autoconf only).
    810
    9 If you wish to run a build slave for a platform that is not already set up, please contact the developers so that Trac can be configured. Currently we only test on a few platforms so more are always welcome!
     11The current status of the Master branch is:
    1012
    11 Slaves are authenticated using Trac accounts, so you must request an account if you do not already have one. Authentication is performed via HTTPS.
     13|| Travis || [[Image(https://api.travis-ci.org/boxbackup/boxbackup.svg?branch=master, link=https://travis-ci.org/boxbackup/boxbackup)]] ||
     14|| !AppVeyor || [[Image(https://ci.appveyor.com/api/projects/status/ussek6c8mvgxqj2k/branch/master?svg=true, link=https://ci.appveyor.com/project/qris/boxbackup/branch/master)]] ||
     15|| !CentOS 6 || [[Image(http://builds.boxbackup.org/png?builder=CentOS%206%20amd64%20master, link=http://builds.boxbackup.org/builders/CentOS%206%20amd64%20master)]] ||
     16|| !CentOS 7 || [[Image(http://builds.boxbackup.org/png?builder=CentOS%207%20amd64%20master, link=http://builds.boxbackup.org/builders/CentOS%207%20amd64%20master)]] ||
     17|| Debian Jessie || [[Image(http://builds.boxbackup.org/png?builder=Debian%20Jessie%20amd64%20master, link=http://builds.boxbackup.org/builders/Debian%20Jessie%20amd64%20master)]] ||
    1218
    13 Download the latest !BittenSlave from http://bitten.edgewall.org/wiki/Download and the [source:box/bitten/minion minion] utility. Minion is provided by the Box Backup project. [[BR]]
    14 '''N.B.''' It is recommended to set up a dedicated user for running the build slave to ensure a clean environment, but this is not a requirement. [[BR]]
    15 Once !BittenSlave has been installed copy `minion` to the directory you want builds to be run from. Ensure it is executable.
     19Our Github settings require that each pull request compiles and passes all of our test suite on all of our supported platforms (all of the above except for SmartOS) before being merged to the master branch.
    1620
    17 Generate the `bitten-slave` configuration:
    18 {{{
    19 $ ./minion gen-config
    20 Config generated as sunos.ini.
    21 Please set Trac user/pass in the [authentication] section.
    22 }}}
    23 
    24 As instructed, set the username and password for Trac in the config file. There is also a section in the file (commented out) for masking the machine's hostname.
    25 
    26 Run `minion` for the first time. This will perform a check of the environment.
    27 {{{
    28 $ ./minion
    29 This looks like the first time you've run the bitten minion.
    30 I need to check a few things out first...
    31 
    32 Checking for Subversion... OK
    33 Checking for autoconf... OK
    34 Checking for automake... OK
    35 Checking for gcc... OK
    36 Checking for g++... OK
    37 Checking for xsltproc... OK
    38 Checking for LWP::UserAgent... OK
    39 Checking if SSH key exists...
    40   ==> SSH key does not exist. Running ssh-keygen.
    41 Generating public/private rsa key pair.
    42 Your identification has been saved in /home/bitten/.ssh/bitten-minion.
    43 Your public key has been saved in /home/bitten/.ssh/bitten-minion.pub.
    44 The key fingerprint is:
    45 xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx [email protected]
    46 
    47   ==> SSH key generated. Be sure to have the key uploaded to the build master!
    48 
    49 All done! Binaries look fine, but make sure you have headers for the following:
    50  - openssl
    51  - zlib
    52 
    53 Exiting so you can check this, rather than having failed builds reported.
    54 Just re-run minion when ready.
    55 }}}
    56 
    57 Take good note of its output! You '''__must__''' ensure that the OpenSSL and Zlib libraries and headers are installed! If anything is missing then builds will be reported as failed. If unsure, try manually compiling trunk and running the unit tests. An SSH key is also generated as part of the output to facilitate uploading of binaries produced. Please ensure you send the ''public'' portion of the key to one of the developers. (Ask on the boxbackup-dev list if you aren't sure.)
    58 
    59 Once everything has been verified `minion` can be started:
    60 {{{
    61 $ ./minion
    62 [INFO    ] Slave launched at 2011-05-03 11:33:53
    63 [INFO    ] No pending builds
    64 }}}
    65 
    66 By default it will run in the foreground and log to a file called `bitten.log` in the same directory. If you wish to background it, you may start it with `nohup`.
    67 {{{
    68 $ nohup ./minion &
    69 }}}
    70 
    71 There are also examples for daemonizing the slave on the [http://bitten.edgewall.org/wiki/BittenSlaveDaemon bitten website].
     21The configuration files for [https://github.com/boxbackup/boxbackup/blob/master/.travis.yml Travis] and [https://github.com/boxbackup/boxbackup/blob/master/appveyor.yml AppVeyor] are stored in our main Git repository, and can be used as guides for how to build the software, [wiki:CompileWithVisualC particularly on Windows where it's quite complicated].