Project

General

Profile

Buildbot CICD configuration

Master

Installation

adduser --home /var/lib/buildbot --disabled-password --disabled-login --gecos "Buildbot user" buildbot
apt-get install -y python3-venv build-essential python3-dev libssl-dev libffi-dev libmariadb-dev-compat mercurial
su - buildbot
python3 -m venv sandbox
source sandbox/bin/activate
pip install --upgrade pip
pip install 'buildbot[bundle]' mysqlclient
exit
su - buildbot -c '(source sandbox/bin/activate; buildbot create-master master)'

Developers try jobs

addgroup developers
mkdir -p /var/lib/buildbot/jobdir/{new,cur,tmp}
chown -R buildbot.developers /var/lib/buildbot/jobdir
chmod -R g+rwx,o-rwx /var/lib/buildbot/jobdir
adduser ${UN} developers

MySQL database initialization

echo "DROP DATABASE IF EXISTS ${BUILDBOT_DB_NAME};" | mysql
echo "DROP USER IF EXISTS '${BUILDBOT_DB_USER}'@'localhost';" | mysql
echo "CREATE DATABASE ${BUILDBOT_DB_NAME};" | mysql
echo "CREATE USER IF NOT EXISTS '${BUILDBOT_DB_USER}'@'localhost' IDENTIFIED BY '${BUILDBOT_DB_PASS}';" | mysql
echo "GRANT ALL ON ${BUILDBOT_DB_NAME}.* TO '${BUILDBOT_DB_USER}'@'localhost';" | mysql
echo "FLUSH PRIVILEGES;" | mysql
su - buildbot -c '(source sandbox/bin/activate; buildbot upgrade-master master)'
su - buildbot -c '(source sandbox/bin/activate; buildbot checkconfig master)'
su - buildbot -c '(source sandbox/bin/activate; buildbot restart master)'

SystemD script

cat << EOF > /etc/systemd/system/buildbot-master.service
[Unit]
Description=BuildBot master service
After=network.target
[Service]
User=buildbot
Group=buildbot
WorkingDirectory=/var/lib/buildbot/
ExecStart=/var/lib/buildbot/sandbox/bin/buildbot start --nodaemon master
ExecStop=/var/lib/buildbot/sandbox/bin/buildbot stop master
ExecReload=/var/lib/buildbot/sandbox/bin/buildbot reconfig master
[Install]
WantedBy=multi-user.target
EOF
systemctl daemon-reload 
systemctl enable buildbot-master

Basic configuration

cat << EOF > /var/lib/buildbot/master/master.cfg
from buildbot.plugins import *
c = BuildmasterConfig = {}

c['protocols'] = {'pb': {'port': 9989}}
c['workers'] = [
worker.Worker("bb-linux", "pass!"),
worker.Worker("bb-dist", "pass!"),
worker.Worker("bb-deb", "pass!"),
worker.Worker("bb-mingw", "pass!"),
worker.Worker("macos-monterey", "pass!"),
]

c['change_source'] = []
cs_mkernel = changes.HgPoller(repourl='/srv/hg/mkernel', workdir='mkernel', pollInterval=30, branch='') 
#cs_mkernel=changes.HgPoller(repourl='http://hg.cerbelle.net/hg/mkernel', workdir='mkernel', pollInterval=30, branch='')
c['change_source'].append(cs_mkernel)

c['projects'] = [
    util.Project(name="mkernel", description="Micro_Kernel application"),
]

oomtest_lock = util.WorkerLock("oomtest_lock")

c['builders'] = []

c['schedulers'] = []

c['services'] = []

mn = reporters.MailNotifier(
    fromaddr="buildbot@cerbelle.net",
    relayhost="127.0.0.1", smtpPort=25,
    extraRecipients=["francois@cerbelle.net"],
    )
c['services'].append(mn)

c['title'] = "Buildbot Cerbelle" 
c['titleURL'] = "https://redmine.cerbelle.net/" 
c['buildbotURL'] = "https://buildbot.cerbelle.net/" 
c['www'] = dict(port="tcp:8010:interface=127.0.0.1", plugins=dict(waterfall_view={}, console_view={}, grid_view={}))
c['db'] = { 'db_url' : "mysql://${BUILDBOT_DB_USER}:${BUILDBOT_DB_PASS}@localhost/${BUILDBOT_DB_NAME}?max_idle=300" }
EOF

Workers

bb-dist

Designed to try, test and build from mercurial repository.
Generate the dist (sources) files.

Infrastructure

  • 8 CPU
  • 4GB RAM
  • 20GB HDD

Configuration

Debian12 with postinstall customizations

adduser --home /var/lib/buildbot --disabled-password --gecos "Buildbot user" buildbot
apt-get install -y python3-venv sudo
su - buildbot -c '(python3 -m venv sandbox)'
su - buildbot -c '(source sandbox/bin/activate; pip install --upgrade pip)'
su - buildbot -c '(source sandbox/bin/activate; pip install buildbot-worker)'
su - buildbot -c '(source sandbox/bin/activate; buildbot-worker create-worker worker buildbot.cerbelle.net example-worker pass)'
echo 'François Cerbelle <francois@cerbelle.net>' > /var/lib/buildbot/worker/info/admin
hostname -f > /var/lib/buildbot/worker/info/host
cat << EOF > /etc/systemd/system/buildbot-worker.service
[Unit]
Description=BuildBot worker service
After=network.target
[Service]
User=buildbot
Group=buildbot
WorkingDirectory=/var/lib/buildbot/
ExecStart=/var/lib/buildbot/sandbox/bin/buildbot-worker start --nodaemon worker
ExecStop=/var/lib/buildbot/sandbox/bin/buildbot-worker stop worker
ExecReload=/var/lib/buildbot/sandbox/bin/buildbot-worker restart worker
[Install]
WantedBy=multi-user.target
EOF
systemctl daemon-reload
systemctl enable buildbot-worker
systemctl stop buildbot-worker
systemctl start buildbot-worker

Build pre-requisites

apt-get install -y mercurial build-essential autogen autoconf autopoint libtool check pkg-config gettext cppcheck gcovr

bb-linux

Designed to try, test and build from dist (sources) files.

Infrastructure

  • 4 CPU
  • 2GB RAM
  • 20GB HDD

Configuration

Debian12 with postinstall customizations

adduser --home /var/lib/buildbot --disabled-password --gecos "Buildbot user" buildbot
apt-get install -y python3-venv sudo
su - buildbot -c '(python3 -m venv sandbox)'
su - buildbot -c '(source sandbox/bin/activate; pip install --upgrade pip)'
su - buildbot -c '(source sandbox/bin/activate; pip install buildbot-worker)'
su - buildbot -c '(source sandbox/bin/activate; buildbot-worker create-worker worker buildbot.cerbelle.net example-worker pass)'
echo 'François Cerbelle <francois@cerbelle.net>' > /var/lib/buildbot/worker/info/admin
hostname -f > /var/lib/buildbot/worker/info/host
cat << EOF > /etc/systemd/system/buildbot-worker.service
[Unit]
Description=BuildBot worker service
After=network.target
[Service]
User=buildbot
Group=buildbot
WorkingDirectory=/var/lib/buildbot/
ExecStart=/var/lib/buildbot/sandbox/bin/buildbot-worker start --nodaemon worker
ExecStop=/var/lib/buildbot/sandbox/bin/buildbot-worker stop worker
ExecReload=/var/lib/buildbot/sandbox/bin/buildbot-worker restart worker
[Install]
WantedBy=multi-user.target
EOF
systemctl daemon-reload
systemctl enable buildbot-worker
systemctl stop buildbot-worker
systemctl start buildbot-worker

Build pre-requisites

apt-get install -y build-essential doxygen doxygen-latex check pkg-config lcov graphviz fuse3 gcovr

bb-mingw

Designed to try, test and build from dist (sources) files.

Infrastructure

  • 4 CPU
  • 2GB RAM
  • 20GB HDD

Configuration

Debian12 with postinstall customizations

adduser --home /var/lib/buildbot --disabled-password --gecos "Buildbot user" buildbot
apt-get install -y python3-venv sudo
su - buildbot -c '(python3 -m venv sandbox)'
su - buildbot -c '(source sandbox/bin/activate; pip install --upgrade pip)'
su - buildbot -c '(source sandbox/bin/activate; pip install buildbot-worker)'
su - buildbot -c '(source sandbox/bin/activate; buildbot-worker create-worker worker buildbot.cerbelle.net example-worker pass)'
echo 'François Cerbelle <francois@cerbelle.net>' > /var/lib/buildbot/worker/info/admin
hostname -f > /var/lib/buildbot/worker/info/host
cat << EOF > /etc/systemd/system/buildbot-worker.service
[Unit]
Description=BuildBot worker service
After=network.target
[Service]
User=buildbot
Group=buildbot
WorkingDirectory=/var/lib/buildbot/
ExecStart=/var/lib/buildbot/sandbox/bin/buildbot-worker start --nodaemon worker
ExecStop=/var/lib/buildbot/sandbox/bin/buildbot-worker stop worker
ExecReload=/var/lib/buildbot/sandbox/bin/buildbot-worker restart worker
[Install]
WantedBy=multi-user.target
EOF
systemctl daemon-reload
systemctl enable buildbot-worker
systemctl stop buildbot-worker
systemctl start buildbot-worker

