Continuous Build: Difference between revisions

Jump to navigation Jump to search
2,263 bytes removed ,  5 November 2019
m
m (Change URL to waterfall for new buildbot version)
m (Move to Category:Building.)
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
We use both [http://buildbot.net/ Buildbot] and [http://nixos.org/hydra/ Hydra] to perform continuous building and testing of Octave.
We are using [https://buildbot.net/ Buildbot] to build and test the current development version of Octave on multiple systems in a number of different configurations.


= Buildbot =
{{Note|The current status of the builds may be found at http://buildbot.octave.org:8010/#/waterfall.}}


We are using [http://buildbot.net/ Buildbot] to build the current development version of Octave on multiple systems in a number of different configurations.  Current status of the builds my be found at [http://buildbot.octave.org:8010/#/waterfall buildbot.octave.org:8010/#/waterfall].
= Systems and Configurations =
 
== Systems and Configurations ==


The following systems and configurations are currently covered for Octave builds:
The following systems and configurations are currently covered for Octave builds:
Line 59: Line 57:
|}
|}


== Build Slave Configuration ==
= Build Slave Configuration =


To run a build slave for Octave, you must do the following:
To run a build slave for Octave, you must do the following:
Line 68: Line 66:
* Run buildbot on the slave system, preferably by starting it automatically when your system boots.  It should be running with the buildbot user ID.
* Run buildbot on the slave system, preferably by starting it automatically when your system boots.  It should be running with the buildbot user ID.


You may also want to set up ccache to work with buildbot (strongly recommended to speed up builds).  If you create a directory ~/buildbot/bin, it will be added to the execution PATH when buildbot runs commands on the slave.  This directory can have symbolic links like the following:
You may also want to set up '''ccache''' to work with buildbot (strongly recommended to speed up builds).  If you create a directory {{Path|~/buildbot/bin}}, it will be added to the execution PATH when buildbot runs commands on the slave.  This directory can have symbolic links like the following:


<pre>
lrwxrwxrwx 1 buildbot buildbot 15 Aug 26 11:39 gcc -> /usr/bin/ccache
lrwxrwxrwx 1 buildbot buildbot 15 Aug 26 11:39 gcc -> /usr/bin/ccache
lrwxrwxrwx 1 buildbot buildbot 15 Aug 26 11:40 cc -> /usr/bin/ccache
lrwxrwxrwx 1 buildbot buildbot 15 Aug 26 11:40 cc -> /usr/bin/ccache
lrwxrwxrwx 1 buildbot buildbot 15 Aug 26 11:40 c++ -> /usr/bin/ccache
lrwxrwxrwx 1 buildbot buildbot 15 Aug 26 11:40 c++ -> /usr/bin/ccache
lrwxrwxrwx 1 buildbot buildbot 15 Aug 31 23:46 gfortran -> /usr/bin/ccache
lrwxrwxrwx 1 buildbot buildbot 15 Aug 31 23:46 gfortran -> /usr/bin/ccache
</pre>


They should point to the actual location of ccache if it is not in /usr/bin.
They should point to the actual location of ccache if it is not in {{Path|/usr/bin}}.


Your system may be behind a firewall.  It does not have to have a distinct public IP address.
Your system may be behind a firewall.  It does not have to have a distinct public IP address.


=== Sample Slave Configuration File ===
== Sample Slave Configuration File ==


You must edit the settings for basedir, slavename, and password.  The basedir should be the absolute and fully expanded name of the directory containing the configuration file.  For example, if the home directory for the buildbot user is /var/lib/buildbot and your slavename is set to 'debian-x86_64' , then basedir might be '/var/lib/buildbot/slaves/debian-x86_64'.  The password should not be anything valuable.  You'll be asked to provide the slavename and password so that they may be added to the master configuration on buildbot.octave.org.  Do '''not''' post the password to the octave-maintainers mailing list.
You must edit the settings for <code>basedir</code>, <code>slavename</code>, and <code>password</code>.  The <code>basedir</code> should be the absolute and fully expanded name of the directory containing the configuration file.  For example, if the home directory for the buildbot user is {{Path|/var/lib/buildbot}} and your <code>slavename</code> is set to 'debian-x86_64' , then <code>basedir</code> might be {{Path|/var/lib/buildbot/slaves/debian-x86_64}}.  The password should not be anything valuable.  You'll be asked to provide the <code>slavename</code> and <code>password</code> so that they may be added to the master configuration on buildbot.octave.org.  Do '''not''' post the password to the octave-maintainers mailing list.


<pre>
<syntaxhighlight lang="python">
import os
import os


Line 128: Line 124:
               allow_shutdown=allow_shutdown)
               allow_shutdown=allow_shutdown)
s.setServiceParent(application)
s.setServiceParent(application)
</pre>
</syntaxhighlight>


=== Space Requirements ===
== Space Requirements ==


Building Octave takes a significant amount of disk space.  With debugging symbols, you may need several GB for each build, plus room for ccache (possibly 50GB) if you use it.  If you use a cache size that is larger than the default, you'll need to specify that in the .ccache/ccache.conf file using a line like
Building Octave takes a significant amount of disk space.  With debugging symbols, you may need several GB for each build, plus room for ccache (possibly 50GB) if you use it.  If you use a cache size that is larger than the default, you'll need to specify that in the {{Path|.ccache/ccache.conf}} file using a line like


<pre>
max_size = 50G
max_size = 50G
</pre>


If the directory containing the build and ccache directories doesn't have sufficient space, then these directory names may point to a separate partition that does have enough space available.
If the directory containing the build and ccache directories doesn't have sufficient space, then these directory names may point to a separate partition that does have enough space available.


=== Starting the Slave ===
== Starting the Slave ==
 
With everything in place, you can run the slave server with the following commands (assuming that your basedir is '/var/lib/buildbot/slaves/debian-x86_64').
 
<pre>
cd ~buildbot/slaves
sudo -u buildbot buildslave start debian-x86_64
</pre>
 
If successful, buildbot will respond with
 
<pre>
... FIXME ...
</pre>
 
= Hydra =
 
There is a build server continuously building the latest tip of the development branch of Octave. The build server is running [http://nixos.org/hydra/ Hydra], which is based on the [http://nixos.org/nix/ Nix] functional package management system. This is the official continuous build system of the GNU Project. The Hydra build of Octave is currently maintained by [[User:Mtmiller]].
 
== Octave Job Overview ==
 
The [http://hydra.nixos.org/jobset/gnu/octave-default octave-default jobset overview] page is the main entry point to the Hydra build of Octave. It shows the status of the most recent builds ("evaluations" in Hydra terminology).
 
== Latest Build Logs ==
 
The full build logs for the latest builds are available at the following links, for quick reference:
 
* [http://hydra.nixos.org/job/gnu/octave-default/tarball/latest/log/raw Tarball]
* [http://hydra.nixos.org/job/gnu/octave-default/build.x86_64-linux/latest/log/raw Linux x86_64]
* [http://hydra.nixos.org/job/gnu/octave-default/build.i686-linux/latest/log/raw Linux i686]
* [http://hydra.nixos.org/job/gnu/octave-default/coverage/latest/log/raw Coverage]
 
== Snapshot Source Tarball ==
 
A nice product of the Hydra continuous build of Octave is that there is always a [http://hydra.nixos.org/job/gnu/octave-default/tarball/latest/download source snapshot] available for download. This source snapshot is always built from the current tip of the development branch in whatever state it is in. Therefore, it may not compile or run properly and should definitely not be used for anything other than evaluation. This can be useful to evaluate the current state of Octave's development branch without needing to clone the Mercurial repository.


== Coverage Report ==
With everything in place, you can run the slave server with the following commands (assuming that your <code>basedir</code> is {{Path|/var/lib/buildbot/slaves/debian-x86_64}}).


Another product of the Hydra continuous build is the [http://hydra.nixos.org/job/gnu/octave-default/coverage/latest/download code coverage report]. The latest coverage report is always built from the current tip of the development branch. This report gives an analysis of the code coverage of the current Octave test suite. This can be used to find unexercised code paths and help improve the coverage of Octave's test suite (see [[Projects#Tests]]).
cd ~buildbot/slaves
sudo -u buildbot buildslave start debian-x86_64


[[Category:Development]]
[[Category:Building]]

Navigation menu