diff --git a/config/__init__.py b/config/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/config/__pycache__/__init__.cpython-36.pyc b/config/__pycache__/__init__.cpython-36.pyc new file mode 100644 index 0000000..0155a51 Binary files /dev/null and b/config/__pycache__/__init__.cpython-36.pyc differ diff --git a/config/__pycache__/change_sources.cpython-36.pyc b/config/__pycache__/change_sources.cpython-36.pyc new file mode 100644 index 0000000..75be9ee Binary files /dev/null and b/config/__pycache__/change_sources.cpython-36.pyc differ diff --git a/config/__pycache__/schedulers.cpython-36.pyc b/config/__pycache__/schedulers.cpython-36.pyc new file mode 100644 index 0000000..9af26d3 Binary files /dev/null and b/config/__pycache__/schedulers.cpython-36.pyc differ diff --git a/config/__pycache__/workers.cpython-36.pyc b/config/__pycache__/workers.cpython-36.pyc new file mode 100644 index 0000000..5be240d Binary files /dev/null and b/config/__pycache__/workers.cpython-36.pyc differ diff --git a/config/builders/__init__.py b/config/builders/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/config/builders/__pycache__/__init__.cpython-36.pyc b/config/builders/__pycache__/__init__.cpython-36.pyc new file mode 100644 index 0000000..2a1fccc Binary files /dev/null and b/config/builders/__pycache__/__init__.cpython-36.pyc differ diff --git a/config/builders/__pycache__/ads1115.cpython-36.pyc b/config/builders/__pycache__/ads1115.cpython-36.pyc new file mode 100644 index 0000000..4c92dd5 Binary files /dev/null and b/config/builders/__pycache__/ads1115.cpython-36.pyc differ diff --git a/config/builders/__pycache__/bicycle_statistics.cpython-36.pyc b/config/builders/__pycache__/bicycle_statistics.cpython-36.pyc new file mode 100644 index 0000000..615696a Binary files /dev/null and b/config/builders/__pycache__/bicycle_statistics.cpython-36.pyc differ diff --git a/config/builders/__pycache__/gpio_ftdi.cpython-36.pyc b/config/builders/__pycache__/gpio_ftdi.cpython-36.pyc new file mode 100644 index 0000000..60d1fe0 Binary files /dev/null and b/config/builders/__pycache__/gpio_ftdi.cpython-36.pyc differ diff --git a/config/builders/__pycache__/gpio_sys.cpython-36.pyc b/config/builders/__pycache__/gpio_sys.cpython-36.pyc new file mode 100644 index 0000000..2040393 Binary files /dev/null and b/config/builders/__pycache__/gpio_sys.cpython-36.pyc differ diff --git a/config/builders/__pycache__/i2c_bb.cpython-36.pyc b/config/builders/__pycache__/i2c_bb.cpython-36.pyc new file mode 100644 index 0000000..6edd5a3 Binary files /dev/null and b/config/builders/__pycache__/i2c_bb.cpython-36.pyc differ diff --git a/config/builders/__pycache__/test_c.cpython-36.pyc b/config/builders/__pycache__/test_c.cpython-36.pyc new file mode 100644 index 0000000..a4087e6 Binary files /dev/null and b/config/builders/__pycache__/test_c.cpython-36.pyc differ diff --git a/config/builders/__pycache__/voltage_app.cpython-36.pyc b/config/builders/__pycache__/voltage_app.cpython-36.pyc new file mode 100644 index 0000000..0f485b7 Binary files /dev/null and b/config/builders/__pycache__/voltage_app.cpython-36.pyc differ diff --git a/config/builders/ads1115.py b/config/builders/ads1115.py new file mode 100644 index 0000000..4f260cc --- /dev/null +++ b/config/builders/ads1115.py @@ -0,0 +1,24 @@ +from buildbot.plugins import steps, util + +factory = util.BuildFactory() + +# dependencies +factory.addStep(steps.ShellCommand(command=['git', 'clone', '--branch', 'master', + 'https://git.blackfinn.de/adc_gpio_i2c/i2c_bb.git'])) +factory.addStep(steps.ShellCommand(command=['make', '-C', 'i2c_bb', 'install', '-j8', 'PREFIX=/worker'])) + +# DUT +factory.addStep(steps.ShellCommand(command=['git', 'clone', '--branch', 'master', + 'https://git.blackfinn.de/adc_gpio_i2c/ads1115.git'])) +factory.addStep(steps.ShellCommand(command=['make', '-C', 'ads1115', 'check', '-j8'])) +factory.addStep(steps.ShellCommand(command=['make', '-C', 'ads1115', 'all', '-j8', 'EXTRA_INC=/worker/include'])) +factory.addStep(steps.ShellCommand(command=['make', '-C', 'ads1115', 'exec_unit_test', '-j8', 'EXTRA_INC=/worker/include'])) +factory.addStep(steps.ShellCommand(command='make -C ads1115 clean && make -C ads1115 coverage -j8 EXTRA_INC=/worker/include')) + +builder = util.BuilderConfig(name='ads1115', workernames=["buildbot-cpp-worker"], + factory=factory) + +def append(builders): + builders.append(builder) + return builders + diff --git a/config/builders/bicycle_statistics.py b/config/builders/bicycle_statistics.py new file mode 100644 index 0000000..31b92b1 --- /dev/null +++ b/config/builders/bicycle_statistics.py @@ -0,0 +1,19 @@ +from buildbot.plugins import steps, util + +factory = util.BuildFactory() +factory.addStep(steps.ShellCommand(command=['git', 'clone', '--branch', 'master', + 'https://git.blackfinn.de/docker/bicycle-statistics.git'])) +factory.addStep(steps.ShellCommand(command=['docker', 'build', '--no-cache', '-t', 'bicycle-statistics', + './bicycle-statistics'])) +factory.addStep(steps.ShellCommand(command=['docker', 'rm', '-f', 'bicycle-statistics'])) +factory.addStep(steps.ShellCommand(command=['docker', 'run', '-d', '-v', '/srv/nextcloud/data/tkl/files/Bicycle:/bs_in', + '-v', '/srv/bicycle.blackfinn.de/data:/bs_out', '--name', + 'bicycle-statistics', '--restart', 'always', 'bicycle-statistics'])) + +builder = util.BuilderConfig(name='bicycle_statistics', workernames=["buildbot-cpp-worker"], + factory=factory) + +def append(builders): + builders.append(builder) + return builders + diff --git a/config/builders/gpio_ftdi.py b/config/builders/gpio_ftdi.py new file mode 100644 index 0000000..4aa2068 --- /dev/null +++ b/config/builders/gpio_ftdi.py @@ -0,0 +1,18 @@ +from buildbot.plugins import steps, util + +factory = util.BuildFactory() +factory.addStep(steps.Git(repourl='https://git.blackfinn.de/adc_gpio_i2c/gpio_ftdi.git', mode='full')) +factory.addStep(steps.ShellCommand(command=['make', 'check', '-j8'])) +factory.addStep(steps.Compile(command=['make', 'all', '-j8'])) +factory.addStep(steps.ShellCommand(command=['make', 'build_unit_test', '-j8'])) +factory.addStep(steps.ShellCommand(command=['make', 'exec_unit_test'])) +factory.addStep(steps.ShellCommand(command='make clean && make coverage')) + + +builder = util.BuilderConfig(name='gpio_ftdi', workernames=["buildbot-cpp-worker"], + factory=factory) + +def append(builders): + builders.append(builder) + return builders + diff --git a/config/builders/gpio_sys.py b/config/builders/gpio_sys.py new file mode 100644 index 0000000..d643158 --- /dev/null +++ b/config/builders/gpio_sys.py @@ -0,0 +1,17 @@ +from buildbot.plugins import steps, util + +factory = util.BuildFactory() +factory.addStep(steps.Git(repourl='https://git.blackfinn.de/adc_gpio_i2c/gpio_sys.git', mode='full')) +factory.addStep(steps.ShellCommand(command=['make', 'check', '-j8'])) +factory.addStep(steps.Compile(command=['make', 'all', '-j8'])) +factory.addStep(steps.ShellCommand(command=['make', 'build_unit_test', '-j8'])) +factory.addStep(steps.ShellCommand(command=['make', 'exec_unit_test'])) +factory.addStep(steps.ShellCommand(command='make clean && make coverage')) + +builder = util.BuilderConfig(name='gpio_sys', workernames=["buildbot-cpp-worker"], + factory=factory) + +def append(builders): + builders.append(builder) + return builders + diff --git a/config/builders/i2c_bb.py b/config/builders/i2c_bb.py new file mode 100644 index 0000000..6875a96 --- /dev/null +++ b/config/builders/i2c_bb.py @@ -0,0 +1,17 @@ +from buildbot.plugins import steps, util + +factory = util.BuildFactory() +factory.addStep(steps.ShellCommand(command=['git', 'clone', '--branch', 'master', + 'https://git.blackfinn.de/adc_gpio_i2c/i2c_bb.git'])) +factory.addStep(steps.ShellCommand(command=['make', '-C', 'i2c_bb', 'check', '-j8'])) +factory.addStep(steps.ShellCommand(command=['make', '-C', 'i2c_bb', 'all', '-j8', 'EXTRA_INC=/worker/include'])) +factory.addStep(steps.ShellCommand(command=['make', '-C', 'i2c_bb', 'exec_unit_test', '-j8', 'EXTRA_INC=/worker/include'])) +factory.addStep(steps.ShellCommand(command='make -C i2c_bb clean && make -C i2c_bb coverage -j8 EXTRA_INC=/worker/include')) + +builder = util.BuilderConfig(name='i2c_bb', workernames=["buildbot-cpp-worker"], + factory=factory) + +def append(builders): + builders.append(builder) + return builders + diff --git a/config/builders/test_c.py b/config/builders/test_c.py new file mode 100644 index 0000000..4b5c908 --- /dev/null +++ b/config/builders/test_c.py @@ -0,0 +1,17 @@ +from buildbot.plugins import steps, util + +factory = util.BuildFactory() +factory.addStep(steps.Git(repourl='https://git.blackfinn.de/tkl/test.c.git', mode='full')) +factory.addStep(steps.ShellCommand(command=['make', 'check', '-j8'])) +factory.addStep(steps.Compile(command=['make', 'all', '-j8'])) +factory.addStep(steps.ShellCommand(command=['make', 'build_unit_test', '-j8'])) +factory.addStep(steps.ShellCommand(command=['make', 'exec_unit_test'])) +factory.addStep(steps.ShellCommand(command='make clean && make coverage')) + +builder = util.BuilderConfig(name='test.c', workernames=["buildbot-cpp-worker"], + factory=factory) + +def append(builders): + builders.append(builder) + return builders + diff --git a/config/builders/voltage_app.py b/config/builders/voltage_app.py new file mode 100644 index 0000000..5a8ca02 --- /dev/null +++ b/config/builders/voltage_app.py @@ -0,0 +1,29 @@ +from buildbot.plugins import steps, util + +factory = util.BuildFactory() + +# dependencies +factory.addStep(steps.ShellCommand(command=['git', 'clone', '--branch', 'master', + 'https://git.blackfinn.de/adc_gpio_i2c/i2c_bb.git'])) +factory.addStep(steps.ShellCommand(command=['make', '-C', 'i2c_bb', 'install', '-j8', 'PREFIX=/worker'])) +factory.addStep(steps.ShellCommand(command=['git', 'clone', '--branch', 'master', + 'https://git.blackfinn.de/adc_gpio_i2c/ads1115.git'])) +factory.addStep(steps.ShellCommand(command=['make', '-C', 'ads1115', 'install', '-j8', 'PREFIX=/worker'])) + +# DUT +factory.addStep(steps.ShellCommand(command=['git', 'clone', '--branch', 'master', + 'https://git.blackfinn.de/adc_gpio_i2c/voltage_app.git'])) +factory.addStep(steps.ShellCommand(command=['make', '-C', 'voltage_app', 'check', '-j8'])) +factory.addStep(steps.ShellCommand(command=['make', '-C', 'voltage_app', 'all', '-j8', + 'EXTRA_INC=/worker/include', 'EXTRA_LIB_DIR=/worker/lib'])) +#factory.addStep(steps.ShellCommand(command=['make', '-C', 'voltage_app', 'build_unit_test', '-j8'])) +#factory.addStep(steps.ShellCommand(command=['make', '-C', 'voltage_app', 'exec_unit_test'])) +#factory.addStep(steps.ShellCommand(command='make -C voltage_app clean && make -C voltage_app coverage')) + +builder = util.BuilderConfig(name='voltage_app', workernames=["buildbot-cpp-worker"], + factory=factory) + +def append(builders): + builders.append(builder) + return builders + diff --git a/config/change_sources.py b/config/change_sources.py new file mode 100644 index 0000000..d278b3a --- /dev/null +++ b/config/change_sources.py @@ -0,0 +1,49 @@ +from buildbot.plugins import changes + +cs_test_c = changes.GitPoller(project='test.c', + repourl='https://git.blackfinn.de/tkl/test.c.git', + branches=True, pollInterval=300) + +## gpio_ftdi +cs_gpio_ftdi = changes.GitPoller(project='gpio_ftdi', + repourl='https://git.blackfinn.de/adc_gpio_i2c/gpio_ftdi.git', + branches=True, pollInterval=60) +## gpio_sys +cs_gpio_sys = changes.GitPoller(project='gpio_sys', + repourl='https://git.blackfinn.de/adc_gpio_i2c/gpio_sys.git', + branches=True, pollInterval=60) +## i2c_bb +cs_i2c_bb = changes.GitPoller(project='i2c_bb', + repourl='https://git.blackfinn.de/adc_gpio_i2c/i2c_bb.git', + branches=True, pollInterval=60) + +## ads1115 +cs_ads1115 = changes.GitPoller(project='ads1115', + repourl='https://git.blackfinn.de/adc_gpio_i2c/ads1115.git', + branches=True, pollInterval=60) + +## voltage_app +cs_voltage_app = changes.GitPoller(project='voltage_app', + repourl='https://git.blackfinn.de/adc_gpio_i2c/voltage_app.git', + branches=True, pollInterval=60) + +## bicycle-statistics +cs_bicycle_python = changes.GitPoller(project='bicycle-statistics-python', + repourl='https://git.blackfinn.de/python/bicycle-statistics.git', + branches=True, pollInterval=60) +cs_bicycle_docker = changes.GitPoller(project='bicycle-statistics-docker', + repourl='https://git.blackfinn.de/docker/bicycle-statistics.git', + branches=True, pollInterval=60) + + +def append(change_sources): + change_sources.append(cs_test_c) + change_sources.append(cs_gpio_ftdi) + change_sources.append(cs_gpio_sys) + change_sources.append(cs_i2c_bb) + change_sources.append(cs_ads1115) + change_sources.append(cs_voltage_app) + change_sources.append(cs_bicycle_python) + change_sources.append(cs_bicycle_docker) + return change_sources + diff --git a/config/schedulers.py b/config/schedulers.py new file mode 100644 index 0000000..1e4e472 --- /dev/null +++ b/config/schedulers.py @@ -0,0 +1,63 @@ +from buildbot.plugins import schedulers, util + +sched_a1 = schedulers.SingleBranchScheduler(name="test_c", + change_filter=util.ChangeFilter(project='test.c'), + treeStableTimer=None, builderNames=["test.c"]) +sched_a2 = schedulers.ForceScheduler(name="force_test_c", builderNames=["test.c"]) + +sched_b1 = schedulers.SingleBranchScheduler(name="gpio_ftdi", + change_filter=util.ChangeFilter(project='gpio_ftdi'), + treeStableTimer=None, builderNames=["gpio_ftdi"]) + +sched_b2 = schedulers.ForceScheduler(name="force_gpio_ftdi", builderNames=["gpio_ftdi"]) + +sched_c1 = schedulers.SingleBranchScheduler(name="gpio_sys", + change_filter=util.ChangeFilter(project='gpio_sys'), + treeStableTimer=None, builderNames=["gpio_sys"]) +sched_c2 = schedulers.ForceScheduler(name="force_gpio_sys", builderNames=["gpio_sys"]) + +sched_d1 = schedulers.SingleBranchScheduler(name="i2c_bb", + change_filter=util.ChangeFilter(project='i2c_bb'), + treeStableTimer=None, builderNames=["i2c_bb"]) + +sched_d2 = schedulers.ForceScheduler(name="force_i2c_bb", builderNames=["i2c_bb"]) + +sched_e1 = schedulers.SingleBranchScheduler(name="ads1115", + change_filter=util.ChangeFilter(project=['i2c_bb', 'ads1115']), + treeStableTimer=None, builderNames=["ads1115"]) + +sched_e2 = schedulers.ForceScheduler(name="force_ads1115", builderNames=["ads1115"]) + +sched_f1 = schedulers.SingleBranchScheduler(name="voltage_app", + change_filter=util.ChangeFilter(project=['voltage_app', + 'ads1115', + 'i2c_bb']), + treeStableTimer=None, builderNames=["voltage_app"]) + +sched_f2 = schedulers.ForceScheduler(name="force_voltage_app", builderNames=["voltage_app"]) + +sched_g1 = schedulers.SingleBranchScheduler(name="bicycle_statistics", + change_filter=util.ChangeFilter(project=['bicycle-statistics-python', + 'bicycle-statistics-docker']), + treeStableTimer=None, builderNames=["bicycle_statistics"]) + +sched_g2 = schedulers.ForceScheduler(name="force_bicycle-statistics", builderNames=["bicycle_statistics"]) + + +def append(schedulers): + schedulers.append(sched_a1) + schedulers.append(sched_a2) + schedulers.append(sched_b1) + schedulers.append(sched_b2) + schedulers.append(sched_c1) + schedulers.append(sched_c2) + schedulers.append(sched_d1) + schedulers.append(sched_d2) + schedulers.append(sched_e1) + schedulers.append(sched_e2) + schedulers.append(sched_f1) + schedulers.append(sched_f2) + schedulers.append(sched_g1) + schedulers.append(sched_g2) + return schedulers + diff --git a/config/workers.py b/config/workers.py new file mode 100644 index 0000000..8dc4b58 --- /dev/null +++ b/config/workers.py @@ -0,0 +1,16 @@ +from buildbot.plugins import worker + +cpp_worker = worker.DockerLatentWorker('buildbot-cpp-worker', 'pass', + docker_host='tcp://192.168.178.39:2375', + image='buildbot-cpp-worker') + +docker_worker = worker.DockerLatentWorker('buildbot-docker-worker', 'pass', + docker_host='tcp://192.168.178.39:2375', + image='buildbot-docker-worker', + volumes=['/var/run/docker.sock:/var/run/docker.sock']) + +def append(workers): + workers.append(cpp_worker) + workers.append(docker_worker) + return workers + diff --git a/master.cfg b/master.cfg index f75bd53..7b2c862 100644 --- a/master.cfg +++ b/master.cfg @@ -3,199 +3,39 @@ from buildbot.plugins import * +import config.workers +import config.change_sources +import config.schedulers +import config.builders.test_c +import config.builders.gpio_ftdi +import config.builders.gpio_sys +import config.builders.i2c_bb +import config.builders.ads1115 +import config.builders.voltage_app +import config.builders.bicycle_statistics + c = BuildmasterConfig = {} -####### WORKERS c['workers'] = [] -c['workers'].append(worker.DockerLatentWorker('buildbot-cpp-worker', 'pass', - docker_host='tcp://192.168.178.39:2375', - image='buildbot-cpp-worker')) -c['workers'].append(worker.DockerLatentWorker('buildbot-docker-worker', 'pass', - docker_host='tcp://192.168.178.39:2375', - image='buildbot-docker-worker', - volumes=['/var/run/docker.sock:/var/run/docker.sock'])) +c['workers'] = config.workers.append(c['workers']) -# 'protocols' contains information about protocols which master will use for -# communicating with workers. You must define at least 'port' option that workers -# could connect to your master with this protocol. -# 'port' must match the value configured into the workers (with their -# --master option) c['protocols'] = {'pb': {'port': 9989}} -####### CHANGESOURCES c['change_source'] = [] +c['change_source'] = config.change_sources.append(c['change_source']) -## test.c -c['change_source'].append(changes.GitPoller(project='test.c', - repourl='https://git.blackfinn.de/tkl/test.c.git', - branches=True, pollInterval=300)) - -## gpio_ftdi -c['change_source'].append(changes.GitPoller(project='gpio_ftdi', - repourl='https://git.blackfinn.de/adc_gpio_i2c/gpio_ftdi.git', - branches=True, pollInterval=60)) -## gpio_sys -c['change_source'].append(changes.GitPoller(project='gpio_sys', - repourl='https://git.blackfinn.de/adc_gpio_i2c/gpio_sys.git', - branches=True, pollInterval=60)) -## i2c_bb -c['change_source'].append(changes.GitPoller(project='i2c_bb', - repourl='https://git.blackfinn.de/adc_gpio_i2c/i2c_bb.git', - branches=True, pollInterval=60)) - -## ads1115 -c['change_source'].append(changes.GitPoller(project='ads1115', - repourl='https://git.blackfinn.de/adc_gpio_i2c/ads1115.git', - branches=True, pollInterval=60)) - -## voltage_app -c['change_source'].append(changes.GitPoller(project='voltage_app', - repourl='https://git.blackfinn.de/adc_gpio_i2c/voltage_app.git', - branches=True, pollInterval=60)) - -## bicycle-statistics python -c['change_source'].append(changes.GitPoller(project='bicycle-statistics-python', - repourl='https://git.blackfinn.de/python/bicycle-statistics.git', - branches=True, pollInterval=60)) - -## bicycle-statistics docker -c['change_source'].append(changes.GitPoller(project='bicycle-statistics-docker', - repourl='https://git.blackfinn.de/docker/bicycle-statistics.git', - branches=True, pollInterval=60)) - -####### SCHEDULERS c['schedulers'] = [] +c['schedulers'] = config.schedulers.append(c['schedulers']) -## test.c -c['schedulers'].append(schedulers.SingleBranchScheduler(name="test_c", - change_filter=util.ChangeFilter(project='test.c'), - treeStableTimer=None, builderNames=["test.c"])) -c['schedulers'].append(schedulers.ForceScheduler(name="force_test_c", builderNames=["test.c"])) - -## gpio_ftdi -c['schedulers'].append(schedulers.SingleBranchScheduler(name="gpio_ftdi", - change_filter=util.ChangeFilter(project='gpio_ftdi'), - treeStableTimer=None, builderNames=["gpio_ftdi"])) -c['schedulers'].append(schedulers.ForceScheduler(name="force_gpio_ftdi", builderNames=["gpio_ftdi"])) - -## gpio_sys -c['schedulers'].append(schedulers.SingleBranchScheduler(name="gpio_sys", - change_filter=util.ChangeFilter(project='gpio_sys'), - treeStableTimer=None, builderNames=["gpio_sys"])) -c['schedulers'].append(schedulers.ForceScheduler(name="force_gpio_sys", builderNames=["gpio_sys"])) - -## i2c_bb -c['schedulers'].append(schedulers.SingleBranchScheduler(name="i2c_bb", - change_filter=util.ChangeFilter(project='i2c_bb'), - treeStableTimer=None, builderNames=["i2c_bb"])) -c['schedulers'].append(schedulers.ForceScheduler(name="force_i2c_bb", builderNames=["i2c_bb"])) - -## ads1115 -c['schedulers'].append(schedulers.SingleBranchScheduler(name="ads1115", - change_filter=util.ChangeFilter(project=['i2c_bb', 'ads1115']), - treeStableTimer=None, builderNames=["ads1115"])) -c['schedulers'].append(schedulers.ForceScheduler(name="force_ads1115", builderNames=["ads1115"])) - -## voltage_app -c['schedulers'].append(schedulers.SingleBranchScheduler(name="voltage_app", - change_filter=util.ChangeFilter(project=['voltage_app', 'ads1115', 'i2c_bb']), - treeStableTimer=None, builderNames=["voltage_app"])) -c['schedulers'].append(schedulers.ForceScheduler(name="force_voltage_app", builderNames=["voltage_app"])) - -## bicycle_statistics -c['schedulers'].append(schedulers.SingleBranchScheduler(name="bicycle_statistics", - change_filter=util.ChangeFilter(project=['bicycle-statistics-python', 'bicycle-statistics-docker']), - treeStableTimer=None, builderNames=["bicycle_statistics"])) -c['schedulers'].append(schedulers.ForceScheduler(name="force_bicycle-statistics", builderNames=["bicycle_statistics"])) - - -####### BUILDERS c['builders'] = [] +c['builders'] = config.builders.test_c.append(c['builders']) +c['builders'] = config.builders.gpio_ftdi.append(c['builders']) +c['builders'] = config.builders.gpio_sys.append(c['builders']) +c['builders'] = config.builders.i2c_bb.append(c['builders']) +c['builders'] = config.builders.ads1115.append(c['builders']) +c['builders'] = config.builders.voltage_app.append(c['builders']) +c['builders'] = config.builders.bicycle_statistics.append(c['builders']) -## test.c -test_c_factory = util.BuildFactory() -test_c_factory.addStep(steps.Git(repourl='https://git.blackfinn.de/tkl/test.c.git', mode='full')) -test_c_factory.addStep(steps.ShellCommand(command=['make', 'check', '-j8'])) -test_c_factory.addStep(steps.Compile(command=['make', 'all', '-j8'])) -test_c_factory.addStep(steps.ShellCommand(command=['make', 'build_unit_test', '-j8'])) -test_c_factory.addStep(steps.ShellCommand(command=['make', 'exec_unit_test'])) -test_c_factory.addStep(steps.ShellCommand(command='make clean && make coverage')) - -## gpio_ftdi -gpio_ftdi_factory = util.BuildFactory() -gpio_ftdi_factory.addStep(steps.Git(repourl='https://git.blackfinn.de/adc_gpio_i2c/gpio_ftdi.git', mode='full')) -gpio_ftdi_factory.addStep(steps.ShellCommand(command=['make', 'check', '-j8'])) -gpio_ftdi_factory.addStep(steps.Compile(command=['make', 'all', '-j8'])) -gpio_ftdi_factory.addStep(steps.ShellCommand(command=['make', 'build_unit_test', '-j8'])) -gpio_ftdi_factory.addStep(steps.ShellCommand(command=['make', 'exec_unit_test'])) -gpio_ftdi_factory.addStep(steps.ShellCommand(command='make clean && make coverage')) - -## gpio_sys -gpio_sys_factory = util.BuildFactory() -gpio_sys_factory.addStep(steps.Git(repourl='https://git.blackfinn.de/adc_gpio_i2c/gpio_sys.git', mode='full')) -gpio_sys_factory.addStep(steps.ShellCommand(command=['make', 'check', '-j8'])) -gpio_sys_factory.addStep(steps.Compile(command=['make', 'all', '-j8'])) -gpio_sys_factory.addStep(steps.ShellCommand(command=['make', 'build_unit_test', '-j8'])) -gpio_sys_factory.addStep(steps.ShellCommand(command=['make', 'exec_unit_test'])) -gpio_sys_factory.addStep(steps.ShellCommand(command='make clean && make coverage')) - -## i2c_bb -i2c_bb_factory = util.BuildFactory() -# DUT -i2c_bb_factory.addStep(steps.ShellCommand(command=['git', 'clone', '--branch', 'master', 'https://git.blackfinn.de/adc_gpio_i2c/i2c_bb.git'])) -i2c_bb_factory.addStep(steps.ShellCommand(command=['make', '-C', 'i2c_bb', 'check', '-j8'])) -i2c_bb_factory.addStep(steps.ShellCommand(command=['make', '-C', 'i2c_bb', 'all', '-j8', 'EXTRA_INC=/worker/include'])) -i2c_bb_factory.addStep(steps.ShellCommand(command=['make', '-C', 'i2c_bb', 'exec_unit_test', '-j8', 'EXTRA_INC=/worker/include'])) -i2c_bb_factory.addStep(steps.ShellCommand(command='make -C i2c_bb clean && make -C i2c_bb coverage -j8 EXTRA_INC=/worker/include')) - -## ads1115 -ads1115_factory = util.BuildFactory() -# install dependencies -ads1115_factory.addStep(steps.ShellCommand(command=['git', 'clone', '--branch', 'master', 'https://git.blackfinn.de/adc_gpio_i2c/i2c_bb.git'])) -ads1115_factory.addStep(steps.ShellCommand(command=['make', '-C', 'i2c_bb', 'install', '-j8', 'PREFIX=/worker'])) -# DUT -ads1115_factory.addStep(steps.ShellCommand(command=['git', 'clone', '--branch', 'master', 'https://git.blackfinn.de/adc_gpio_i2c/ads1115.git'])) -ads1115_factory.addStep(steps.ShellCommand(command=['make', '-C', 'ads1115', 'check', '-j8'])) -ads1115_factory.addStep(steps.ShellCommand(command=['make', '-C', 'ads1115', 'all', '-j8', 'EXTRA_INC=/worker/include'])) -ads1115_factory.addStep(steps.ShellCommand(command=['make', '-C', 'ads1115', 'exec_unit_test', '-j8', 'EXTRA_INC=/worker/include'])) -ads1115_factory.addStep(steps.ShellCommand(command='make -C ads1115 clean && make -C ads1115 coverage -j8 EXTRA_INC=/worker/include')) - -## voltage_app -voltage_app_factory = util.BuildFactory() -# install dependencies -voltage_app_factory.addStep(steps.ShellCommand(command=['git', 'clone', '--branch', 'master', 'https://git.blackfinn.de/adc_gpio_i2c/i2c_bb.git'])) -voltage_app_factory.addStep(steps.ShellCommand(command=['make', '-C', 'i2c_bb', 'install', '-j8', 'PREFIX=/worker'])) -voltage_app_factory.addStep(steps.ShellCommand(command=['git', 'clone', '--branch', 'master', 'https://git.blackfinn.de/adc_gpio_i2c/ads1115.git'])) -voltage_app_factory.addStep(steps.ShellCommand(command=['make', '-C', 'ads1115', 'install', '-j8', 'PREFIX=/worker'])) -# DUT -voltage_app_factory.addStep(steps.ShellCommand(command=['git', 'clone', '--branch', 'master', 'https://git.blackfinn.de/adc_gpio_i2c/voltage_app.git'])) -voltage_app_factory.addStep(steps.ShellCommand(command=['make', '-C', 'voltage_app', 'check', '-j8'])) -voltage_app_factory.addStep(steps.ShellCommand(command=['make', '-C', 'voltage_app', 'all', '-j8', 'EXTRA_INC=/worker/include', 'EXTRA_LIB_DIR=/worker/lib'])) -#voltage_app_factory.addStep(steps.ShellCommand(command=['make', '-C', 'voltage_app', 'build_unit_test', '-j8'])) -#voltage_app_factory.addStep(steps.ShellCommand(command=['make', '-C', 'voltage_app', 'exec_unit_test'])) -#voltage_app_factory.addStep(steps.ShellCommand(command='make -C voltage_app clean && make -C voltage_app coverage')) - -## bicycle-statistics -bicycle_statistics_factory = util.BuildFactory() -bicycle_statistics_factory.addStep(steps.ShellCommand(command=['git', 'clone', '--branch', 'master', 'https://git.blackfinn.de/docker/bicycle-statistics.git'])) -bicycle_statistics_factory.addStep(steps.ShellCommand(command=['docker', 'build', '--no-cache', '-t', 'bicycle-statistics', './bicycle-statistics'])) -bicycle_statistics_factory.addStep(steps.ShellCommand(command=['docker', 'rm', '-f', 'bicycle-statistics'])) -bicycle_statistics_factory.addStep(steps.ShellCommand(command=['docker', 'run', '-d', '-v', '/srv/nextcloud/data/tkl/files/Bicycle:/bs_in', '-v', '/srv/bicycle.blackfinn.de/data:/bs_out', '--name', 'bicycle-statistics', '--restart', 'always', 'bicycle-statistics'])) - -c['builders'].append(util.BuilderConfig(name="test.c", workernames=["buildbot-cpp-worker"], - factory=test_c_factory)) -c['builders'].append(util.BuilderConfig(name="gpio_ftdi", workernames=["buildbot-cpp-worker"], - factory=gpio_ftdi_factory)) -c['builders'].append(util.BuilderConfig(name="gpio_sys", workernames=["buildbot-cpp-worker"], - factory=gpio_sys_factory)) -c['builders'].append(util.BuilderConfig(name="i2c_bb", workernames=["buildbot-cpp-worker"], - factory=i2c_bb_factory)) -c['builders'].append(util.BuilderConfig(name="ads1115", workernames=["buildbot-cpp-worker"], - factory=ads1115_factory)) -c['builders'].append(util.BuilderConfig(name="voltage_app", workernames=["buildbot-cpp-worker"], - factory=voltage_app_factory)) -c['builders'].append(util.BuilderConfig(name="bicycle_statistics", workernames=["buildbot-docker-worker"], - factory=bicycle_statistics_factory)) ####### BUILDBOT SERVICES