Build pre-requisites

apt-get install -y mingw-w64 mingw-w64-tools make g++ nsis pkg-config pev

Then, follow all the individual dependencies installations steps from Cross_compilation_on_Debian_for_Windows

bb-macos12

Designed to try, test and build from dist (sources) files.

Infrastructure

  • 4 CPU
  • 2GB RAM
  • 20GB HDD

Configuration

Build pre-requisites

bb-debian12

Designed to try, test and build from dist (sources) files.

Infrastructure

  • 4 CPU
  • 2GB RAM
  • 20GB HDD

Configuration

Debian12 with postinstall customizations

adduser --home /var/lib/buildbot --disabled-password --gecos "Buildbot user" buildbot
apt-get install -y python3-venv sudo
su - buildbot -c '(python3 -m venv sandbox)'
su - buildbot -c '(source sandbox/bin/activate; pip install --upgrade pip)'
su - buildbot -c '(source sandbox/bin/activate; pip install buildbot-worker)'
su - buildbot -c '(source sandbox/bin/activate; buildbot-worker create-worker worker buildbot.cerbelle.net example-worker pass)'
echo 'François Cerbelle <francois@cerbelle.net>' > /var/lib/buildbot/worker/info/admin
hostname -f > /var/lib/buildbot/worker/info/host
cat << EOF > /etc/systemd/system/buildbot-worker.service
[Unit]
Description=BuildBot worker service
After=network.target
[Service]
User=buildbot
Group=buildbot
WorkingDirectory=/var/lib/buildbot/
ExecStart=/var/lib/buildbot/sandbox/bin/buildbot-worker start --nodaemon worker
ExecStop=/var/lib/buildbot/sandbox/bin/buildbot-worker stop worker
ExecReload=/var/lib/buildbot/sandbox/bin/buildbot-worker restart worker
[Install]
WantedBy=multi-user.target
EOF
systemctl daemon-reload
systemctl enable buildbot-worker
systemctl stop buildbot-worker
systemctl start buildbot-worker

Build pre-requisites

apt-get install -y pbuilder

bb-rhel9

Designed to try, test and build from dist (sources) files.

Infrastructure

  • 4 CPU
  • 2GB RAM
  • 20GB HDD

Configuration

Build pre-requisites

Builders

src

Prerequisites: mercurial build-essential autogen autoconf autopoint libtool check

Worker: bb-dist

Steps:
  1. hg clone
  2. ./bootstrap.sh
  3. ./configure
  4. make all check clean
  5. make distclean
src = util.BuildFactory()
src.addStep(steps.RemoveDirectory(name='Cleanup environment',dir="build"))
src.addStep(steps.Mercurial(name="Clone repository",repourl='http://hg.cerbelle.net/hg/mkernel', mode='full', method='fresh', branchType='inrepo'))
src.addStep(steps.SetPropertyFromCommand(name="Get package name", command="grep AC_INIT configure.ac | sed 's~.*\[\(.*\)\].*\[\(.*\)\].*\[\(.*\)\].*~\\1~'", property="package", want_stdout=True, want_stderr=True))
src.addStep(steps.SetPropertyFromCommand(name="Get package version", command="grep AC_INIT configure.ac | sed 's~.*\[\(.*\)\].*\[\(.*\)\].*\[\(.*\)\].*~\\2~'", property="version", want_stdout=True, want_stderr=True))
src.addStep(steps.ShellCommand(name="Generate autotools files",command=["./bootstrap.sh"], want_stdout=True, want_stderr=True))
src.addStep(steps.Configure(name='Default configuration', command=["./configure","--disable-doxygen"], want_stdout=True, want_stderr=True, logfiles={"config.log": "config.log"}))
src.addStep(steps.Compile(name="Default make all",command=["make", util.Interpolate("CFLAGS=-DBBID=\\\"%(prop:buildnumber)s\\\""), "all" ], want_stdout=True, want_stderr=True))
src.addStep(steps.Test(name="Default make check",command=["make", util.Interpolate("CFLAGS=-DBBID=\\\"%(prop:buildnumber)s\\\""), "check" ], want_stdout=True, want_stderr=True, haltOnFailure=True, logfiles={"testsuite.log": "test/testsuite.log"}, locks=[oomtest_lock.access('exclusive')]))
src.addStep(steps.Compile(name="Default make clean",command=["make", util.Interpolate("CFLAGS=-DBBID=\\\"%(prop:buildnumber)s\\\""), "clean" ], want_stdout=True, want_stderr=True))
src.addStep(steps.Compile(name="Default make distclean",command=["make", util.Interpolate("CFLAGS=-DBBID=\\\"%(prop:buildnumber)s\\\""), "distclean" ], want_stdout=True, want_stderr=True))
c['builders'].append( util.BuilderConfig(
    project="mkernel",
    name="Src",
    workernames=["bb-dist"],
    factory=src))

src-cppcheck

Pre-requisites: mercurial build-essential autogen autoconf autopoint libtool check cppcheck

Worker: bb-dist

Steps:
  1. hg clone
  2. cppcheck
  3. ./bootstrap.sh?
  4. ./configure --enable-debug?
  5. make all check cppcheck clean?
  6. Publish cppcheck
  7. make distclean
srcCppcheck = util.BuildFactory()
srcCppcheck.addStep(steps.RemoveDirectory(name='Cleanup environment',dir="build"))
srcCppcheck.addStep(steps.SetProperty(name="Compute basename", property="basename", value=util.Interpolate("%(prop:package)s-%(prop:version)s")))
srcCppcheck.addStep(steps.Mercurial(name="Clone repository",repourl='http://hg.cerbelle.net/hg/mkernel', mode='full', method='fresh', branchType='inrepo'))
srcCppcheck.addStep(steps.SetPropertyFromCommand(name="Get package name", command="grep AC_INIT configure.ac | sed 's~.*\[\(.*\)\].*\[\(.*\)\].*\[\(.*\)\].*~\\1~'", property="package", want_stdout=True, want_stderr=True))
srcCppcheck.addStep(steps.SetPropertyFromCommand(name="Get package version", command="grep AC_INIT configure.ac | sed 's~.*\[\(.*\)\].*\[\(.*\)\].*\[\(.*\)\].*~\\2~'", property="version", want_stdout=True, want_stderr=True))
srcCppcheck.addStep(steps.ShellCommand(name="Generate autotools files",command=["./bootstrap.sh"], want_stdout=True, want_stderr=True))
srcCppcheck.addStep(steps.Configure(name='Default configuration', command=["./configure","--disable-doxygen"], want_stdout=True, want_stderr=True, logfiles={"config.log": "config.log"}))
srcCppcheck.addStep(steps.Test(name="Default make cppcheck",command=["make", util.Interpolate("CFLAGS=-DBBID=\\\"%(prop:buildnumber)s\\\""), "cppcheck" ], want_stdout=True, want_stderr=True, haltOnFailure=True, logfiles={"cppcheck.xml": "cppcheck.xml"}))
srcCppcheck.addStep(steps.DirectoryUpload(name="Cppcheck upload report", workersrc="cppcheck", masterdest=util.Interpolate("/var/www/packages.cerbelle.net/%(prop:package)s/%(prop:basename)s-cppcheck"), urlText="CppCheck report", url=util.Interpolate("https://packages.cerbelle.net/%(prop:package)s/%(prop:basename)s-cppcheck")))
srcCppcheck.addStep(steps.Compile(name="Default make clean",command=["make", util.Interpolate("CFLAGS=-DBBID=\\\"%(prop:buildnumber)s\\\""), "clean" ], want_stdout=True, want_stderr=True))
srcCppcheck.addStep(steps.Compile(name="Default make distclean",command=["make", util.Interpolate("CFLAGS=-DBBID=\\\"%(prop:buildnumber)s\\\""), "distclean" ], want_stdout=True, want_stderr=True))
c['builders'].append( util.BuilderConfig(
    project="mkernel",
    name="SrcCppcheck",
    workernames=["bb-dist"],
    factory=srcCppcheck))

src-dbg

Pre-requisite: mercurial build-essential autogen autoconf autopoint libtool check

Worker: bb-dist

Steps:
  1. hg clone
  2. ./bootstrap.sh
  3. ./configure --enable-debug
  4. make all check clean
  5. make distclean
srcdbg = util.BuildFactory()
srcdbg.addStep(steps.RemoveDirectory(name='Cleanup environment',dir="build"))
srcdbg.addStep(steps.Mercurial(name="Clone repository",repourl='http://hg.cerbelle.net/hg/mkernel', mode='full', method='fresh', branchType='inrepo'))
srcdbg.addStep(steps.SetPropertyFromCommand(name="Get package name", command="grep AC_INIT configure.ac | sed 's~.*\[\(.*\)\].*\[\(.*\)\].*\[\(.*\)\].*~\\1~'", property="package", want_stdout=True, want_stderr=True))
srcdbg.addStep(steps.SetPropertyFromCommand(name="Get package version", command="grep AC_INIT configure.ac | sed 's~.*\[\(.*\)\].*\[\(.*\)\].*\[\(.*\)\].*~\\2~'", property="version", want_stdout=True, want_stderr=True))
srcdbg.addStep(steps.ShellCommand(name="Generate autotools files",command=["./bootstrap.sh"], want_stdout=True, want_stderr=True))
srcdbg.addStep(steps.Configure(name='Default configuration for debug', command=["./configure","--disable-doxygen", "--enable-debug"], want_stdout=True, want_stderr=True, logfiles={"config.log": "config.log"}))
srcdbg.addStep(steps.Compile(name="Default make all",command=["make", util.Interpolate("CFLAGS=-DBBID=\\\"%(prop:buildnumber)s\\\""), "all" ], want_stdout=True, want_stderr=True))
srcdbg.addStep(steps.Test(name="Default make check",command=["make", util.Interpolate("CFLAGS=-DBBID=\\\"%(prop:buildnumber)s\\\""), "check" ], want_stdout=True, want_stderr=True, haltOnFailure=True, logfiles={"testsuite.log": "test/testsuite.log"}, locks=[oomtest_lock.access('exclusive')]))
srcdbg.addStep(steps.Compile(name="Default make clean",command=["make", util.Interpolate("CFLAGS=-DBBID=\\\"%(prop:buildnumber)s\\\""), "clean" ], want_stdout=True, want_stderr=True))
srcdbg.addStep(steps.Compile(name="Default make distclean",command=["make", util.Interpolate("CFLAGS=-DBBID=\\\"%(prop:buildnumber)s\\\""), "distclean" ], want_stdout=True, want_stderr=True))
c['builders'].append( util.BuilderConfig(
    project="mkernel",
    name="SrcDbg",
    workernames=["bb-dist"],
    factory=srcdbg))

src-gcov

Pre-requisite: mercurial build-essential autogen autoconf autopoint libtool check

Worker: bb-dist

Steps:
  1. hg clone
  2. ./bootstrap.sh
  3. ./configure --enable-gcov
  4. make all check lcov clean
  5. gcov `find . -name '*.gcno'`
  6. make distclean
srcgcov = util.BuildFactory()
srcgcov.addStep(steps.RemoveDirectory(name='Cleanup environment',dir="build"))
srcgcov.addStep(steps.Mercurial(name="Clone repository",repourl='http://hg.cerbelle.net/hg/mkernel', mode='full', method='fresh', branchType='inrepo'))
srcgcov.addStep(steps.SetPropertyFromCommand(name="Get package name", command="grep AC_INIT configure.ac | sed 's~.*\[\(.*\)\].*\[\(.*\)\].*\[\(.*\)\].*~\\1~'", property="package", want_stdout=True, want_stderr=True))
srcgcov.addStep(steps.SetPropertyFromCommand(name="Get package version", command="grep AC_INIT configure.ac | sed 's~.*\[\(.*\)\].*\[\(.*\)\].*\[\(.*\)\].*~\\2~'", property="version", want_stdout=True, want_stderr=True))
srcgcov.addStep(steps.ShellCommand(name="Generate autotools files",command=["./bootstrap.sh"], want_stdout=True, want_stderr=True))
srcgcov.addStep(steps.Configure(name='Default configuration for gcov', command=["./configure","--disable-doxygen", "--enable-gcov"], want_stdout=True, want_stderr=True, logfiles={"config.log": "config.log"}))
srcgcov.addStep(steps.Compile(name="Default make all",command=["make", util.Interpolate("CFLAGS=-DBBID=\\\"%(prop:buildnumber)s\\\""), "all" ], want_stdout=True, want_stderr=True))
srcgcov.addStep(steps.Test(name="Default make check",command=["make", util.Interpolate("CFLAGS=-DBBID=\\\"%(prop:buildnumber)s\\\""), "check" ], want_stdout=True, want_stderr=True, haltOnFailure=True, logfiles={"testsuite.log": "test/testsuite.log"}, locks=[oomtest_lock.access('exclusive')]))
srcgcov.addStep(steps.ShellCommand(name="Check coverage statistics",command="gcov -n `find . -type f -name '*.gcno'`", want_stdout=True, want_stderr=True))
srcgcov.addStep(steps.Compile(name="Default make clean",command=["make", util.Interpolate("CFLAGS=-DBBID=\\\"%(prop:buildnumber)s\\\""), "clean" ], want_stdout=True, want_stderr=True))
srcgcov.addStep(steps.Compile(name="Default make distclean",command=["make", util.Interpolate("CFLAGS=-DBBID=\\\"%(prop:buildnumber)s\\\""), "distclean" ], want_stdout=True, want_stderr=True))
c['builders'].append( util.BuilderConfig(
    project="mkernel",
    name="SrcGcov",
    workernames=["bb-dist"],
    factory=srcgcov))

src-dbggcov

Pre-requisites: mercurial build-essential autogen autoconf autopoint libtool check

Worker: bb-dist

Steps:
  1. hg clone
  2. ./bootstrap.sh
  3. ./configure --enable-debug --enable-gcov
  4. make all check clean
  5. gcov `find . -name '*.gcno'`
  6. make distclean
srcdbggcov = util.BuildFactory()
srcdbggcov.addStep(steps.RemoveDirectory(name='Cleanup environment',dir="build"))
srcdbggcov.addStep(steps.Mercurial(name="Clone repository",repourl='http://hg.cerbelle.net/hg/mkernel', mode='full', method='fresh', branchType='inrepo'))
srcdbggcov.addStep(steps.SetPropertyFromCommand(name="Get package name", command="grep AC_INIT configure.ac | sed 's~.*\[\(.*\)\].*\[\(.*\)\].*\[\(.*\)\].*~\\1~'", property="package", want_stdout=True, want_stderr=True))
srcdbggcov.addStep(steps.SetPropertyFromCommand(name="Get package version", command="grep AC_INIT configure.ac | sed 's~.*\[\(.*\)\].*\[\(.*\)\].*\[\(.*\)\].*~\\2~'", property="version", want_stdout=True, want_stderr=True))
srcdbggcov.addStep(steps.ShellCommand(name="Generate autotools files",command=["./bootstrap.sh"], want_stdout=True, want_stderr=True))
srcdbggcov.addStep(steps.Configure(name='Default configuration for gcov and debug', command=["./configure","--disable-doxygen", "--enable-debug", "--enable-gcov"], want_stdout=True, want_stderr=True, logfiles={"config.log": "config.log"}))
srcdbggcov.addStep(steps.Compile(name="Default make all",command=["make", util.Interpolate("CFLAGS=-DBBID=\\\"%(prop:buildnumber)s\\\""), "all" ], want_stdout=True, want_stderr=True))
srcdbggcov.addStep(steps.Test(name="Default make check",command=["make", util.Interpolate("CFLAGS=-DBBID=\\\"%(prop:buildnumber)s\\\""), "check" ], want_stdout=True, want_stderr=True, haltOnFailure=True, logfiles={"testsuite.log": "test/testsuite.log"}, locks=[oomtest_lock.access('exclusive')]))
srcdbggcov.addStep(steps.ShellCommand(name="Check coverage statistics",command="gcov -n `find . -type f -name '*.gcno'`", want_stdout=True, want_stderr=True))
srcdbggcov.addStep(steps.Compile(name="Default make clean",command=["make", util.Interpolate("CFLAGS=-DBBID=\\\"%(prop:buildnumber)s\\\""), "clean" ], want_stdout=True, want_stderr=True))
srcdbggcov.addStep(steps.Compile(name="Default make distclean",command=["make", util.Interpolate("CFLAGS=-DBBID=\\\"%(prop:buildnumber)s\\\""), "distclean" ], want_stdout=True, want_stderr=True))
c['builders'].append( util.BuilderConfig(
    project="mkernel",
    name="SrcDbgGcov",
    workernames=["bb-dist"],
    factory=srcdbggcov))

src-gprof

Pre-requisite: mercurial build-essential autogen autoconf autopoint libtool check

Worker: bb-dist

Steps:
  1. hg clone
  2. ./bootstrap.sh
  3. ./configure --enable-gprof
  4. make all check clean
  5. gprof ./src/mkernel `find src -name 'gmon.out'`
  6. make distclean
srcgprof = util.BuildFactory()
srcgprof.addStep(steps.RemoveDirectory(name='Cleanup environment',dir="build"))
srcgprof.addStep(steps.Mercurial(name="Clone repository",repourl='http://hg.cerbelle.net/hg/mkernel', mode='full', method='fresh', branchType='inrepo'))
srcgprof.addStep(steps.SetPropertyFromCommand(name="Get package name", command="grep AC_INIT configure.ac | sed 's~.*\[\(.*\)\].*\[\(.*\)\].*\[\(.*\)\].*~\\1~'", property="package", want_stdout=True, want_stderr=True))
srcgprof.addStep(steps.SetPropertyFromCommand(name="Get package version", command="grep AC_INIT configure.ac | sed 's~.*\[\(.*\)\].*\[\(.*\)\].*\[\(.*\)\].*~\\2~'", property="version", want_stdout=True, want_stderr=True))
srcgprof.addStep(steps.ShellCommand(name="Generate autotools files",command=["./bootstrap.sh"], want_stdout=True, want_stderr=True))
srcgprof.addStep(steps.Configure(name='Default configuration for gprof', command=["./configure","--disable-doxygen", "--enable-gprof"], want_stdout=True, want_stderr=True, logfiles={"config.log": "config.log"}))
srcgprof.addStep(steps.Compile(name="Default make all",command=["make", util.Interpolate("CFLAGS=-DBBID=\\\"%(prop:buildnumber)s\\\""), "all" ], want_stdout=True, want_stderr=True))
srcgprof.addStep(steps.Test(name="Default make check",command=["make", util.Interpolate("CFLAGS=-DBBID=\\\"%(prop:buildnumber)s\\\""), "check" ], want_stdout=True, want_stderr=True, haltOnFailure=True, logfiles={"testsuite.log": "test/testsuite.log"}, locks=[oomtest_lock.access('exclusive')]))
srcgprof.addStep(steps.Compile(name="Default make clean",command=["make", util.Interpolate("CFLAGS=-DBBID=\\\"%(prop:buildnumber)s\\\""), "clean" ], want_stdout=True, want_stderr=True))
srcgprof.addStep(steps.Compile(name="Default make distclean",command=["make", util.Interpolate("CFLAGS=-DBBID=\\\"%(prop:buildnumber)s\\\""), "distclean" ], want_stdout=True, want_stderr=True))
c['builders'].append( util.BuilderConfig(
    project="mkernel",
    name="SrcGprof",
    workernames=["bb-dist"],
    factory=srcgprof))

src-gdb

Pre-requisites: mercurial build-essential autogen autoconf autopoint libtool check

Worker: bb-dist

Steps:
  1. hg clone
  2. ./bootstrap.sh
  3. ./configure --enable-gdb
  4. make all check clean
  5. make distclean
srcgdb = util.BuildFactory()
srcgdb.addStep(steps.RemoveDirectory(name='Cleanup environment',dir="build"))
srcgdb.addStep(steps.Mercurial(name="Clone repository",repourl='http://hg.cerbelle.net/hg/mkernel', mode='full', method='fresh', branchType='inrepo'))
srcgdb.addStep(steps.SetPropertyFromCommand(name="Get package name", command="grep AC_INIT configure.ac | sed 's~.*\[\(.*\)\].*\[\(.*\)\].*\[\(.*\)\].*~\\1~'", property="package", want_stdout=True, want_stderr=True))
srcgdb.addStep(steps.SetPropertyFromCommand(name="Get package version", command="grep AC_INIT configure.ac | sed 's~.*\[\(.*\)\].*\[\(.*\)\].*\[\(.*\)\].*~\\2~'", property="version", want_stdout=True, want_stderr=True))
srcgdb.addStep(steps.ShellCommand(name="Generate autotools files",command=["./bootstrap.sh"], want_stdout=True, want_stderr=True))
srcgdb.addStep(steps.Configure(name='Default configuration for gdb', command=["./configure","--disable-doxygen", "--enable-gdb"], want_stdout=True, want_stderr=True, logfiles={"config.log": "config.log"}))
srcgdb.addStep(steps.Compile(name="Default make all",command=["make", util.Interpolate("CFLAGS=-DBBID=\\\"%(prop:buildnumber)s\\\""), "all" ], want_stdout=True, want_stderr=True))
srcgdb.addStep(steps.Test(name="Default make check",command=["make", util.Interpolate("CFLAGS=-DBBID=\\\"%(prop:buildnumber)s\\\""), "check" ], want_stdout=True, want_stderr=True, haltOnFailure=True, logfiles={"testsuite.log": "test/testsuite.log"}, locks=[oomtest_lock.access('exclusive')]))
srcgdb.addStep(steps.Compile(name="Default make clean",command=["make", util.Interpolate("CFLAGS=-DBBID=\\\"%(prop:buildnumber)s\\\""), "clean" ], want_stdout=True, want_stderr=True))
srcgdb.addStep(steps.Compile(name="Default make distclean",command=["make", util.Interpolate("CFLAGS=-DBBID=\\\"%(prop:buildnumber)s\\\""), "distclean" ], want_stdout=True, want_stderr=True))
c['builders'].append( util.BuilderConfig(
    project="mkernel",
    name="SrcGdb",
    workernames=["bb-dist"],
    factory=srcgdb))

src-dist

Pre-requisites: mercurial build-essential autogen autoconf autopoint libtool gettext check

Worker: bb-dist

Steps:
  1. hg clone
  2. ./bootstrap.sh
  3. ./configure
  4. make dist distcheck distclean
  5. Upload tgz
  6. make distclean
srcdist = util.BuildFactory()
srcdist.addStep(steps.RemoveDirectory(name='Cleanup environment',dir="build"))
srcdist.addStep(steps.SetProperty(name="Compute basename", property="basename", value=util.Interpolate("%(prop:package)s-%(prop:version)s")))
srcdist.addStep(steps.Mercurial(name="Clone repository",repourl='http://hg.cerbelle.net/hg/mkernel', mode='full', method='fresh', branchType='inrepo'))
srcdist.addStep(steps.SetPropertyFromCommand(name="Get package name", command="grep AC_INIT configure.ac | sed 's~.*\[\(.*\)\].*\[\(.*\)\].*\[\(.*\)\].*~\\1~'", property="package", want_stdout=True, want_stderr=True))
srcdist.addStep(steps.SetPropertyFromCommand(name="Get package version", command="grep AC_INIT configure.ac | sed 's~.*\[\(.*\)\].*\[\(.*\)\].*\[\(.*\)\].*~\\2~'", property="version", want_stdout=True, want_stderr=True))
srcdist.addStep(steps.ShellCommand(name="Generate autotools files",command=["./bootstrap.sh"], want_stdout=True, want_stderr=True))
srcdist.addStep(steps.Configure(name='Default configuration', command=["./configure","--disable-doxygen" ], want_stdout=True, want_stderr=True, logfiles={"config.log": "config.log"}))
srcdist.addStep(steps.Compile(name="Default make dist",command=["make", util.Interpolate("CFLAGS=-DBBID=\\\"%(prop:buildnumber)s\\\""), "dist" ], want_stdout=True, want_stderr=True))
srcdist.addStep(steps.Test(name="Default make distcheck",command=["make", util.Interpolate("CFLAGS=-DBBID=\\\"%(prop:buildnumber)s\\\""), "distcheck" ], want_stdout=True, want_stderr=True, haltOnFailure=True, locks=[oomtest_lock.access('exclusive')]))
srcdist.addStep(steps.Compile(name="Default make distclean",command=["make", util.Interpolate("CFLAGS=-DBBID=\\\"%(prop:buildnumber)s\\\""), "distclean" ], want_stdout=True, want_stderr=True))
srcdist.addStep(steps.MultipleFileUpload(name="Default publish sources dist files",
  workersrcs=[
    util.Interpolate("%(prop:basename)s.tar.*"),
    util.Interpolate("%(prop:basename)s.zip"),
  ],
  masterdest=util.Interpolate("/var/www/packages.cerbelle.net/%(prop:package)s"), url=util.Interpolate("https://packages.cerbelle.net/%(prop:package)s/"),
  urlText="Sources folder", mode=0o755, glob=True, keepstamp=True))
srcdist.addStep(steps.MasterShellCommand(name="Fix www folders permissions",command=["chmod", "-R", "u+rw,go+r", util.Interpolate("/var/www/packages.cerbelle.net/%(prop:package)s")]))
srcdist.addStep(steps.Trigger(
  schedulerNames=['MKernel_Triggerable'], waitForFinish=False, updateSourceStamp=True,
  set_properties={
    'package'  : util.Interpolate("%(prop:package)s"),
    'version'  : util.Interpolate("%(prop:version)s"),
}))
c['builders'].append( util.BuilderConfig(
    project="mkernel",
    name="SrcDist",
    workernames=["bb-dist"],
    factory=srcdist))

src-inst

Pre-requisites: mercurial build-essential autogen autoconf autopoint libtool check

Worker: bb-dist

Steps:
  1. hg clone
  2. ./bootstrap.sh
  3. ./configure --prefix=`pwd`/inst
  4. make install installcheck uninstall
  5. make distclean
srcinst = util.BuildFactory()
srcinst.addStep(steps.RemoveDirectory(name='Cleanup environment',dir="build"))
srcinst.addStep(steps.Mercurial(name="Clone repository",repourl='http://hg.cerbelle.net/hg/mkernel', mode='full', method='fresh', branchType='inrepo'))
srcinst.addStep(steps.SetPropertyFromCommand(name="Get package name", command="grep AC_INIT configure.ac | sed 's~.*\[\(.*\)\].*\[\(.*\)\].*\[\(.*\)\].*~\\1~'", property="package", want_stdout=True, want_stderr=True))
srcinst.addStep(steps.SetPropertyFromCommand(name="Get package version", command="grep AC_INIT configure.ac | sed 's~.*\[\(.*\)\].*\[\(.*\)\].*\[\(.*\)\].*~\\2~'", property="version", want_stdout=True, want_stderr=True))
srcinst.addStep(steps.ShellCommand(name="Generate autotools files",command=["./bootstrap.sh"], want_stdout=True, want_stderr=True))
srcinst.addStep(steps.Configure(name='Default configuration', command=["./configure", util.Interpolate("--prefix=%(prop:builddir)s/inst"), "--disable-doxygen" ], want_stdout=True, want_stderr=True, logfiles={"config.log": "config.log"}))
srcinst.addStep(steps.Compile(name="Default make install",command=["make", util.Interpolate("CFLAGS=-DBBID=\\\"%(prop:buildnumber)s\\\""), "install" ], want_stdout=True, want_stderr=True))
srcinst.addStep(steps.Test(name="Default make installcheck",command=["make", util.Interpolate("CFLAGS=-DBBID=\\\"%(prop:buildnumber)s\\\""), "installcheck" ], want_stdout=True, want_stderr=True, haltOnFailure=True, locks=[oomtest_lock.access('exclusive')]))
srcinst.addStep(steps.Compile(name="Default make uninstall",command=["make", util.Interpolate("CFLAGS=-DBBID=\\\"%(prop:buildnumber)s\\\""), "uninstall" ], want_stdout=True, want_stderr=True))
srcinst.addStep(steps.Compile(name="Default make distclean",command=["make", util.Interpolate("CFLAGS=-DBBID=\\\"%(prop:buildnumber)s\\\""), "distclean" ], want_stdout=True, want_stderr=True))
c['builders'].append( util.BuilderConfig(
    project="mkernel",
    name="SrcInst",
    workernames=["bb-dist"],
    factory=srcinst))

dist-dox

Pre-requisites: build-essential doxygen doxygen-latex

Worker: bb-linux

Steps:>
  1. Download TGZ
  2. ./configure --enable-latex-docs
  3. make -C doc html/index.html
  4. Upload HTML
  5. make -C doc mkernel.pdf
  6. Upload PDF
  7. make distclean
distdox = util.BuildFactory()
distdox.addStep(steps.RemoveDirectory(name='Cleanup environment',dir="build"))
distdox.addStep(steps.SetProperty(name="Compute basename", property="basename", value=util.Interpolate("%(prop:package)s-%(prop:version)s")))
distdox.addStep(steps.FileDownload(name="Download sources",mastersrc=util.Interpolate("/var/www/packages.cerbelle.net/%(prop:package)s/%(prop:basename)s.tar.gz"),workerdest=util.Interpolate("%(prop:basename)s.tar.gz")))
distdox.addStep(steps.ShellCommand(name='Extract sources from dist', command=['tar', 'xvzf', util.Interpolate("%(prop:basename)s.tar.gz")], want_stdout=True, want_stderr=True))
distdox.addStep(steps.MakeDirectory(name='Create a build folder', dir=util.Interpolate("build/%(prop:basename)s-build")))
distdox.addStep(steps.Configure(name='Doxygen configure (Out of tree)', command=[util.Interpolate("../%(prop:basename)s/configure"), '--prefix=/usr', '--enable-latex-docs' ], workdir=util.Interpolate("build/%(prop:basename)s-build"), want_stdout=True, want_stderr=True, logfiles={"config.log": "config.log"}))
distdox.addStep(steps.Compile(name="Doxygen make HTML (Out of tree)",command=["make", util.Interpolate("CFLAGS=-DBBID=\\\"%(prop:buildnumber)s\\\""), "-C", "doc", "all" ], workdir=util.Interpolate("build/%(prop:basename)s-build"), want_stdout=True, want_stderr=True))
distdox.addStep(steps.DirectoryUpload(name="Upload HTML refman", workersrc=util.Interpolate("%(prop:basename)s-build/doc/html"), masterdest=util.Interpolate("/var/www/packages.cerbelle.net/%(prop:package)s/%(prop:basename)s-refman"), urlText="HTML Refman", url=util.Interpolate("https://packages.cerbelle.net/%(prop:package)s/%(prop:basename)s-refman")))
distdox.addStep(steps.Compile(name="Doxygen make PDF (Out of tree)",command=["make", util.Interpolate("CFLAGS=-DBBID=\\\"%(prop:buildnumber)s\\\""), "pdf" ], workdir=util.Interpolate("build/%(prop:basename)s-build"), want_stdout=True, want_stderr=True))
distdox.addStep(steps.FileUpload(name="Upload PDF refman", workersrc=util.Interpolate("%(prop:basename)s-build/doc/latex/refman.pdf"), masterdest=util.Interpolate('/var/www/packages.cerbelle.net/%(prop:package)s/%(prop:basename)s-refman.pdf'),mode=0o755,urlText="PDF Refman",url=util.Interpolate("https://packages.cerbelle.net/%(prop:package)s/%(prop:basename)s-refman.pdf")))
distdox.addStep(steps.Compile(name="Doxygen make clean (Out of tree)",command=["make", util.Interpolate("CFLAGS=-DBBID=\\\"%(prop:buildnumber)s\\\""), "clean" ],workdir=util.Interpolate("build/%(prop:basename)s-build"), want_stdout=True, want_stderr=True))
distdox.addStep(steps.Compile(name="Doxygen make distclean (Out of tree)",command=["make", util.Interpolate("CFLAGS=-DBBID=\\\"%(prop:buildnumber)s\\\""), "distclean" ],workdir=util.Interpolate("build/%(prop:basename)s-build"), want_stdout=True, want_stderr=True))
c['builders'].append( util.BuilderConfig(
    project="mkernel",
    name="DistDox",
    workernames=["bb-linux"],
    factory=distdox))

dist-lcov

Pre-requisites: build-essential check pkg-config lcov

Worker: bb-linux

Steps:
  1. Download TGZ
  2. ./configure --disable-doxygen --enable-debug --enable-gcov
  3. make all check lcov
  4. Upload LCOV
  5. make clean distclean
distlcov = util.BuildFactory()
distlcov.addStep(steps.RemoveDirectory(name='Cleanup environment',dir="build"))
distlcov.addStep(steps.SetProperty(name="Compute basename", property="basename", value=util.Interpolate("%(prop:package)s-%(prop:version)s")))
distlcov.addStep(steps.FileDownload(name="Download sources",mastersrc=util.Interpolate("/var/www/packages.cerbelle.net/%(prop:package)s/%(prop:basename)s.tar.gz"),workerdest=util.Interpolate("%(prop:basename)s.tar.gz")))
distlcov.addStep(steps.ShellCommand(name='Extract sources from dist', command=['tar', 'xvzf', util.Interpolate("%(prop:basename)s.tar.gz")], want_stdout=True, want_stderr=True))
distlcov.addStep(steps.MakeDirectory(name='Create a build folder', dir=util.Interpolate("build/%(prop:basename)s-build")))
distlcov.addStep(steps.Configure(name='Default configure (Out of tree)', command=[util.Interpolate("../%(prop:basename)s/configure"), '--prefix=/usr', '--disable-doxygen', '--enable-gcov', '--enable-debug' ], workdir=util.Interpolate("build/%(prop:basename)s-build"), want_stdout=True, want_stderr=True, logfiles={"config.log": "config.log"}))
distlcov.addStep(steps.Compile(name="Default make all (Out of tree)",command=["make", util.Interpolate("CFLAGS=-DBBID=\\\"%(prop:buildnumber)s\\\""), "all" ],workdir=util.Interpolate("build/%(prop:basename)s-build"), want_stdout=True, want_stderr=True))
distlcov.addStep(steps.Test(name="Default make check (Out of tree)",command=["make", util.Interpolate("CFLAGS=-DBBID=\\\"%(prop:buildnumber)s\\\""), "check" ],workdir=util.Interpolate("build/%(prop:basename)s-build"), want_stdout=True, want_stderr=True, haltOnFailure=True, logfiles={"testsuite.log": "test/testsuite.log"}, locks=[oomtest_lock.access('exclusive')]))
distlcov.addStep(steps.Compile(name="Default make lcov (Out of tree)",command=["make", util.Interpolate("CFLAGS=-DBBID=\\\"%(prop:buildnumber)s\\\""), "lcov" ],workdir=util.Interpolate("build/%(prop:basename)s-build"), want_stdout=True, want_stderr=True))
distlcov.addStep(steps.DirectoryUpload(name="LCov upload coverage tests report", workersrc=util.Interpolate("%(prop:basename)s-build/lcov"), masterdest=util.Interpolate("/var/www/packages.cerbelle.net/%(prop:package)s/%(prop:basename)s-dbg-lcov"), urlText="Coverage report (Debug)", url=util.Interpolate("https://packages.cerbelle.net/%(prop:package)s/%(prop:basename)s-dbg-lcov")))
distlcov.addStep(steps.Compile(name="Default make clean (Out of tree)",command=["make", util.Interpolate("CFLAGS=-DBBID=\\\"%(prop:buildnumber)s\\\""), "clean" ],workdir=util.Interpolate("build/%(prop:basename)s-build"), want_stdout=True, want_stderr=True))
distlcov.addStep(steps.Compile(name="Default make distclean (Out of tree)",command=["make", util.Interpolate("CFLAGS=-DBBID=\\\"%(prop:buildnumber)s\\\""), "distclean" ],workdir=util.Interpolate("build/%(prop:basename)s-build"), want_stdout=True, want_stderr=True))
c['builders'].append( util.BuilderConfig(
    project="mkernel",
    name="DistLCov",
    workernames=["bb-linux"],
    factory=distlcov))

dist-gprof

Pre-requisites: build-essential check pkg-config

Worker: bb-linux

Steps:
  1. Download TGZ
  2. ./configure --disable-doxygen --enable-gprof
  3. make all check clean distclean
distgprof = util.BuildFactory()
distgprof.addStep(steps.RemoveDirectory(name='Cleanup environment',dir="build"))
distgprof.addStep(steps.SetProperty(name="Compute basename", property="basename", value=util.Interpolate("%(prop:package)s-%(prop:version)s")))
distgprof.addStep(steps.FileDownload(name="Download sources",mastersrc=util.Interpolate("/var/www/packages.cerbelle.net/%(prop:package)s/%(prop:basename)s.tar.gz"),workerdest=util.Interpolate("%(prop:basename)s.tar.gz")))
distgprof.addStep(steps.ShellCommand(name='Extract sources from dist', command=['tar', 'xvzf', util.Interpolate("%(prop:basename)s.tar.gz")], want_stdout=True, want_stderr=True))
distgprof.addStep(steps.MakeDirectory(name='Create a build folder', dir=util.Interpolate("build/%(prop:basename)s-build")))
distgprof.addStep(steps.Configure(name='Default configure (Out of tree)', command=[util.Interpolate("../%(prop:basename)s/configure"), '--prefix=/usr', '--disable-doxygen', '--enable-gprof' ], workdir=util.Interpolate("build/%(prop:basename)s-build"), want_stdout=True, want_stderr=True, logfiles={"config.log": "config.log"}))
distgprof.addStep(steps.Compile(name="Default make all (Out of tree)",command=["make", util.Interpolate("CFLAGS=-DBBID=\\\"%(prop:buildnumber)s\\\""), "all" ],workdir=util.Interpolate("build/%(prop:basename)s-build"), want_stdout=True, want_stderr=True))
distgprof.addStep(steps.Test(name="Default make check (Out of tree)",command=["make", util.Interpolate("CFLAGS=-DBBID=\\\"%(prop:buildnumber)s\\\""), "check" ],workdir=util.Interpolate("build/%(prop:basename)s-build"), want_stdout=True, want_stderr=True, haltOnFailure=True, locks=[oomtest_lock.access('exclusive')]))
distgprof.addStep(steps.ShellCommand(name='Run unforked check_oom', command=['./check_oom'], workdir=util.Interpolate("build/%(prop:basename)s-build/test", env={'CK_FORK': 'no'}), want_stdout=True, want_stderr=True, locks=[oomtest_lock.access('exclusive')]))
distgprof.addStep(steps.Test(name="Profiling ./check_oom (Out of tree)",command=["../libtool", "--mode=execute", "gprof", "./check_oom" ], workdir=util.Interpolate("build/%(prop:basename)s-build/test"), want_stdout=True, want_stderr=True, haltOnFailure=True))
distgprof.addStep(steps.ShellCommand(name='Run unforked check_test', command=['./check_test'], workdir=util.Interpolate("build/%(prop:basename)s-build/test", env={'CK_FORK': 'no'}), want_stdout=True, want_stderr=True, locks=[oomtest_lock.access('exclusive')]))
distgprof.addStep(steps.Test(name="Profiling ./check_test (Out of tree)",command=["../libtool", "--mode=execute", "gprof", "./check_test" ], workdir=util.Interpolate("build/%(prop:basename)s-build/test"), want_stdout=True, want_stderr=True, haltOnFailure=True))
distgprof.addStep(steps.ShellCommand(name='Run unforked check_libdebug', command=['./check_libdebug'], workdir=util.Interpolate("build/%(prop:basename)s-build/test", env={'CK_FORK': 'no'}), want_stdout=True, want_stderr=True, locks=[oomtest_lock.access('exclusive')]))
distgprof.addStep(steps.Test(name="Profiling ./check_libdebug (Out of tree)",command=["../libtool", "--mode=execute", "gprof", "./check_libdebug" ], workdir=util.Interpolate("build/%(prop:basename)s-build/test"), want_stdout=True, want_stderr=True, haltOnFailure=True))
distgprof.addStep(steps.ShellCommand(name='Run unforked check_modmgr', command=['./check_modmgr'], workdir=util.Interpolate("build/%(prop:basename)s-build/test", env={'CK_FORK': 'no'}), want_stdout=True, want_stderr=True, locks=[oomtest_lock.access('exclusive')]))
distgprof.addStep(steps.Test(name="Profiling ./check_modmgr (Out of tree)",command=["../libtool", "--mode=execute", "gprof", "./check_modmgr" ], workdir=util.Interpolate("build/%(prop:basename)s-build/test"), want_stdout=True, want_stderr=True, haltOnFailure=True))
distgprof.addStep(steps.ShellCommand(name='Run unforked check_svcmgr', command=['./check_svcmgr'], workdir=util.Interpolate("build/%(prop:basename)s-build/test", env={'CK_FORK': 'no'}), want_stdout=True, want_stderr=True, locks=[oomtest_lock.access('exclusive')]))
distgprof.addStep(steps.Test(name="Profiling ./check_svcmgr (Out of tree)",command=["../libtool", "--mode=execute", "gprof", "./check_svcmgr" ], workdir=util.Interpolate("build/%(prop:basename)s-build/test"), want_stdout=True, want_stderr=True, haltOnFailure=True))
distgprof.addStep(steps.Compile(name="Default make clean (Out of tree)",command=["make", util.Interpolate("CFLAGS=-DBBID=\\\"%(prop:buildnumber)s\\\""), "clean" ],workdir=util.Interpolate("build/%(prop:basename)s-build"), want_stdout=True, want_stderr=True))
distgprof.addStep(steps.Compile(name="Default make distclean (Out of tree)",command=["make", util.Interpolate("CFLAGS=-DBBID=\\\"%(prop:buildnumber)s\\\""), "distclean" ],workdir=util.Interpolate("build/%(prop:basename)s-build"), want_stdout=True, want_stderr=True))
c['builders'].append( util.BuilderConfig(
    project="mkernel",
    name="DistGProf",
    workernames=["bb-linux"],
    factory=distgprof))

dist-gdb

Pre-requisites: build-essential check pkg-config

Worker: bb-linux

Steps:
  1. Download TGZ
  2. ./configure --disable-doxygen --enable-gdb
  3. make all check clean distclean
distgdb = util.BuildFactory()
distgdb.addStep(steps.RemoveDirectory(name='Cleanup environment',dir="build"))
distgdb.addStep(steps.SetProperty(name="Compute basename", property="basename", value=util.Interpolate("%(prop:package)s-%(prop:version)s")))
distgdb.addStep(steps.FileDownload(name="Download sources",mastersrc=util.Interpolate("/var/www/packages.cerbelle.net/%(prop:package)s/%(prop:basename)s.tar.gz"),workerdest=util.Interpolate("%(prop:basename)s.tar.gz")))
distgdb.addStep(steps.ShellCommand(name='Extract sources from dist', command=['tar', 'xvzf', util.Interpolate("%(prop:basename)s.tar.gz")], want_stdout=True, want_stderr=True))
distgdb.addStep(steps.MakeDirectory(name='Create a build folder', dir=util.Interpolate("build/%(prop:basename)s-build")))
distgdb.addStep(steps.Configure(name='Default configure (Out of tree)', command=[util.Interpolate("../%(prop:basename)s/configure"), '--prefix=/usr', '--disable-doxygen', '--enable-gdb' ], workdir=util.Interpolate("build/%(prop:basename)s-build"), want_stdout=True, want_stderr=True, logfiles={"config.log": "config.log"}))
distgdb.addStep(steps.Compile(name="Default make all (Out of tree)",command=["make", util.Interpolate("CFLAGS=-DBBID=\\\"%(prop:buildnumber)s\\\""), "all" ],workdir=util.Interpolate("build/%(prop:basename)s-build"), want_stdout=True, want_stderr=True))
distgdb.addStep(steps.Test(name="Default make check (Out of tree)",command=["make", util.Interpolate("CFLAGS=-DBBID=\\\"%(prop:buildnumber)s\\\""), "check" ],workdir=util.Interpolate("build/%(prop:basename)s-build"), want_stdout=True, want_stderr=True, haltOnFailure=True, logfiles={"testsuite.log": "test/testsuite.log"}, locks=[oomtest_lock.access('exclusive')]))
distgdb.addStep(steps.Compile(name="Default make clean (Out of tree)",command=["make", util.Interpolate("CFLAGS=-DBBID=\\\"%(prop:buildnumber)s\\\""), "clean" ],workdir=util.Interpolate("build/%(prop:basename)s-build"), want_stdout=True, want_stderr=True))
distgdb.addStep(steps.Compile(name="Default make distclean (Out of tree)",command=["make", util.Interpolate("CFLAGS=-DBBID=\\\"%(prop:buildnumber)s\\\""), "distclean" ],workdir=util.Interpolate("build/%(prop:basename)s-build"), want_stdout=True, want_stderr=True))
c['builders'].append( util.BuilderConfig(
    project="mkernel",
    name="DistGdb",
    workernames=["bb-linux"],
    factory=distgdb))

bin-linux

Pre-requisites: build-essential check pkg-config doxygen doxygen-latex fuse3

Worker: bb-linux

Steps:
  1. Download TGZ
  2. ./configure
  3. make all check
  4. make AppImage
  5. Upload AppImage
  6. make clean distclean
binlin = util.BuildFactory()
binlin.addStep(steps.RemoveDirectory(name='Cleanup environment',dir="build"))
binlin.addStep(steps.SetProperty(name="Compute basename", property="basename", value=util.Interpolate("%(prop:package)s-%(prop:version)s")))
binlin.addStep(steps.FileDownload(name="Download sources",mastersrc=util.Interpolate("/var/www/packages.cerbelle.net/%(prop:package)s/%(prop:basename)s.tar.gz"),workerdest=util.Interpolate("%(prop:basename)s.tar.gz")))
binlin.addStep(steps.ShellCommand(name='Extract sources from dist', command=['tar', 'xvzf', util.Interpolate("%(prop:basename)s.tar.gz")], want_stdout=True, want_stderr=True))
binlin.addStep(steps.MakeDirectory(name='Create a build folder', dir=util.Interpolate("build/%(prop:basename)s-build")))
binlin.addStep(steps.Configure(name='Default configure (Out of tree)', command=[util.Interpolate("../%(prop:basename)s/configure"), '--prefix=/usr' ], workdir=util.Interpolate("build/%(prop:basename)s-build"), want_stdout=True, want_stderr=True, logfiles={"config.log": "config.log"}))
binlin.addStep(steps.Compile(name="Default make all (Out of tree)",command=["make", util.Interpolate("CFLAGS=-DBBID=\\\"%(prop:buildnumber)s\\\""), "all" ],workdir=util.Interpolate("build/%(prop:basename)s-build"), want_stdout=True, want_stderr=True))
binlin.addStep(steps.Test(name="Default make check (Out of tree)",command=["make", util.Interpolate("CFLAGS=-DBBID=\\\"%(prop:buildnumber)s\\\""), "check" ],workdir=util.Interpolate("build/%(prop:basename)s-build"), want_stdout=True, want_stderr=True, haltOnFailure=True, logfiles={"testsuite.log": "test/testsuite.log"}, locks=[oomtest_lock.access('exclusive')]))
binlin.addStep(steps.Compile(name="Default make install (Out of tree, DESTDIR)",command=["make", util.Interpolate("CFLAGS=-DBBID=\\\"%(prop:buildnumber)s\\\""), util.Interpolate('DESTDIR=%(prop:builddir)s/build/%(prop:basename)s-linux'), "install" ],workdir=util.Interpolate("build/%(prop:basename)s-build"), want_stdout=True, want_stderr=True))
binlin.addStep(steps.ShellCommand(name='Default create the archive', command=['tar', 'cvzf', util.Interpolate('%(prop:basename)s-linux.tar.gz'), util.Interpolate('%(prop:basename)s-linux')], want_stdout=True, want_stderr=True))
binlin.addStep(steps.FileUpload(name="Upload linux binary", workersrc=util.Interpolate('%(prop:basename)s-linux.tar.gz'), masterdest=util.Interpolate('/var/www/packages.cerbelle.net/%(prop:package)s/%(prop:basename)s-linux.tar.gz'),mode=0o755,urlText="Linux binaries",url=util.Interpolate("https://packages.cerbelle.net/%(prop:package)s/%(prop:basename)s-linux.tar.gz")))
binlin.addStep(steps.ShellCommand(name="Get linuxdeploy for Appimages",command=["wget","https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage"], want_stdout=True, want_stderr=True))
binlin.addStep(steps.ShellCommand(name="Make linuxdeploy executable",command=["chmod","+x","linuxdeploy-x86_64.AppImage"], want_stdout=True, want_stderr=True))
binlin.addStep(steps.ShellCommand(name='Build AppImage', command=[ "./linuxdeploy-x86_64.AppImage","--appdir",util.Interpolate('%(prop:basename)s-linux'),"-e",util.Interpolate('%(prop:basename)s-linux/usr/bin/mkernel'),"-i",util.Interpolate("%(prop:basename)s/resources/mkernel.png"),"-d",util.Interpolate("%(prop:basename)s/resources/mkernel.desktop"),"--output","appimage" ], env={'LD_LIBRARY_PATH': util.Interpolate("%(prop:basename)s-linux/usr/lib/mkernel")}, want_stdout=True, want_stderr=True))
binlin.addStep(steps.FileUpload(name="Upload linux AppImage", workersrc="MKernel-x86_64.AppImage", masterdest=util.Interpolate('/var/www/packages.cerbelle.net/%(prop:package)s/MKernel-x86_64.AppImage'),mode=0o755,urlText="Linux AppImage",url=util.Interpolate("https://packages.cerbelle.net/%(prop:package)s/MKernel-x86_64.AppImage")))
binlin.addStep(steps.Compile(name="Default make distclean (Out of tree)",command=["make", util.Interpolate("CFLAGS=-DBBID=\\\"%(prop:buildnumber)s\\\""), "distclean" ],workdir=util.Interpolate("build/%(prop:basename)s-build"), want_stdout=True, want_stderr=True))
c['builders'].append( util.BuilderConfig(
    project="mkernel",
    name="BinLinux",
    workernames=["bb-linux"],
    factory=binlin))

bin-windows

Pre-requisites: see Cross_compilation_on_Debian_for_Windows

Worker: bb-mingw

Steps:
  1. Download TGZ
  2. ./configure --host=
  3. make all install
  4. Create a zip
  5. Upload ZIP
  6. make windows
  7. Upload installer.exe
  8. make clean distclean
binwin = util.BuildFactory()
binwin.addStep(steps.RemoveDirectory(name='Cleanup environment',dir="build"))
binwin.addStep(steps.SetProperty(name="Compute basename", property="basename", value=util.Interpolate("%(prop:package)s-%(prop:version)s")))
binwin.addStep(steps.FileDownload(name="Download sources",mastersrc=util.Interpolate("/var/www/packages.cerbelle.net/%(prop:package)s/%(prop:basename)s.tar.gz"),workerdest=util.Interpolate("%(prop:basename)s.tar.gz")))
binwin.addStep(steps.ShellCommand(name='Extract sources from dist', command=['tar', 'xvzf', util.Interpolate("%(prop:basename)s.tar.gz")], want_stdout=True, want_stderr=True))
binwin.addStep(steps.MakeDirectory(name='Create a build folder', dir=util.Interpolate("build/%(prop:basename)s-build")))
binwin.addStep(steps.Configure(name='Default configure (Out of tree)', command=[util.Interpolate("../%(prop:basename)s/configure"), '--prefix=/usr', '--host=x86_64-w64-mingw32', 'ac_cv_func_malloc_0_nonnull=yes','ac_cv_func_realloc_0_nonnull=yes' ], workdir=util.Interpolate("build/%(prop:basename)s-build"), want_stdout=True, want_stderr=True, logfiles={"config.log": "config.log"}))
binwin.addStep(steps.Compile(name="Default make all (Out of tree)",command=["make", util.Interpolate("CFLAGS=-DBBID=\\\"%(prop:buildnumber)s\\\""), "all" ],workdir=util.Interpolate("build/%(prop:basename)s-build"), want_stdout=True, want_stderr=True))
binwin.addStep(steps.Compile(name="Default make install (Out of tree, DESTDIR)",command=["make", util.Interpolate("CFLAGS=-DBBID=\\\"%(prop:buildnumber)s\\\""), util.Interpolate('DESTDIR=%(prop:builddir)s/build/%(prop:basename)s-win64'), "install" ], workdir=util.Interpolate("build/%(prop:basename)s-build"), want_stdout=True, want_stderr=True))
binwin.addStep(steps.ShellCommand(name='Create the archive', command=['zip', '-r', util.Interpolate('%(prop:basename)s-win64.zip'), util.Interpolate('%(prop:basename)s-win64')], want_stdout=True, want_stderr=True))
binwin.addStep(steps.FileUpload(name="Upload windows binary archive", workersrc=util.Interpolate('%(prop:basename)s-win64.zip'), masterdest=util.Interpolate('/var/www/packages.cerbelle.net/%(prop:package)s/%(prop:basename)s-win64.zip'),mode=0o755,urlText="Win64 binaries",url=util.Interpolate("https://packages.cerbelle.net/%(prop:package)s/%(prop:basename)s-win64.zip")))
binwin.addStep(steps.Compile(name="Create installer", command=['make', util.Interpolate("CFLAGS=-DBBID=\\\"%(prop:buildnumber)s\\\""), 'windows', util.Interpolate('DESTDIR=%(prop:builddir)s/build/%(prop:basename)s-win64')], workdir=util.Interpolate("build/%(prop:basename)s-build"), want_stdout=True, want_stderr=True))
binwin.addStep(steps.FileUpload(workersrc=util.Interpolate("%(prop:basename)s-build/mkernel-installer.exe"), masterdest=util.Interpolate("/var/www/packages.cerbelle.net/%(prop:package)s/mkernel-installer.exe"),mode=0o755,urlText="Windows installer",url=util.Interpolate("https://packages.cerbelle.net/%(prop:package)s/mkernel-installer.exe")))
c['builders'].append( util.BuilderConfig(
    name="BinWindows",
    workernames=["bb-mingw"],
    factory=binwin))

bin-deb

Pre-requisites: pbuilder

Worker: bb-debian

Steps: #

bindeb = util.BuildFactory()
bindeb.addStep(steps.RemoveDirectory(name='Cleanup environment',dir="build"))
bindeb.addStep(steps.SetProperty(name="Compute basename", property="basename", value=util.Interpolate("%(prop:package)s-%(prop:version)s")))
bindeb.addStep(steps.FileDownload(name="Download sources", mastersrc=util.Interpolate("/var/www/packages.cerbelle.net/%(prop:package)s/%(prop:basename)s.tar.gz"),workerdest=util.Interpolate("%(prop:basename)s.tar.gz")))
bindeb.addStep(steps.ShellCommand(name='Extract sources from dist', command=['tar', 'xvzf', util.Interpolate("%(prop:basename)s.tar.gz")], want_stdout=True, want_stderr=True))
bindeb.addStep(steps.ShellCommand(name='Rename src dist file', command=['mv', util.Interpolate("%(prop:basename)s.tar.gz"), util.Interpolate("%(prop:package)s_%(prop:version)s.orig.tar.gz")], want_stdout=True, want_stderr=True))
bindeb.addStep(steps.ShellCommand(name='Add Build ID to revision.h', command=['sed', '-i', util.Interpolate("s/$/\\n#define BBID \\\"%(prop:buildnumber)s\\\"\\n/"), util.Interpolate("%(prop:basename)s/src/revision.h")], want_stdout=True, want_stderr=True))
bindeb.addStep(steps.ShellCommand(name='Commit sources changes', env={'EDITOR':'/bin/true'}, command=['dpkg-source', '--commit', './', 'build'], workdir=util.Interpolate("build/%(prop:basename)s"), want_stdout=True, want_stderr=True))
bindeb.addStep(steps.DebPbuilder(architecture="amd64",distribution="bookworm",workdir=util.Interpolate("build/%(prop:basename)s"), want_stdout=True, want_stderr=True))
bindeb.addStep(steps.ShellCommand(name='Upload to cerbelle repo', command=['dput', util.Interpolate("%(prop:basename)s/%(prop:package)s_%(prop:version)s-1.1_amd64.changes")], want_stdout=True, want_stderr=True))
c['builders'].append( util.BuilderConfig(
    name="BinDebian",
    workernames=["bb-deb"],
    factory=bindeb))

bin-macos

Pre-requisites: see CrossCompilationMacOS

Worker: bb-macos

Steps: #

macbin = util.BuildFactory()
macbin.addStep(steps.SetProperty(name="Compute basename", property="basename", value=util.Interpolate("%(prop:package)s-%(prop:version)s")))
macbin.addStep(steps.ShellCommand(name='Cleanup environment', command=['rm', '-Rf', util.Interpolate('%(prop:builddir)s/build')]))
macbin.addStep(steps.FileDownload(name="Download sources",mastersrc=util.Interpolate("/var/www/packages.cerbelle.net/%(prop:package)s/%(prop:basename)s.tar.gz"),workerdest=util.Interpolate("%(prop:basename)s.tar.gz")))
macbin.addStep(steps.ShellCommand(name='Extract sources from dist', command=['tar', 'xvzf', util.Interpolate("%(prop:basename)s.tar.gz")]))
macbin.addStep(steps.ShellCommand(name='Create a build folder', command=['mkdir', util.Interpolate("%(prop:basename)s-build")]))
macbin.addStep(steps.ShellCommand(name='Out of tree default configuration', command=[util.Interpolate("../%(prop:basename)s/configure"), '--prefix=/usr' ], workdir=util.Interpolate("build/%(prop:basename)s-build")))
macbin.addStep(steps.Compile(name="Compile and Install", command=['make', util.Interpolate("CFLAGS=-DBBID=\\\"%(prop:buildnumber)s\\\""), 'clean', 'all', 'install', util.Interpolate('CFLAGS=-I%(prop:builddir)s/build/%(prop:basename)s-build/intl'), util.Interpolate('DESTDIR=%(prop:builddir)s/build/%(prop:basename)s-macos')], workdir=util.Interpolate("build/%(prop:basename)s-build")))
macbin.addStep(steps.ShellCommand(name='Create the archive', command=['tar', 'cvzf', util.Interpolate('%(prop:basename)s-macos.tar.gz'), util.Interpolate('%(prop:basename)s-macos')]))
macbin.addStep(steps.FileUpload(workersrc=util.Interpolate('%(prop:basename)s-macos.tar.gz'), masterdest=util.Interpolate('/var/www/packages.cerbelle.net/%(prop:package)s/%(prop:basename)s-macos.tar.gz'),mode=0o755,urlText="MacOS binaries",url=util.Interpolate("https://packages.cerbelle.net/%(prop:package)s/%(prop:basename)s-macos.tar.gz")))
c['builders'].append( util.BuilderConfig(
    name="BinMacOS",
    workernames=["macos-monterey"],
    factory=macbin))

Schedulers

ForceSrc

To force from repository builders

mk_forcesrc=schedulers.ForceScheduler(
    name="ForceSrc",
    buttonName="Force src",
    label="Force parameters",
    codebases=[util.CodebaseParameter(
        "",
        label="Main repository",
        branch=util.FixedParameter(name="branch", default="default"),
        revision=util.FixedParameter(name="revision", default=""),
        repository=util.FixedParameter(name="repository", default=""),
        project=util.FixedParameter(name="project", default="mkernel"),
    ),],
    reason=util.StringParameter(name="reason",
        label="Reason:", required=True, size=80),
    username=util.UserNameParameter(label="Your name (and email):",
        size=80),
    builderNames=["Src", "SrcCppcheck", "SrcDist", "SrcInst", "SrcDbg", "SrcGprof", "SrcDbgGcov", "SrcGdb", "SrcGcov" ],
)
c['schedulers'].append(mk_forcesrc)

ForceBin

Force package build from source

mk_forcebin=schedulers.ForceScheduler(
    name="ForceBin",
    buttonName="Force bin",
    label="Force parameters",
    codebases=[util.CodebaseParameter(
        "",
        label="Main repository",
        branch=util.FixedParameter(name="branch", default="default"),
        revision=util.FixedParameter(name="revision", default=""),
        repository=util.FixedParameter(name="repository", default=""),
        project=util.FixedParameter(name="project", default="mkernel"),
    ),],
    reason=util.StringParameter(name="reason",
        label="Reason:", required=True, size=80),
    username=util.UserNameParameter(label="Your name (and email):",
        size=80),
    properties=[
        util.StringParameter(name="package", label="Package name.", default="mkernel"),
        util.ChoiceStringParameter(name="version", label="Source version.", choices=["0.0.1","0.0.2"],default="0.0.1"),
    ],
    builderNames=["BinLinux","BinDebian","BinWindows", "DistDox", "DistLCov", "DistGProf", "DistGdb" ]
)
c['schedulers'].append(mk_forcebin)

Try

For developers to submit a try

mk_try = schedulers.Try_Jobdir(
    name="Try",
    builderNames=["Src", "SrcCppcheck", "SrcDist", "SrcInst", "SrcDbg", "SrcGprof", "SrcDbgGcov", "SrcGdb", "SrcGcov" ],
    jobdir="/var/lib/buildbot/jobdir")
c['schedulers'].append(mk_try)

Auto build from repo commit

mk_oncommit=schedulers.SingleBranchScheduler(
    name="On commit",
    change_filter=util.ChangeFilter(branch='default'),
    treeStableTimer=None,
    builderNames=["Src", "SrcCppcheck", "SrcDist", "SrcInst", "SrcDbg", "SrcGprof", "SrcDbgGcov", "SrcGdb", "SrcGcov" ],
    )
c['schedulers'].append(mk_oncommit)

Triggerable

Trigger packages builds after dist build

mkernel_triggerable=schedulers.Triggerable(
    name="MKernel_Triggerable",
    builderNames=[ "BinLinux", "BinDebian", "BinWindows", "BinMacOS", "DistDox", "DistLCov", "DistGProf", "DistGdb" ]
)
c['schedulers'].append(mkernel_triggerable)

Also available in: PDF HTML TXT