├── .gitignore
├── LICENSE
├── README.md
├── buildbot.tac
├── config_module
├── __init__.py
├── builders
│ ├── __init__.py
│ ├── build_GR.py
│ ├── build_coverage.py
│ ├── build_coverity.py
│ ├── build_volk.py
│ ├── builders.json
│ ├── control_PR.py
│ ├── control_push.py
│ ├── control_volk_PR.py
│ ├── control_weekly.py
│ └── volk_builders.json
├── reporters.py
├── schedulers.py
├── tokens.py
└── workers.json
├── gnuradio_buildbot
├── __init__.py
├── custom_steps.py
├── sequences.py
└── workers.py
├── master.cfg
├── master
├── Dockerfile
├── bb.env
├── db.env
└── docker-compose.yml
├── start_buildbot.sh
└── worker
├── .gitconfig
├── buildbot.tac
├── centos-7.6.Dockerfile
├── controller.Dockerfile
├── debian-10.Dockerfile
├── debian-11.Dockerfile
├── debian-9.Dockerfile
├── docker-compose.yml
├── fedora-29.Dockerfile
├── fedora-30.Dockerfile
├── fedora-32.Dockerfile
├── fedora-33.Dockerfile
├── ubuntu-14.04.Dockerfile
├── ubuntu-16.04.Dockerfile
├── ubuntu-18.04.Dockerfile
├── ubuntu-20.04.Dockerfile
└── ubuntu-20.10.Dockerfile
/.gitignore:
--------------------------------------------------------------------------------
1 | *.pyc
2 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | buildbot-gnuradio - GNU Radio CI configuration
2 | Copyright (C) 2017 Andrej Rode
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | gnuradio-buildbot
2 | =================
3 |
4 | This repository contains the buildbot configuration for the GNU Radio project.
5 | If `docker` and `docker-compose` are available on the local machine you should be able to run the full CI locally. (Except Keys and Webhooks)
6 |
7 | # CI Design
8 |
9 | ## Overview
10 |
11 | The buildbot master runs in a very limited alpine container and is connected to a Postgres container.
12 | On receiving a build request a build is kicked off on the master. The master will then spawn required Linux containers to fulfill the build request. Alternatively a permanently running container, VM or remote machine can be used as worker.
13 |
14 | ## Builds
15 | If the buildmaster receives a buildrequest the base branch (or the actual branch) is compared to existing development branches (e.g. maint, master, next) and depending on its type the change will be merged into other development branches as well and tested for forward compatibility.
16 |
17 | ## Authentication
18 | To authenticate users the GitHub authentication system is used.
19 |
20 | # Configuration structure
21 |
22 | For easier maintenance of buildbot the following directory structure was chosen.
23 |
24 | ## master.cfg
25 |
26 | Main configuration file. Imports the `config_module` and returns generated configuration in `config_module` to Twisted.
27 |
28 | ## master/
29 |
30 | Contains the Dockerfile and configuration for the buildbot master to start it with `docker-compose`.
31 |
32 | ## worker/
33 |
34 | Contains Dockerfiles for GNU Radio buildbot worker container images.
35 |
36 | ## config_module/
37 |
38 | Contains actual configuration for builders, schedulers, reporters and workers.
39 | Builder and worker configuration is done in `workers.json` and `builders/builders.json`. Both files are parsed in `__init__.py` and generated builders and workers are appended to appropriate lists.
40 |
41 | ## gnuradio_buildbot/
42 |
43 | Contains custom steps and step sequences for code deduplication in `config_module`. Some of the steps may be upstreamed to `buildbot` in the future.
44 |
45 | ## data/
46 |
47 | Contains extra files to pass into the master for runtime reconfiguration.
48 |
--------------------------------------------------------------------------------
/buildbot.tac:
--------------------------------------------------------------------------------
1 | import sys
2 |
3 | from twisted.application import service
4 | from twisted.python.log import FileLogObserver
5 | from twisted.python.log import ILogObserver
6 |
7 | from buildbot.master import BuildMaster
8 |
9 | basedir = '/var/lib/buildbot'
10 | configfile = 'master.cfg'
11 |
12 | # note: this line is matched against to check that this is a buildmaster
13 | # directory; do not edit it.
14 | application = service.Application('buildmaster')
15 | application.setComponent(ILogObserver, FileLogObserver(sys.stdout).emit)
16 |
17 | m = BuildMaster(basedir, configfile, umask=None)
18 | m.setServiceParent(application)
--------------------------------------------------------------------------------
/config_module/__init__.py:
--------------------------------------------------------------------------------
1 | # Copyright 2017 Andrej Rode
2 | #
3 | # This file is part of gnuradio-buildbot
4 | #
5 | # gnuradio-buildbot is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 3, or (at your option)
8 | # any later version.
9 | #
10 | # gnuradio-buildbot is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with GNU Radio; see the file COPYING. If not, write to
17 | # the Free Software Foundation, Inc., 51 Franklin Street,
18 | # Boston, MA 02110-1301, USA.
19 | #
20 |
21 | import os
22 |
23 | from . import builders
24 | from . import reporters
25 | from . import schedulers
26 | from . import tokens
27 | from gnuradio_buildbot.workers import createWorkers
28 |
29 | workers = createWorkers(os.path.join(os.path.dirname(__file__),"workers.json"))
30 |
--------------------------------------------------------------------------------
/config_module/builders/__init__.py:
--------------------------------------------------------------------------------
1 | # Copyright 2017 Andrej Rode
2 | #
3 | # This file is part of gnuradio-buildbot
4 | #
5 | # gnuradio-buildbot is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 3, or (at your option)
8 | # any later version.
9 | #
10 | # gnuradio-buildbot is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with GNU Radio; see the file COPYING. If not, write to
17 | # the Free Software Foundation, Inc., 51 Franklin Street,
18 | # Boston, MA 02110-1301, USA.
19 | #
20 |
21 | from buildbot.plugins import util
22 | from .control_PR import build_PR
23 | from .control_volk_PR import build_volk_PR
24 | from .control_push import build_push
25 | from .control_weekly import build_weekly
26 | from .build_GR import build_and_test
27 | from .build_coverity import build_coverity
28 | from .build_coverage import build_coverage
29 |
30 |
31 | def filterWorkers(workers, what, attr):
32 | return [w for w in workers
33 | if attr in w.properties.getProperty(what, [])
34 | or attr == w.properties.getProperty(what, "")]
35 |
36 |
37 | def get(workers):
38 | """
39 | construct a list of builders with the given list of workers
40 | """
41 | builders = []
42 | builders.append(
43 | util.BuilderConfig(
44 | name="pull_request_runner",
45 | tags=["control", "gnuradio", "pull"],
46 | workernames=[w.name for w in filterWorkers(workers, "tasks", "control")],
47 | factory=build_PR())
48 | )
49 | builders.append(
50 | util.BuilderConfig(
51 | name="volk_pull_request_runner",
52 | tags=["control", "volk", "pull"],
53 | workernames=[w.name for w in filterWorkers(workers, "tasks", "control")],
54 | factory=build_volk_PR()))
55 | builders.append(
56 | util.BuilderConfig(
57 | name="repo_push_runner",
58 | tags=["control", "push"],
59 | workernames=[w.name for w in filterWorkers(workers, "tasks", "control")],
60 | factory=build_push())
61 | )
62 |
63 | builders.append(
64 | util.BuilderConfig(
65 | name="weekly_runner",
66 | tags=["control", "weekly"],
67 | workernames=[w.name for w in filterWorkers(workers, "tasks", "control")],
68 | factory=build_weekly())
69 | )
70 |
71 | build_workers = filterWorkers(workers, "tasks", "build")
72 | distros = [w.properties.getProperty("distro") for w in build_workers
73 | if w.properties.getProperty("distro", None)]
74 | distros = list(set(distros))
75 | for distro in distros:
76 | builders.append(
77 | util.BuilderConfig(
78 | name="build_"+distro,
79 | tags=["build"],
80 | workernames=[w.name for w in
81 | filterWorkers(build_workers, "distro", distro)],
82 | factory=build_and_test())
83 | )
84 | coverity_workers = filterWorkers(workers, "tasks", "coverity")
85 | builders.append(
86 | util.BuilderConfig(
87 | name="test_coverity",
88 | tags=["test", "coverity"],
89 | workernames=[w.name for w in coverity_workers],
90 | factory=build_coverity()
91 | )
92 | )
93 | builders.append(
94 | util.BuilderConfig(
95 | name="test_coverage",
96 | tags=["test", "coverage"],
97 | workernames=[w.name for w in coverity_workers],
98 | factory=build_coverage()))
99 | return builders
100 |
--------------------------------------------------------------------------------
/config_module/builders/build_GR.py:
--------------------------------------------------------------------------------
1 | # Copyright 2017 Andrej Rode
2 | #
3 | # This file is part of gnuradio-buildbot
4 | #
5 | # gnuradio-buildbot is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 3, or (at your option)
8 | # any later version.
9 | #
10 | # gnuradio-buildbot is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with GNU Radio; see the file COPYING. If not, write to
17 | # the Free Software Foundation, Inc., 51 Franklin Street,
18 | # Boston, MA 02110-1301, USA.
19 | #
20 |
21 | from buildbot.plugins import steps
22 | from buildbot.plugins import util
23 |
24 | import json
25 | import os
26 |
27 | env = {
28 | "PATH": ["/usr/lib/ccache/", "/usr/lib64/ccache", "${PATH}"],
29 | "CCACHE_DIR": util.Interpolate(
30 | os.path.join("/cache", "%(prop:distro)s", "ccache")
31 | ),
32 | }
33 |
34 |
35 | def build_and_test():
36 | remove_build = steps.RemoveDirectory("build")
37 | remove_src = steps.RemoveDirectory("src")
38 | create_build = steps.MakeDirectory("build")
39 | download_src_archive = steps.FileDownload(
40 | mastersrc=util.Property("src_archive"),
41 | workerdest="src.tar.xz",
42 | workdir="src"
43 | )
44 | extract_src_archive = steps.ShellCommand(
45 | name="Extract source archive",
46 | command=["tar", "xJf", "src.tar.xz"],
47 | workdir="src"
48 | )
49 | cmake_step = steps.CMake(
50 | path="../src/",
51 | definitions=util.Property("cmake_defs", {}),
52 | options=util.Property("cmake_opts", []),
53 | workdir="build",
54 | env=env
55 | )
56 |
57 | @util.renderer
58 | def join_make_opts(props):
59 | make_opts = props.getProperty("make_opts", [])
60 | return ["make"] + make_opts
61 |
62 | make_step = steps.Compile(
63 | command=join_make_opts,
64 | workdir="build",
65 | env=env
66 | )
67 |
68 | @util.renderer
69 | def parse_test_excludes(props):
70 | command = ["ctest", "--output-on-failure", "--timeout", "120"]
71 | excludes = props.getProperty('test_excludes', [])
72 | excludes.append("qtgui")
73 | if excludes is not None:
74 | command += ["-E", "|".join(excludes)]
75 | return command
76 |
77 | test_step = steps.Test(
78 | command=parse_test_excludes,
79 | workdir="build"
80 | )
81 |
82 | factory = util.BuildFactory()
83 | factory.addStep(remove_build)
84 | factory.addStep(remove_src)
85 | factory.addStep(create_build)
86 | factory.addStep(download_src_archive)
87 | factory.addStep(extract_src_archive)
88 | factory.addStep(cmake_step)
89 | factory.addStep(make_step)
90 | factory.addStep(test_step)
91 | return factory
92 |
--------------------------------------------------------------------------------
/config_module/builders/build_coverage.py:
--------------------------------------------------------------------------------
1 | # Copyright 2017 Andrej Rode
2 | #
3 | # This file is part of gnuradio-buildbot
4 | #
5 | # gnuradio-buildbot is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 3, or (at your option)
8 | # any later version.
9 | #
10 | # gnuradio-buildbot is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with GNU Radio; see the file COPYING. If not, write to
17 | # the Free Software Foundation, Inc., 51 Franklin Street,
18 | # Boston, MA 02110-1301, USA.
19 | #
20 |
21 | from buildbot.plugins import steps
22 | from buildbot.plugins import util
23 |
24 | from config_module import tokens
25 |
26 | import os
27 |
28 | env = {
29 | "CCACHE_DIR": util.Interpolate(
30 | os.path.join("/cache", "%(prop:distro)s", "ccache")
31 | ),
32 | "PATH": ["/usr/lib/ccache/", "/usr/lib64/ccache/", "${PATH}"]
33 | }
34 |
35 |
36 | def build_coverage():
37 | remove_build = steps.RemoveDirectory("build")
38 | create_build = steps.MakeDirectory("build")
39 | cmake_step = steps.CMake(
40 | path=util.Property("src_dir"),
41 | definitions=util.Property("cmake_defs", {}),
42 | options=util.Property("cmake_opts", []),
43 | workdir="build",
44 | env=env
45 | )
46 |
47 | @util.renderer
48 | def join_make_opts(props):
49 | make_opts = props.getProperty("make_opts", [])
50 | return ["make"] + make_opts
51 |
52 | make_step = steps.Compile(
53 | command=join_make_opts,
54 | workdir="build",
55 | env=env
56 | )
57 |
58 | test_coverage = steps.ShellCommand(
59 | command=["make", "coverage"],
60 | workdir="build"
61 | )
62 |
63 | upload_coverage_data = steps.ShellCommand(
64 | command=[
65 | "bash", "-c",
66 | util.Interpolate("bash <(curl -s https://codecov.io/bash) -t "+tokens.codecovToken+" -C %(prop:revision)s -R %(prop:src_dir)s -f coverage.info.cleaned")
67 | ],
68 | workdir="build"
69 | )
70 |
71 | factory = util.BuildFactory()
72 | factory.addStep(remove_build)
73 | factory.addStep(create_build)
74 | factory.addStep(cmake_step)
75 | factory.addStep(make_step)
76 | factory.addStep(test_coverage)
77 | factory.addStep(upload_coverage_data)
78 | return factory
79 |
--------------------------------------------------------------------------------
/config_module/builders/build_coverity.py:
--------------------------------------------------------------------------------
1 | # Copyright 2017 Andrej Rode
2 | #
3 | # This file is part of gnuradio-buildbot
4 | #
5 | # gnuradio-buildbot is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 3, or (at your option)
8 | # any later version.
9 | #
10 | # gnuradio-buildbot is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with GNU Radio; see the file COPYING. If not, write to
17 | # the Free Software Foundation, Inc., 51 Franklin Street,
18 | # Boston, MA 02110-1301, USA.
19 | #
20 |
21 | from buildbot.plugins import steps
22 | from buildbot.plugins import util
23 |
24 | from config_module import tokens
25 |
26 | import os
27 |
28 | env = {
29 | "CCACHE_DIR": util.Interpolate(
30 | os.path.join("/cache", "%(prop:distro)s", "ccache")
31 | ),
32 | "PATH": [util.Property("cov_path", "/usr/local/share/cov-build/bin"), "/usr/lib/ccache/", "/usr/lib64/ccache/", "${PATH}"]
33 | }
34 |
35 |
36 | def build_coverity():
37 | remove_build = steps.RemoveDirectory("build")
38 | remove_src = steps.RemoveDirectory("src")
39 | create_build = steps.MakeDirectory("build")
40 | download_src_archive = steps.FileDownload(
41 | mastersrc=util.Property("src_archive"),
42 | workerdest="src.tar.xz",
43 | workdir="src"
44 | )
45 | extract_src_archive = steps.ShellCommand(
46 | name="Extract source archive",
47 | command=["tar", "xJf", "src.tar.xz"],
48 | workdir="src"
49 | )
50 | cmake_step = steps.CMake(
51 | path="../src/",
52 | definitions=util.Property("cmake_defs", {}),
53 | options=util.Property("cmake_opts", []),
54 | workdir="build",
55 | env=env
56 | )
57 |
58 | make_step = steps.Compile(
59 | command=["cov-build", "--dir", "cov-int", "make", "-j", "16", "-l", "32"],
60 | workdir="build",
61 | env=env
62 | )
63 |
64 | compress = steps.ShellCommand(
65 | command=["tar", "czvf", "gnuradio.tgz", "cov-int"],
66 | workdir="build")
67 |
68 | upload = steps.ShellCommand(
69 | command=[
70 | "curl", "--form", "token="+tokens.coverityToken,
71 | "--form", "email=mail@andrejro.de", "--form", "file=@gnuradio.tgz",
72 | "--form", util.Interpolate("version=%(prop:revision)s"), "--form",
73 | util.Interpolate("description=\"Weekly Buildbot submission for %(prop:branch)s branch \""),
74 | "https://scan.coverity.com/builds?project=GNURadio"
75 | ],
76 | workdir="build")
77 |
78 | factory = util.BuildFactory()
79 | factory.addStep(remove_build)
80 | factory.addStep(remove_src)
81 | factory.addStep(create_build)
82 | factory.addStep(download_src_archive)
83 | factory.addStep(extract_src_archive)
84 | factory.addStep(cmake_step)
85 | factory.addStep(make_step)
86 | factory.addStep(compress)
87 | factory.addStep(upload)
88 | return factory
89 |
--------------------------------------------------------------------------------
/config_module/builders/build_volk.py:
--------------------------------------------------------------------------------
1 | # Copyright 2017 Andrej Rode
2 | #
3 | # This file is part of gnuradio-buildbot
4 | #
5 | # gnuradio-buildbot is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 3, or (at your option)
8 | # any later version.
9 | #
10 | # gnuradio-buildbot is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with GNU Radio; see the file COPYING. If not, write to
17 | # the Free Software Foundation, Inc., 51 Franklin Street,
18 | # Boston, MA 02110-1301, USA.
19 | #
20 |
21 | from buildbot.plugins import steps
22 | from buildbot.plugins import util
23 |
24 | import json
25 | import os
26 |
27 | env = {
28 | "PATH": ["/usr/lib/ccache/", "/usr/lib64/ccache", "${PATH}"],
29 | "CCACHE_DIR": util.Interpolate(
30 | os.path.join("/cache", "%(prop:distro)s", "ccache")
31 | ),
32 | }
33 |
34 |
35 | def build_and_test():
36 | remove_build = steps.RemoveDirectory("build")
37 | create_build = steps.MakeDirectory("build")
38 | cmake_step = steps.CMake(
39 | path=util.Property("src_dir"),
40 | definitions=util.Property("cmake_defs", {}),
41 | options=util.Property("cmake_opts", []),
42 | workdir="build",
43 | env=env
44 | )
45 |
46 | @util.renderer
47 | def join_make_opts(props):
48 | make_opts = props.getProperty("make_opts", [])
49 | return ["make"] + make_opts
50 |
51 | make_step = steps.Compile(
52 | command=join_make_opts,
53 | workdir="build",
54 | env=env
55 | )
56 |
57 | def parse_exclude_file(rc, stdout, stderr):
58 | exclude_tests = json.loads(stdout)
59 | return {"test_excludes": exclude_tests}
60 |
61 |
62 | load_exclude_file = steps.SetPropertyFromCommand(
63 | command=["cat", os.path.join("/config", "test_excludes.json")],
64 | extract_fn=parse_exclude_file,
65 | doStepIf=lambda steps: steps.getProperty("exclude_file", False)
66 | )
67 |
68 | @util.renderer
69 | def parse_test_excludes(props):
70 | command = ["ctest", "--output-on-failure", "--timeout", "10"]
71 | excludes = props.getProperty("test_excludes", None)
72 | if excludes is not None:
73 | command += ["-E", "|".join(excludes)]
74 | return command
75 |
76 | test_step = steps.Test(
77 | command=parse_test_excludes,
78 | workdir="build"
79 | )
80 |
81 | factory = util.BuildFactory()
82 | factory.addStep(remove_build)
83 | factory.addStep(create_build)
84 | factory.addStep(load_exclude_file)
85 | factory.addStep(cmake_step)
86 | factory.addStep(make_step)
87 | factory.addStep(test_step)
88 | return factory
89 |
--------------------------------------------------------------------------------
/config_module/builders/builders.json:
--------------------------------------------------------------------------------
1 | {
2 | "buildopts":{
3 | "hardened":{
4 | "properties": {
5 | "cmake_defs":{
6 | "CMAKE_CXX_FLAGS": "-D_GLIBCXX_ASSERTIONS"
7 | }
8 | }
9 | },
10 | "python2":{
11 | "properties":{
12 | "cmake_defs":{
13 | "PYTHON_EXECUTABLE": "/usr/bin/python2"
14 | },
15 | "virtual_builder_tags":["py2"]
16 | }
17 | },
18 | "python3":{
19 | "properties":{
20 | "cmake_defs":{
21 | "PYTHON_EXECUTABLE": "/usr/bin/python3"
22 | },
23 | "virtual_builder_tags":["py3"]
24 | }
25 | },
26 | "qt4":{
27 | "properties":{
28 | "cmake_defs":{
29 | "DESIRED_QT_VERSION": "4"
30 | },
31 | "virtual_builder_tags":["qt4"]
32 | }
33 | },
34 | "qt5":{
35 | "properties":{
36 | "cmake_defs":{
37 | "DESIRED_QT_VERSION": "5"
38 | },
39 | "virtual_builder_tags":["qt5"]
40 | }
41 | },
42 | "coverity":{
43 | "properties":{
44 | "cmake_defs":{
45 | "CMAKE_BUILD_TYPE":"Debug"
46 | },
47 | "virtual_builder_tags":["coverity"],
48 | "cov_path": "/coverity/bin"
49 | }
50 | },
51 | "coverage":{
52 | "properties":{
53 | "cmake_defs":{
54 | "CMAKE_BUILD_TYPE":"Coverage"
55 | },
56 | "virtual_builder_tags":["coverage"]
57 | }
58 | }
59 | },
60 | "builders":{
61 | "maint-3.7":{
62 | "builds":[
63 | {
64 | "opts": ["python2", "qt4", "hardened"],
65 | "scheds": ["Ubuntu_14_04_64", "Ubuntu_16_04_64", "Fedora_29"],
66 | "runners": ["pull"],
67 | "properties": {
68 | "exclude_file": true
69 | }
70 | },
71 | {
72 | "opts": ["python2", "qt4", "hardened"],
73 | "scheds": ["Ubuntu_14_04_64", "Ubuntu_16_04_64", "Fedora_29"],
74 | "runners": ["push", "time"],
75 | "properties": {
76 | "test_excludes": ["qa_qtgui",
77 | "qa_polarencoder",
78 | "qa_udp_source_sink",
79 | "qa_zeromq_pub",
80 | "qa_header_payload_demux"]
81 | }
82 | }
83 | ]
84 | },
85 | "maint-3.8":{
86 | "builds":[
87 | {
88 | "opts": ["python3", "qt5"],
89 | "scheds": ["Ubuntu_18_04_64", "Fedora_29", "Debian_10_64"],
90 | "runners": ["pull"]
91 | },
92 | {
93 | "opts": ["python2", "qt5"],
94 | "scheds": ["Ubuntu_18_04_64", "Fedora_29", "Debian_10_64"],
95 | "runners": ["pull"]
96 | },
97 | {
98 | "opts": ["python3", "qt5"],
99 | "scheds": ["Ubuntu_18_04_64", "Fedora_29", "Centos_7_6", "Debian_10_64"],
100 | "runners": ["push", "time"]
101 | },
102 | {
103 | "opts": ["python2", "qt5"],
104 | "scheds": ["Ubuntu_18_04_64", "Fedora_29", "Debian_10_64"],
105 | "runners": ["push", "time"]
106 | },
107 | {
108 | "opts": ["python3", "coverity"],
109 | "scheds": ["coverity"],
110 | "runners": ["time"]
111 | }
112 |
113 |
114 | ]
115 | },
116 | "master":{
117 | "builds":[
118 | {
119 | "opts": ["python3", "qt5"],
120 | "scheds": ["Ubuntu_18_04_64", "Fedora_29", "Debian_10_64"],
121 | "runners": ["pull"],
122 | "properties": {
123 | "test_excludes": ["qa_uhd",
124 | "qa_uncaught_exception",
125 | "qa_header_payload_demux"]
126 | }
127 |
128 | },
129 | {
130 | "opts": ["python3", "qt5"],
131 | "scheds": ["Ubuntu_18_04_64", "Fedora_29", "Centos_7_6", "Debian_10_64"],
132 | "runners": ["push", "time"],
133 | "properties": {
134 | "test_excludes": ["qa_uhd",
135 | "qa_uncaught_exception",
136 | "qa_header_payload_demux"]
137 | }
138 | },
139 | {
140 | "opts": ["python3", "coverity"],
141 | "scheds": ["coverity"],
142 | "runners": ["time"],
143 | "properties": {
144 | "test_excludes": ["qa_uhd",
145 | "qa_uncaught_exception",
146 | "qa_header_payload_demux"]
147 | }
148 |
149 | }
150 |
151 |
152 | ]
153 | }
154 | }
155 | }
156 |
--------------------------------------------------------------------------------
/config_module/builders/control_PR.py:
--------------------------------------------------------------------------------
1 | # Copyright 2017 Andrej Rode
2 | #
3 | # This file is part of gnuradio-buildbot
4 | #
5 | # gnuradio-buildbot is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 3, or (at your option)
8 | # any later version.
9 | #
10 | # gnuradio-buildbot is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with GNU Radio; see the file COPYING. If not, write to
17 | # the Free Software Foundation, Inc., 51 Franklin Street,
18 | # Boston, MA 02110-1301, USA.
19 | #
20 |
21 | from buildbot.plugins import steps
22 | from buildbot.plugins import util
23 | from gnuradio_buildbot import custom_steps
24 |
25 | from buildbot.process.results import SUCCESS
26 | from buildbot.process.results import SKIPPED
27 | import json
28 | import os
29 |
30 | _BASEPATH = os.environ.get("BUILDBOT_SRC_BASE", "/tmp")
31 | _PULL_SRC_BASE = os.path.join(_BASEPATH, "pull")
32 |
33 |
34 | def build_PR():
35 |
36 | create_src = steps.MakeDirectory(name="create src directory", dir="src")
37 |
38 | clone_step = steps.GitHub(
39 | name="fetch PR source",
40 | repourl=util.Property("repository"),
41 | mode="full",
42 | method="fresh",
43 | submodules=True,
44 | retryFetch=True,
45 | clobberOnFailure=True,
46 | workdir="src")
47 |
48 | rm_src_archive = steps.ShellCommand(
49 | name="remove old source archive",
50 | command=[
51 | "rm", "-rf", util.Interpolate(
52 | os.path.join(_PULL_SRC_BASE,
53 | "%(prop:github.number)s.tar.xz"))
54 | ],
55 | workdir="src",
56 | hideStepIf=lambda results, s: results == SKIPPED or results == SUCCESS)
57 |
58 | create_src_archive = steps.ShellCommand(
59 | name="create source archive",
60 | command=[
61 | "tar", "cJf", util.Interpolate(
62 | os.path.join(_PULL_SRC_BASE,
63 | "%(prop:github.number)s.tar.xz")), "."
64 | ],
65 | workdir="src",
66 | hideStepIf=lambda results, s: results == SKIPPED or results == SUCCESS,
67 | )
68 |
69 | # load builders.json with definitions on how to build things
70 | parent_path = os.path.dirname(__file__)
71 | with open(os.path.join(parent_path, "builders.json"),
72 | "r") as builders_file:
73 | build_config = json.loads(builders_file.read())
74 |
75 | trigger_builds = custom_steps.BuildTrigger(
76 | name="trigger the right builders",
77 | build_config=build_config,
78 | schedulerNames=["trigger"],
79 | runner="pull",
80 | set_properties={
81 | "pr_base": util.Property("github.base.ref"),
82 | "src_archive": util.Interpolate(
83 | os.path.join(_PULL_SRC_BASE, "%(prop:github.number)s.tar.xz"))
84 | },
85 | updateSourceStamp=False,
86 | waitForFinish=True)
87 |
88 | factory = util.BuildFactory()
89 | factory.addStep(create_src)
90 | factory.addStep(clone_step)
91 | factory.addStep(rm_src_archive)
92 | factory.addStep(create_src_archive)
93 | factory.addStep(trigger_builds)
94 | return factory
95 |
--------------------------------------------------------------------------------
/config_module/builders/control_push.py:
--------------------------------------------------------------------------------
1 | # Copyright 2017 Andrej Rode
2 | #
3 | # This file is part of gnuradio-buildbot
4 | #
5 | # gnuradio-buildbot is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 3, or (at your option)
8 | # any later version.
9 | #
10 | # gnuradio-buildbot is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with GNU Radio; see the file COPYING. If not, write to
17 | # the Free Software Foundation, Inc., 51 Franklin Street,
18 | # Boston, MA 02110-1301, USA.
19 | #
20 |
21 | from buildbot.plugins import steps
22 | from buildbot.plugins import util
23 |
24 | from gnuradio_buildbot import custom_steps
25 |
26 | from buildbot.process.results import SUCCESS
27 | from buildbot.process.results import SKIPPED
28 | import json
29 | import os
30 |
31 |
32 | _BASEPATH = os.environ.get("BUILDBOT_SRC_BASE", "/tmp")
33 | _PUSH_SRC_BASE = os.path.join(_BASEPATH, "push")
34 |
35 |
36 | def build_push():
37 |
38 | create_src = steps.MakeDirectory(
39 | name="create src directory",
40 | dir="src")
41 | clone_step = steps.GitHub(
42 | name="fetch PR source",
43 | repourl=util.Property("repository"),
44 | mode="full",
45 | method="fresh",
46 | submodules=True,
47 | clobberOnFailure=True,
48 | getDescription=True,
49 | workdir="src")
50 |
51 | rm_src_archive = steps.ShellCommand(
52 | name="remove old source archive",
53 | command=[
54 | "rm", "-rf", util.Interpolate(
55 | os.path.join(_PUSH_SRC_BASE, "%(prop:branch)s",
56 | "%(prop:commit-description)s.tar.xz"))
57 | ],
58 | workdir="src",
59 | hideStepIf=lambda results, s: results == SKIPPED or results == SUCCESS)
60 |
61 | create_src_archive = steps.ShellCommand(
62 | name="create source archive",
63 | command=[
64 | "tar", "cJf", util.Interpolate(
65 | os.path.join(_PUSH_SRC_BASE, "%(prop:branch)s",
66 | "%(prop:commit-description)s.tar.xz")), "."
67 | ],
68 | workdir="src",
69 | hideStepIf=lambda results, s: results == SKIPPED or results == SUCCESS,
70 | )
71 |
72 | set_merge_property = steps.SetProperty(
73 | property=util.Interpolate("merge_%(prop:branch)s"),
74 | value=True,
75 | hideStepIf=True,
76 | )
77 |
78 | # load builders.json with definitions on how to build things
79 | parent_path = os.path.dirname(__file__)
80 | with open(os.path.join(parent_path, "builders.json"), "r") as builders_file:
81 | build_config = json.loads(builders_file.read())
82 |
83 | # now we have all necessary merge properties together,
84 | # we can actually kickoff builds for them
85 |
86 | trigger_builds = custom_steps.BuildTrigger(
87 | name="trigger all builders",
88 | build_config=build_config,
89 | schedulerNames=["trigger"],
90 | runner="push",
91 | set_properties={
92 | "src_archive": util.Interpolate(
93 | os.path.join(_PUSH_SRC_BASE,"%(prop:branch)s","%(prop:commit-description)s.tar.xz"))
94 | },
95 | updateSourceStamp=True,
96 | waitForFinish=True
97 | )
98 |
99 | factory = util.BuildFactory()
100 | factory.addStep(create_src)
101 | factory.addStep(clone_step)
102 | factory.addStep(rm_src_archive)
103 | factory.addStep(create_src_archive)
104 | factory.addStep(set_merge_property)
105 | factory.addStep(trigger_builds)
106 | return factory
107 |
--------------------------------------------------------------------------------
/config_module/builders/control_volk_PR.py:
--------------------------------------------------------------------------------
1 | # Copyright 2017 Andrej Rode
2 | #
3 | # This file is part of gnuradio-buildbot
4 | #
5 | # gnuradio-buildbot is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 3, or (at your option)
8 | # any later version.
9 | #
10 | # gnuradio-buildbot is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with GNU Radio; see the file COPYING. If not, write to
17 | # the Free Software Foundation, Inc., 51 Franklin Street,
18 | # Boston, MA 02110-1301, USA.
19 | #
20 |
21 | from buildbot.plugins import steps
22 | from buildbot.plugins import util
23 | from gnuradio_buildbot import sequences
24 | from gnuradio_buildbot import custom_steps
25 |
26 | from buildbot.process.results import SUCCESS
27 | from buildbot.process.results import SKIPPED
28 | import json
29 | import os
30 |
31 |
32 | _BASEPATH = os.environ.get("BUILDBOT_SRC_BASE", "/tmp")
33 | _PULL_SRC_BASE = os.path.join(_BASEPATH, "volk", "pull")
34 |
35 |
36 | def build_volk_PR():
37 |
38 | create_src = steps.MakeDirectory(
39 | name="create src directory",
40 | dir="volk")
41 |
42 | clone_step = steps.GitHub(
43 | name="fetch PR source",
44 | repourl=util.Property("repository"),
45 | mode="full",
46 | method="fresh",
47 | submodules=True,
48 | retryFetch=True,
49 | clobberOnFailure=True,
50 | workdir="volk")
51 |
52 | rm_src_dir = steps.RemoveDirectory(
53 | dir=util.Interpolate(
54 | os.path.join( _PULL_SRC_BASE,
55 | "%(prop:github.number)s", "%(prop:github.base.ref)s")
56 | ),
57 | hideStepIf=lambda results, s: results == SKIPPED or results == SUCCESS,
58 | )
59 |
60 | copy_src = steps.CopyDirectory(
61 | name="copy src to srcdir",
62 | src="volk",
63 | dest=util.Interpolate(
64 | os.path.join( _PULL_SRC_BASE,
65 | "%(prop:github.number)s", "%(prop:github.base.ref)s"),
66 | ),
67 | hideStepIf=lambda results, s: results == SKIPPED or results == SUCCESS,
68 | )
69 |
70 | # load builders.json with definitions on how to build things
71 | parent_path = os.path.dirname(__file__)
72 | with open(os.path.join(parent_path, "volk_builders.json"), "r") as builders_file:
73 | build_config = json.loads(builders_file.read())
74 |
75 | trigger_builds = custom_steps.BuildTrigger(
76 | name="trigger the right builders",
77 | build_config=build_config,
78 | schedulerNames=["trigger"],
79 | runner="pull",
80 | set_properties={
81 | "pr_base": util.Property("github.base.ref"),
82 | "src_dir": util.Interpolate(os.path.join(
83 | _PULL_SRC_BASE, "%(prop:github.number)s"))
84 | },
85 | updateSourceStamp=False,
86 | waitForFinish=True
87 | )
88 |
89 | factory = util.BuildFactory()
90 | factory.addStep(create_src)
91 | factory.addStep(clone_step)
92 | factory.addStep(rm_src_dir)
93 | factory.addStep(copy_src)
94 | factory.addStep(trigger_builds)
95 | return factory
96 |
--------------------------------------------------------------------------------
/config_module/builders/control_weekly.py:
--------------------------------------------------------------------------------
1 | # Copyright 2017 Andrej Rode
2 | #
3 | # This file is part of gnuradio-buildbot
4 | #
5 | # gnuradio-buildbot is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 3, or (at your option)
8 | # any later version.
9 | #
10 | # gnuradio-buildbot is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with GNU Radio; see the file COPYING. If not, write to
17 | # the Free Software Foundation, Inc., 51 Franklin Street,
18 | # Boston, MA 02110-1301, USA.
19 | #
20 |
21 | from buildbot.plugins import steps
22 | from buildbot.plugins import util
23 |
24 | from gnuradio_buildbot import custom_steps
25 |
26 | from buildbot.process.results import SUCCESS
27 | from buildbot.process.results import SKIPPED
28 | import json
29 | import os
30 |
31 |
32 | _BASEPATH = os.environ.get("BUILDBOT_SRC_BASE", "/tmp")
33 | _WEEKLY_SRC_BASE = os.path.join(_BASEPATH, "weekly")
34 |
35 |
36 | def build_weekly():
37 |
38 | create_src = steps.MakeDirectory(
39 | name="create src directory",
40 |
41 | dir="src")
42 |
43 | clone_step = steps.GitHub(
44 | name="fetch PR source",
45 | repourl=util.Property("repository"),
46 | mode="full",
47 | method="fresh",
48 | submodules=True,
49 | clobberOnFailure=True,
50 | getDescription=True,
51 | workdir="src")
52 |
53 | rm_src_archive = steps.ShellCommand(
54 | name="remove old source archive",
55 | command=[
56 | "rm", "-rf", util.Interpolate(
57 | os.path.join(_WEEKLY_SRC_BASE, "%(prop:branch)s",
58 | "%(prop:commit-description)s.tar.xz"))
59 | ],
60 | workdir="src",
61 | hideStepIf=lambda results, s: results == SKIPPED or results == SUCCESS)
62 |
63 | create_src_archive = steps.ShellCommand(
64 | name="create source archive",
65 | command=[
66 | "tar", "cJf", util.Interpolate(
67 | os.path.join(_WEEKLY_SRC_BASE, "%(prop:branch)s",
68 | "%(prop:commit-description)s.tar.xz")), "."
69 | ],
70 | workdir="src",
71 | hideStepIf=lambda results, s: results == SKIPPED or results == SUCCESS,
72 | )
73 | # load builders.json with definitions on how to build things
74 | parent_path = os.path.dirname(__file__)
75 | with open(os.path.join(parent_path, "builders.json"), "r") as builders_file:
76 | build_config = json.loads(builders_file.read())
77 |
78 | # now we have all necessary merge properties together,
79 | # we can actually kickoff builds for them
80 |
81 | trigger_builds = custom_steps.BuildTrigger(
82 | name="trigger all builders",
83 | build_config=build_config,
84 | schedulerNames=["trigger"],
85 | runner="time",
86 | set_properties={
87 | "src_archive": util.Interpolate(
88 | os.path.join(_WEEKLY_SRC_BASE, "%(prop:branch)s","%(prop:commit-description)s.tar.xz")),
89 | "got_revision": util.Property("got_revision"),
90 | },
91 | updateSourceStamp=True,
92 | waitForFinish=True
93 | )
94 |
95 | factory = util.BuildFactory()
96 | factory.addStep(create_src)
97 | factory.addStep(clone_step)
98 | factory.addStep(rm_src_archive)
99 | factory.addStep(create_src_archive)
100 | factory.addStep(trigger_builds)
101 | return factory
102 |
--------------------------------------------------------------------------------
/config_module/builders/volk_builders.json:
--------------------------------------------------------------------------------
1 | {
2 | "buildopts":{
3 | "volk":{
4 | "virtual_builder_tags":["volk"]
5 | }
6 | },
7 | "builders":{
8 | "master":{
9 | "builds":[
10 | {
11 | "scheds": ["Ubuntu_14_04_64",
12 | "Ubuntu_16_04_64",
13 | "Fedora_29"],
14 | "runners": ["pull"]
15 | }
16 | ]
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/config_module/reporters.py:
--------------------------------------------------------------------------------
1 | # Copyright 2017 Andrej Rode
2 | #
3 | # This file is part of gnuradio-buildbot
4 | #
5 | # gnuradio-buildbot is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 3, or (at your option)
8 | # any later version.
9 | #
10 | # gnuradio-buildbot is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with GNU Radio; see the file COPYING. If not, write to
17 | # the Free Software Foundation, Inc., 51 Franklin Street,
18 | # Boston, MA 02110-1301, USA.
19 | #
20 |
21 | from buildbot.plugins import reporters, util
22 | import os
23 |
24 |
25 | @util.renderer
26 | def get_context(prop):
27 | buildername = prop.getProperty("virtual_builder_name", None)
28 | if buildername is None:
29 | buildername = prop.getProperty("buildername")
30 | context = "bb/"+buildername
31 | return context
32 |
33 | def get():
34 | reps = []
35 | github_status = reporters.GitHubStatusPush(token=os.environ.get("BUILDBOT_ACCESS_TOKEN"),
36 | context=get_context,
37 | startDescription='Build started.',
38 | endDescription='Build done.',
39 | verbose=True)
40 | reps.append(github_status)
41 | return reps
42 |
--------------------------------------------------------------------------------
/config_module/schedulers.py:
--------------------------------------------------------------------------------
1 | # Copyright 2017 Andrej Rode
2 | #
3 | # This file is part of gnuradio-buildbot
4 | #
5 | # gnuradio-buildbot is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 3, or (at your option)
8 | # any later version.
9 | #
10 | # gnuradio-buildbot is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with GNU Radio; see the file COPYING. If not, write to
17 | # the Free Software Foundation, Inc., 51 Franklin Street,
18 | # Boston, MA 02110-1301, USA.
19 | #
20 |
21 | from buildbot.plugins import util
22 | from buildbot.plugins import schedulers
23 |
24 |
25 | def get(builders):
26 | scheds = []
27 | # pull request scheduler
28 | scheds.append(
29 | schedulers.AnyBranchScheduler(
30 | name="gr_pull_request_handler",
31 | change_filter=util.ChangeFilter(category='pull', project="gnuradio/gnuradio"),
32 | treeStableTimer=None,
33 | builderNames=[b.name for b in builders
34 | if "control" in b.tags
35 | and "gnuradio" in b.tags
36 | and "pull" in b.tags]
37 | ))
38 | scheds.append(
39 | schedulers.AnyBranchScheduler(
40 | name="volk_pull_request_handler",
41 | change_filter=util.ChangeFilter(category='pull', project="gnuradio/volk"),
42 | treeStableTimer=None,
43 | builderNames=[b.name for b in builders
44 | if "control" in b.tags
45 | and "volk" in b.tags
46 | and "pull" in b.tags]
47 | ))
48 |
49 | # push event scheduler
50 | def filter_for_push(change):
51 | event = change.properties.getProperty("event")
52 | project = change.properties.getProperty("project")
53 | if event == "push":
54 | return True
55 | return False
56 |
57 | scheds.append(
58 | schedulers.AnyBranchScheduler(
59 | name="commit_push_handler",
60 | change_filter=util.ChangeFilter(filter_fn=filter_for_push, project="gnuradio/gnuradio"),
61 | treeStableTimer=60,
62 | builderNames=[b.name for b in builders
63 | if "control" in b.tags and "push" in b.tags]
64 | ))
65 |
66 | scheds.append(
67 | schedulers.ForceScheduler(
68 | name="force_pullrequest",
69 | builderNames=["pull_request_runner"],
70 | properties=[
71 | util.StringParameter(
72 | name="github.number",
73 | label="GitHub pull request number",
74 | default="", size=80
75 | ),
76 | util.StringParameter(
77 | name="github.base.ref",
78 | label="pull request base branch",
79 | default="master", size=80)
80 | ],
81 | codebases=[
82 | util.CodebaseParameter(
83 | "",
84 | project=util.FixedParameter(name="project", default="gnuradio/gnuradio"),
85 | repository=util.FixedParameter(name="repository", default="https://github.com/gnuradio/gnuradio.git"),
86 | branch=util.StringParameter(
87 | name="branch",
88 | label="pull request branch",
89 | default="refs/pull//merge", size=80
90 | ),
91 | revision=util.FixedParameter(name="revision", default="")
92 | )
93 | ]
94 | ))
95 | scheds.append(
96 | schedulers.ForceScheduler(
97 | name="force_build",
98 | builderNames=["repo_push_runner"],
99 | codebases=[
100 | util.CodebaseParameter(
101 | "",
102 | project=util.FixedParameter(name="project", default="gnuradio/gnuradio"),
103 | repository=util.FixedParameter(name="repository", default="https://github.com/gnuradio/gnuradio.git"),
104 | )
105 | ]
106 | )
107 | )
108 |
109 | scheds.append(
110 | schedulers.ForceScheduler(
111 | name="force_weekly",
112 | builderNames=["weekly_runner"],
113 | codebases=[
114 | util.CodebaseParameter(
115 | "",
116 | project=util.FixedParameter(name="project", default="gnuradio/gnuradio"),
117 | repository=util.FixedParameter(name="repository", default="https://github.com/gnuradio/gnuradio.git"),
118 | branch=util.StringParameter(
119 | name="branch",
120 | label="test branch",
121 | default="master", size=80
122 | ),
123 | revision=util.FixedParameter(name="revision", default="")
124 | )
125 | ])
126 | )
127 |
128 | scheds.append(
129 | schedulers.Nightly(
130 | name="timed_weekly",
131 | builderNames=["weekly_runner"],
132 | codebases={
133 | "":{
134 | "repository":"https://github.com/gnuradio/gnuradio.git",
135 | "branch": "master",
136 | "revision": "None"
137 | }
138 | },
139 | dayOfWeek=[0, 4],
140 | hour=4,
141 | minute=0))
142 | scheds.extend(
143 | [schedulers.Triggerable(
144 | name="trigger_" + b.name.lstrip("build_"),
145 | builderNames=[b.name]
146 | ) for b in builders if "build" in b.tags]
147 | )
148 |
149 | scheds.extend(
150 | [schedulers.Triggerable(
151 | name="trigger_" + b.name.lstrip("test_"),
152 | builderNames=[b.name]
153 | ) for b in builders if "test" in b.tags]
154 | )
155 | return scheds
156 |
--------------------------------------------------------------------------------
/config_module/tokens.py:
--------------------------------------------------------------------------------
1 | # Copyright 2017 Andrej Rode
2 | #
3 | # This file is part of gnuradio-buildbot
4 | #
5 | # gnuradio-buildbot is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 3, or (at your option)
8 | # any later version.
9 | #
10 | # gnuradio-buildbot is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with GNU Radio; see the file COPYING. If not, write to
17 | # the Free Software Foundation, Inc., 51 Franklin Street,
18 | # Boston, MA 02110-1301, USA.
19 | #
20 | coverityToken=""
21 | codecovToken=""
22 |
--------------------------------------------------------------------------------
/config_module/workers.json:
--------------------------------------------------------------------------------
1 | {
2 | "masterFQDN": "ci-master.gnuradio.org",
3 | "workers":{
4 | "Linux":{
5 | "Debian_10_64":[{
6 | "image": "gnuradio/buildbot-worker:debian-10",
7 | "properties":{
8 | "tasks": ["build"],
9 | "make_opts": ["-j8", "-l16"]
10 | },
11 | "workers": 1,
12 | "docker_host": "tcp://ci-host-01.gnuradio.org:2376"
13 | }],
14 | "Ubuntu_18_04_64":[{
15 | "image": "gnuradio/buildbot-worker:ubuntu-18.04",
16 | "properties":{
17 | "tasks": ["build", "coverity"],
18 | "make_opts": ["-j8", "-l16"]
19 | },
20 | "workers": 1,
21 | "docker_host": "tcp://ci-host-01.gnuradio.org:2376"
22 | }],
23 | "Ubuntu_16_04_64":[{
24 | "image": "gnuradio/buildbot-worker:ubuntu-16.04",
25 | "properties":{
26 | "tasks": ["build"],
27 | "make_opts": ["-j8", "-l16"]
28 | },
29 | "workers": 1,
30 | "docker_host": "tcp://ci-host-01.gnuradio.org:2376"
31 | }],
32 | "Ubuntu_14_04_64":[{
33 | "image":"gnuradio/buildbot-worker:ubuntu-14.04",
34 | "properties":{
35 | "tasks": ["build"],
36 | "make_opts": ["-j8", "-l16"]
37 | },
38 | "workers": 1,
39 | "docker_host": "tcp://ci-host-01.gnuradio.org:2376"
40 | }],
41 | "Fedora_29":[{
42 | "image": "gnuradio/buildbot-worker:f29",
43 | "properties":{
44 | "tasks":["build"],
45 | "make_opts": ["-j8", "-l16"]
46 | },
47 | "workers": 1,
48 | "docker_host": "tcp://ci-host-02.gnuradio.org:2376"
49 | }],
50 | "Centos_7_6":[{
51 | "image": "gnuradio/buildbot-worker:centos-7.6",
52 | "properties":{
53 | "tasks":["build"],
54 | "make_opts": ["-j8", "-l16"]
55 | },
56 | "workers": 1,
57 | "docker_host": "tcp://ci-host-02.gnuradio.org:2376"
58 | }],
59 |
60 | "Controller":[{
61 | "image": "gnuradio/buildbot-worker:controller",
62 | "properties":{
63 | "tasks": ["control"]
64 | },
65 | "workers": 2
66 | }]
67 | }
68 | }
69 |
70 | }
71 |
--------------------------------------------------------------------------------
/gnuradio_buildbot/__init__.py:
--------------------------------------------------------------------------------
1 | # Copyright 2017 Andrej Rode
2 | #
3 | # This file is part of gnuradio-buildbot
4 | #
5 | # gnuradio-buildbot is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 3, or (at your option)
8 | # any later version.
9 | #
10 | # gnuradio-buildbot is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with GNU Radio; see the file COPYING. If not, write to
17 | # the Free Software Foundation, Inc., 51 Franklin Street,
18 | # Boston, MA 02110-1301, USA.
19 | #
20 | from . import workers
21 |
--------------------------------------------------------------------------------
/gnuradio_buildbot/custom_steps.py:
--------------------------------------------------------------------------------
1 | # Copyright 2017 Andrej Rode
2 | #
3 | # This file is part of gnuradio-buildbot
4 | #
5 | # gnuradio-buildbot is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 3, or (at your option)
8 | # any later version.
9 | #
10 | # gnuradio-buildbot is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with GNU Radio; see the file COPYING. If not, write to
17 | # the Free Software Foundation, Inc., 51 Franklin Street,
18 | # Boston, MA 02110-1301, USA.
19 | #
20 |
21 | from buildbot.plugins import steps
22 |
23 | from six import iteritems
24 | import copy
25 | import os
26 |
27 |
28 | def join_dicts(old_dict, new_dict):
29 | """
30 | This function joins new values from a new_dict into an older dict
31 | - dicts will be updated
32 | - lists will be appended
33 | - unavailable keys will be added
34 | - existing entries (not list or dicts) will raise an error
35 | """
36 | for k, v in iteritems(new_dict):
37 | old_v = old_dict.get(k, None)
38 | if old_v is None:
39 | old_dict.update({k: v})
40 | elif type(old_v) is not type(v):
41 | raise Exception("dicts have mismatching value type")
42 | elif isinstance(v, dict):
43 | new_v = {}
44 | new_v.update(old_v)
45 | new_v.update(v)
46 | old_dict.update({k: new_v})
47 | elif isinstance(v, list):
48 | old_dict.update({k: old_v + v})
49 | else:
50 | raise Exception("entry {} is already in the dict and not a dict or list".format(
51 | k))
52 |
53 |
54 | class BuildTrigger(steps.Trigger):
55 | renderables = ["src_base"]
56 |
57 | def __init__(self,
58 | src_base="/tmp/src",
59 | build_config=None,
60 | runner="pull",
61 | **kwargs):
62 | """
63 | branch_config is a dict with the key branches
64 | listing the test branches in ascending order
65 | and branch names as key with a list of important merges
66 | """
67 | if build_config is None:
68 | raise Exception("build_config must contain build definition")
69 | self.build_config = build_config
70 | self.test_branches = self.build_config.get("builders").keys()
71 | self.src_base = src_base
72 | self.runner = runner
73 | super(BuildTrigger, self).__init__(**kwargs)
74 |
75 | def getSchedulersAndProperties(self):
76 | """
77 | """
78 | scheds = []
79 | for branch in self.test_branches:
80 | branch_config = self.build_config["builders"][branch]
81 | # only test this if we want to test for merges
82 | # test if the branch to build corresponds
83 | # to the current branch config
84 | if not (self.build.getProperty("branch", "") == branch or self.set_properties.get("pr_base", "") == branch):
85 | continue
86 | for build in branch_config.get("builds", ()):
87 | if self.runner not in build.get("runners", ()):
88 | continue
89 | props = copy.deepcopy(self.set_properties)
90 | opts = build.get("opts", ())
91 | build_scheds = build.get("scheds", ())
92 | join_dicts(props, build.get("properties", {}))
93 | for opt in opts:
94 | join_dicts(props, self.build_config["buildopts"][opt].get(
95 | "properties", {}))
96 | props.update({
97 | "virtual_builder_tags":
98 | tuple(props.get("virtual_builder_tags", ())) + (branch, ),
99 | "status_branch":
100 | branch,
101 | })
102 | if self.runner == "pull":
103 | props.update({
104 | "src_dir":
105 | os.path.join(props.get("src_dir", ""), branch)
106 | })
107 | for sched in build_scheds:
108 | s_props = copy.deepcopy(props)
109 | virtual_name = "_".join((sched, ) + tuple(
110 | s_props.get("virtual_builder_tags", ())))
111 | s_props.update({"virtual_builder_name": virtual_name})
112 | scheds.append({
113 | "sched_name": "trigger_" + sched,
114 | "props_to_set": s_props,
115 | "unimportant": False
116 | })
117 | return scheds
118 |
--------------------------------------------------------------------------------
/gnuradio_buildbot/sequences.py:
--------------------------------------------------------------------------------
1 | # Copyright 2017 Andrej Rode
2 | #
3 | # This file is part of gnuradio-buildbot
4 | #
5 | # gnuradio-buildbot is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 3, or (at your option)
8 | # any later version.
9 | #
10 | # gnuradio-buildbot is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with GNU Radio; see the file COPYING. If not, write to
17 | # the Free Software Foundation, Inc., 51 Franklin Street,
18 | # Boston, MA 02110-1301, USA.
19 | #
20 |
21 | from buildbot.plugins import steps
22 | from buildbot.plugins import util
23 |
24 | from buildbot.process.results import SUCCESS
25 | from buildbot.process.results import SKIPPED
26 | import os
27 |
28 |
29 | def mergeability_sequence(branch, prev_branch, src_base):
30 | def condition(step):
31 | return step.getProperty("merge_"+prev_branch, False)
32 |
33 | fetch_base = steps.ShellCommand(
34 | name="fetch "+branch+" from upstream",
35 | command=[
36 | "git", "fetch", "-t", util.Property("repository"), branch
37 | ],
38 | workdir="src",
39 | hideStepIf=lambda results, s: results == SKIPPED or results == SUCCESS,
40 | doStepIf=condition
41 | )
42 |
43 | create_new_worktree = steps.ShellCommand(
44 | name="checkout test_merge_"+branch+" branch",
45 | command=[
46 | "git", "checkout", "-B", "test_merge_"+branch, "FETCH_HEAD"
47 | ],
48 | workdir="src",
49 | hideStepIf=lambda results, s: results == SKIPPED,
50 | doStepIf=condition
51 | )
52 |
53 | merge_new_changes = steps.ShellCommand(
54 | name="merge test_merge_"+prev_branch+" into test_merge_"+branch,
55 | command=[
56 | "git", "merge", "--no-edit", "test_merge_"+prev_branch
57 | ],
58 | flunkOnFailure=False,
59 | workdir="src",
60 | hideStepIf=lambda results, s: results == SKIPPED,
61 | doStepIf=condition
62 | )
63 |
64 | @util.renderer
65 | def set_merge_prop(step):
66 | if step.build.executedSteps[-2].results == SUCCESS:
67 | return True
68 | return False
69 |
70 | set_merge_property = steps.SetProperty(
71 | name="Set merge_"+branch+" to True if merge was successful",
72 | property="merge_"+branch,
73 | value=set_merge_prop,
74 | hideStepIf=lambda results, s: results == SKIPPED or results == SUCCESS,
75 | doStepIf=condition)
76 |
77 | sync_submodule = steps.ShellCommand(
78 | name="sync submodules on test_merge_"+branch,
79 | command=[
80 | "git", "submodule", "update", "--init", "--recursive"
81 | ],
82 | workdir="src",
83 | hideStepIf=lambda results, s: results == SKIPPED or results == SUCCESS,
84 | doStepIf=condition
85 | )
86 |
87 | make_src_base = steps.ShellCommand(
88 | name="create src_base directory for test_merge_"+branch,
89 | command=[
90 | "mkdir", "-p", util.Interpolate(
91 | os.path.join(src_base, "%(prop:github.number)s", branch))
92 | ],
93 | workdir="src",
94 | hideStepIf=lambda results, s: results == SKIPPED or results == SUCCESS,
95 | doStepIf=condition
96 | )
97 |
98 | copy_src = steps.ShellCommand(
99 | name="copy test_merge_"+branch+" src dir to common src dir",
100 | command=[
101 | "rsync", "--delete", "-rLz", "./",
102 | util.Interpolate(
103 | os.path.join(src_base, "%(prop:github.number)s", branch))
104 | ],
105 | workdir="src",
106 | hideStepIf=lambda results, s: results == SKIPPED or results == SUCCESS,
107 | doStepIf=condition,
108 | )
109 |
110 | result = []
111 | result.append(fetch_base)
112 | result.append(create_new_worktree)
113 | result.append(merge_new_changes)
114 | result.append(set_merge_property)
115 | result.append(sync_submodule)
116 | result.append(make_src_base)
117 | result.append(copy_src)
118 | return result
119 |
--------------------------------------------------------------------------------
/gnuradio_buildbot/workers.py:
--------------------------------------------------------------------------------
1 | # Copyright 2017 Andrej Rode
2 | #
3 | # This file is part of gnuradio-buildbot
4 | #
5 | # gnuradio-buildbot is free software; you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation; either version 3, or (at your option)
8 | # any later version.
9 | #
10 | # gnuradio-buildbot is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with GNU Radio; see the file COPYING. If not, write to
17 | # the Free Software Foundation, Inc., 51 Franklin Street,
18 | # Boston, MA 02110-1301, USA.
19 | #
20 |
21 | import json
22 | import os
23 |
24 | from buildbot.plugins import worker
25 | from builtins import range
26 | from six import iteritems
27 |
28 |
29 | class GRWorker(worker.Worker):
30 | def __init__(self, name, properties, *args, **kwargs):
31 | password = "grbuildbot"
32 | if kwargs.get("password", None) is not None:
33 | password = kwargs.pop("password")
34 | kwargs["properties"] = properties
35 |
36 | super(GRWorker, self).__init__(name, password, *args, **kwargs)
37 |
38 |
39 | class GRLatentWorker(worker.DockerLatentWorker):
40 | def __init__(self, name, image, properties, *args, **kwargs):
41 | password = "grbuildbot"
42 |
43 | kwargs["image"] = str(image)
44 |
45 | docker_host = "unix://var/run/docker.sock"
46 | kwargs.setdefault("docker_host", docker_host)
47 |
48 | kwargs.setdefault("autopull", True)
49 | kwargs.setdefault("alwaysPull", True)
50 |
51 | hostconfig = kwargs.get("hostconfig", {})
52 | hostconfig.setdefault(
53 | "network_mode", "bb-internal"
54 | )
55 | hostconfig.setdefault(
56 | "volumes_from", ["bb-data"]
57 | )
58 | hostconfig.setdefault(
59 | "sysctls", {"net.ipv6.conf.all.disable_ipv6": "0"}
60 | )
61 | kwargs["hostconfig"] = hostconfig
62 | kwargs["properties"] = properties
63 | kwargs["followStartupLogs"] = True
64 |
65 | super(GRLatentWorker, self).__init__(name, password, *args, **kwargs)
66 |
67 |
68 | def createWorkers(config_path):
69 | workers = []
70 | with open(config_path) as f:
71 | config_data = f.read()
72 | config_data = json.loads(config_data)
73 | master_fqdn = config_data.get("masterFQDN", None)
74 | worker_config = config_data.get("workers")
75 | for os_type, os_config in iteritems(worker_config):
76 | for os_flavour, flavour_config in iteritems(os_config):
77 | worker_count = 0
78 | for worker_config in flavour_config:
79 | for local_count in range(worker_config.get("workers", 1)):
80 | if worker_config.get("name", None) is None:
81 | name = "_".join([os_flavour, str(worker_count)])
82 | worker_count += 1
83 | else:
84 | name = "_".join([worker_config.get("name", None), str(local_count)])
85 | props = worker_config.get("properties", {})
86 | props.setdefault("os", os_type)
87 | props.setdefault("distro", os_flavour)
88 | props.setdefault("masterFQDN", master_fqdn)
89 | kwargs = {}
90 | if "image" in worker_config:
91 | if worker_config.get("docker_host", None) is not None:
92 | kwargs["docker_host"] = worker_config.get("docker_host")
93 | worker = GRLatentWorker(name, worker_config.get("image"), props, masterFQDN=master_fqdn, **kwargs)
94 | else:
95 | kwargs["password"] = worker_config.get("password", None)
96 | worker = GRWorker(name, props, **kwargs)
97 | workers.append(worker)
98 | return workers
99 |
--------------------------------------------------------------------------------
/master.cfg:
--------------------------------------------------------------------------------
1 | # -*- python -*-
2 | # ex: set filetype=python:
3 |
4 | import os
5 |
6 | from buildbot.plugins import changes
7 | from buildbot.plugins import util
8 |
9 | import config_module
10 |
11 | # This is a sample buildmaster config file. It must be installed as
12 | # 'master.cfg' in your buildmaster's base directory.
13 |
14 | # This is the dictionary that the buildmaster pays attention to. We also use
15 | # a shorter alias to save typing.
16 | c = BuildmasterConfig = {}
17 | c['buildbotNetUsageData'] = 'basic'
18 | c['collapseRequests'] = False
19 |
20 | ####### WORKERS
21 |
22 | # The 'workers' list defines the set of recognized workers. Each element is
23 | # a Worker object, specifying a unique worker name and password. The same
24 | # worker name and password must be configured on the worker.
25 |
26 | c['workers'] = config_module.workers
27 |
28 | # 'protocols' contains information about protocols which master will use for
29 | # communicating with workers. You must define at least 'port' option that workers
30 | # could connect to your master with this protocol.
31 | # 'port' must match the value configured into the workers (with their
32 | # --master option)
33 | c['protocols'] = {'pb': {'port': os.environ.get("BUILDBOT_WORKER_PORT", 9989)}}
34 |
35 | ####### CHANGESOURCES
36 |
37 | # the 'change_source' setting tells the buildmaster how it should find out
38 | # about source code changes. Here we point to the buildbot clone of pyflakes.
39 |
40 | # c['change_source'] = []
41 | # c['change_source'].append(
42 | # changes.GitHubPullrequestPoller(
43 | # "gnuradio",
44 | # "gnuradio",
45 | # branches=["maint", "master", "next", "python3"],
46 | # pollInterval=5 * 60,
47 | # token=os.environ.get("BUILDBOT_ACCESS_TOKEN", None),
48 | # category="pulls",
49 | # repository_type="https",
50 | # pollAtLaunch=True,
51 | # magic_link=True, ))
52 |
53 | c['builders'] = config_module.builders.get(c["workers"])
54 |
55 | ####### SCHEDULERS
56 |
57 | # Configure the Schedulers, which decide how to react to incoming changes. In this
58 | # case, just kick off a 'runtests' build
59 |
60 | c['schedulers'] = config_module.schedulers.get(c["builders"])
61 |
62 | ####### STATUS TARGETS
63 |
64 | # 'status' is a list of Status Targets. The results of each build will be
65 | # pushed to these targets. buildbot/status/*.py has a variety to choose from,
66 | # like IRC bots.
67 |
68 | c['services'] = []
69 | reporters = config_module.reporters.get()
70 | c['services'].extend(reporters)
71 |
72 | ####### PROJECT IDENTITY
73 |
74 | # the 'title' string will appear at the top of this buildbot installation's
75 | # home pages (linked to the 'titleURL').
76 |
77 | c['title'] = "GNU Radio"
78 | c['titleURL'] = "https://www.gnuradio.org"
79 |
80 | # the 'buildbotURL' string should point to the location where the buildbot's
81 | # internal web server is visible. This typically uses the port number set in
82 | # the 'www' entry below, but with an externally-visible host name which the
83 | # buildbot cannot figure out without some help.
84 |
85 | c['buildbotURL'] = os.environ.get("BUILDBOT_WEB_URL", "http://localhost:8010/")
86 |
87 | ####### Webinterface configuration
88 |
89 | authz = util.Authz(
90 | allowRules=[
91 | # util.AnyEndpointMatcher(role="admins"),
92 | util.AnyEndpointMatcher(
93 | role="admins", defaultDeny=False),
94 | util.AnyControlEndpointMatcher(
95 | role="admins"),
96 | ],
97 | roleMatchers=[
98 | util.RolesFromUsername(roles=["admins"], usernames=["noc0lour","jmcorgan"]),
99 | util.RolesFromGroups(),
100 | ]
101 |
102 | )
103 |
104 | PR_props=[
105 | "github.base.ref",
106 | "github.number",
107 | "github.mergeable",
108 |
109 | ]
110 |
111 | c['www'] = {
112 | "allowed_origins": ["*"],
113 | "port": int(os.environ.get("BUILDBOT_WEB_PORT", 8010)),
114 | "auth": util.GitHubAuth(
115 | os.environ.get("BUILDBOT_OAUTH_CLIENT", ""),
116 | os.environ.get("BUILDBOT_OAUTH_KEY", "")),
117 | "authz": authz,
118 | "plugins": {
119 | "waterfall_view": {},
120 | "console_view": {}
121 | },
122 | "change_hook_dialects": {
123 | "github": {
124 | "secret": os.environ.get("BUILDBOT_HOOK_SECRET"),
125 | "strict": True,
126 | "github_property_whitelist": PR_props
127 | }
128 | }
129 | }
130 |
131 | ####### DB URL
132 |
133 | c['db'] = {
134 | # This specifies what database buildbot uses to store its state. You can leave
135 | # this at its default for all but the largest installations.
136 | 'db_url':
137 | os.environ.get("BUILDBOT_DB_URL", "sqlite://").format(**os.environ),
138 | }
139 |
--------------------------------------------------------------------------------
/master/Dockerfile:
--------------------------------------------------------------------------------
1 | # andrej/buildbot-master
2 |
3 | # please follow docker best practices
4 | # https://docs.docker.com/engine/userguide/eng-image/dockerfile_best-practices/
5 | #
6 | # Provides a base alpine 3.11 image with latest buildbot master installed
7 | # Alpine base build is ~130MB vs ~500MB for the ubuntu build
8 |
9 | # Note that the UI and worker packages are the latest version published on pypi
10 | # This is to avoid pulling node inside this container
11 |
12 | FROM alpine:3.11
13 | MAINTAINER Andrej Rode
14 |
15 | # Last build date - this can be updated whenever there are security updates so
16 | # that everything is rebuilt
17 | ENV security_updates_as_of 2020-01-11
18 |
19 |
20 | # We install as much as possible python packages from the distro in order to avoid
21 | # having to pull gcc for building native extensions
22 | # Some packages are at the moment (10/2016) only available on @testing
23 | RUN \
24 | echo @testing http://dl-cdn.alpinelinux.org/alpine/edge/testing >> /etc/apk/repositories && \
25 | echo @edge http://dl-cdn.alpinelinux.org/alpine/edge/main >> /etc/apk/repositories && \
26 | echo @community http://dl-cdn.alpinelinux.org/alpine/edge/community >> /etc/apk/repositories && \
27 | apk add --no-cache \
28 | git \
29 | python3 \
30 | py3-psycopg2 \
31 | py3-cffi \
32 | py3-cryptography \
33 | py3-requests \
34 | py3-openssl@edge \
35 | py3-cryptography@edge \
36 | py3-service_identity@community \
37 | py3-sqlalchemy@community \
38 | gosu@testing \
39 | dumb-init@community\
40 | py3-jinja2 \
41 | docker-py@community \
42 | gcc \
43 | python3-dev \
44 | musl-dev \
45 | tar \
46 | curl
47 | # install pip dependencies
48 | RUN pip3 install docker-pycreds backports.ssl_match_hostname && \
49 | pip3 install --upgrade pip setuptools && \
50 | pip3 install --upgrade "twisted" "txrequests" && \
51 | rm -r /root/.cache
52 |
53 | #RUN pip3 install "buildbot[bundle,tls]"
54 | RUN BUILDBOT_VERSION="2.9.2" pip3 install buildbot-grid-view buildbot-waterfall-view "buildbot[bundle,tls] @ git+https://github.com/noc0lour/buildbot@add_pullOnDemand#egg=buildbot&subdirectory=master"
55 |
56 | WORKDIR /var/lib/buildbot
57 | CMD ["dumb-init", "/var/lib/buildbot/start_buildbot.sh"]
58 |
--------------------------------------------------------------------------------
/master/bb.env:
--------------------------------------------------------------------------------
1 | # Put your sekrits in here and don't check it in again
2 | BUILDBOT_OAUTH_CLIENT=$OAUTH_CLIENT
3 | BUILDBOT_OAUTH_KEY=$OAUTH_KEY
4 | BUILDBOT_ACCESS_TOKEN=$PERSONAL_ACCESS_TOKEN
5 | BUILDBOT_SRC_BASE=/data/src
6 | BUILDBOT_WEB_PORT=8010
7 | BUILDBOT_WEB_URL=http://localhost:8010/
8 |
--------------------------------------------------------------------------------
/master/db.env:
--------------------------------------------------------------------------------
1 | # database parameters are shared between containers
2 | POSTGRES_PASSWORD=change_me
3 | POSTGRES_USER=buildbot
4 | POSTGRES_DB=buildbot
5 | # in master.cfg, this variable is str.format()ed with the environment variables
6 | BUILDBOT_DB_URL=postgresql+psycopg2://{POSTGRES_USER}:{POSTGRES_PASSWORD}@db/{POSTGRES_DB}
7 |
--------------------------------------------------------------------------------
/master/docker-compose.yml:
--------------------------------------------------------------------------------
1 | version: '2'
2 | services:
3 | buildbot:
4 | hostname: bb-master
5 | container_name: bb-master
6 | image: gnuradio/gnuradio-buildbot-master:latest
7 | env_file:
8 | - db.env
9 | - bb.env
10 | environment:
11 | - BUILDBOT_WORKER_PORT=9989
12 | - BUILDBOT_WEB_URL=http://localhost:8010/
13 | - BUILDBOT_WEB_PORT=8010
14 | - BUILDBOT_SRC_BASE=/data/src
15 | links:
16 | - bb-db
17 | depends_on:
18 | - bb-db
19 | - bb-data
20 | ports:
21 | - "8010:8010"
22 | - "9989:9989"
23 | volumes:
24 | - /var/run/docker.sock:/var/run/docker.sock
25 | - /data/src:/data/src
26 | - ../master.cfg:/var/lib/buildbot/master.cfg:ro
27 | - ../buildbot.tac:/var/lib/buildbot/buildbot.tac
28 | - ../start_buildbot.sh:/var/lib/buildbot/start_buildbot.sh
29 | - ../config_module:/var/lib/buildbot/config_module:ro
30 | - ../gnuradio_buildbot:/var/lib/buildbot/gnuradio_buildbot:ro
31 | networks:
32 | bb-db:
33 | aliases:
34 | - master
35 | bb-internal:
36 | aliases:
37 | - master
38 | bb-db:
39 | container_name: bb-db
40 | env_file:
41 | - db.env
42 | image: "postgres:9.4"
43 | expose:
44 | - 5432
45 | networks:
46 | bb-db:
47 | aliases:
48 | - db
49 | bb-data:
50 | container_name: bb-data
51 | image: "alpine:3.8"
52 | command: echo 'Data-only container'
53 | volumes:
54 | - /tmp/bb/data:/data
55 | - ../data:/config
56 | - /tmp/cache/:/cache
57 | - /tmp/coverity/coverity:/coverity:ro
58 |
59 | networks:
60 | bb-internal:
61 | external:
62 | name: bb-internal
63 | bb-db:
64 |
--------------------------------------------------------------------------------
/start_buildbot.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | B=`pwd`
4 | until buildbot upgrade-master $B
5 | do
6 | echo "Can't upgrade master yet. Waiting for database ready?"
7 | sleep 1
8 | done
9 | exec twistd -ny $B/buildbot.tac
10 |
--------------------------------------------------------------------------------
/worker/.gitconfig:
--------------------------------------------------------------------------------
1 | [user]
2 | email = buildbot@gnuradio.org
3 | name = Buildbot CI
4 |
--------------------------------------------------------------------------------
/worker/buildbot.tac:
--------------------------------------------------------------------------------
1 | import fnmatch
2 | import os
3 | import sys
4 |
5 | from twisted.application import service
6 | from twisted.python.log import FileLogObserver
7 | from twisted.python.log import ILogObserver
8 |
9 | from buildbot_worker.bot import Worker
10 |
11 | # setup worker
12 | application = service.Application('buildbot-worker')
13 |
14 |
15 | application.setComponent(ILogObserver, FileLogObserver(sys.stdout).emit)
16 | # and worker on the same process!
17 | buildmaster_host = os.environ.get("BUILDMASTER", 'localhost')
18 | port = int(os.environ.get("BUILDMASTER_PORT", 9989))
19 | workername = os.environ.get("WORKERNAME", 'docker')
20 | passwd = os.environ.get("WORKERPASS")
21 |
22 | basedir = os.path.join("/cache", "workdir", workername)
23 | if not os.path.exists(basedir):
24 | os.makedirs(basedir)
25 |
26 | # delete the password from the environ so that it is not leaked in the log
27 | blacklist = os.environ.get("WORKER_ENVIRONMENT_BLACKLIST", "WORKERPASS").split()
28 | for name in list(os.environ.keys()):
29 | for toremove in blacklist:
30 | if fnmatch.fnmatch(name, toremove):
31 | del os.environ[name]
32 |
33 | keepalive = 600
34 | umask = None
35 | maxdelay = 300
36 | allow_shutdown = None
37 |
38 | s = Worker(buildmaster_host, port, workername, passwd, basedir,
39 | keepalive, umask=umask, maxdelay=maxdelay,
40 | allow_shutdown=allow_shutdown)
41 | s.setServiceParent(application)
--------------------------------------------------------------------------------
/worker/centos-7.6.Dockerfile:
--------------------------------------------------------------------------------
1 | FROM centos:7.6.1810
2 | MAINTAINER Andrej Rode
3 |
4 | ENV security_updates_as_of 2018-12-04
5 |
6 | # enable EPEL for all the newer crazy stuff
7 | # like CMake 3
8 | RUN yum install epel-release -y -q && \
9 | # get the new packages from EPEL
10 | yum --enablerepo=epel check-update -y; \
11 | yum install -y \
12 | # General building
13 | ccache \
14 | cmake3 \
15 | make \
16 | swig3 \
17 | gcc \
18 | gcc-c++ \
19 | python36-pip \
20 | shadow-utils \
21 | openssl-devel \
22 | # Build infrastructure
23 | boost-devel \
24 | python36-devel \
25 | python-devel \
26 | cppunit-devel \
27 | # Documentation
28 | doxygen \
29 | doxygen-latex \
30 | graphviz \
31 | python2-sphinx \
32 | # Math libraries
33 | fftw-devel \
34 | gsl-devel \
35 | numpy \
36 | scipy \
37 | python36-scipy \
38 | gmp-devel \
39 | # IO libraries
40 | SDL-devel \
41 | alsa-lib-devel \
42 | portaudio-devel \
43 | cppzmq-devel \
44 | python-zmq \
45 | python36-zmq \
46 | uhd-devel \
47 | # ctrlport - thrift
48 | thrift \
49 | thrift-devel \
50 | # GUI libraries
51 | xdg-utils \
52 | python-lxml \
53 | python36-lxml \
54 | python-cheetah \
55 | pygtk2-devel \
56 | desktop-file-utils \
57 | python-mako \
58 | log4cpp-devel \
59 | qt5-qtbase-devel \
60 | python36-qt5 \
61 | python36-pyqt5-sip \
62 | qwt-devel \
63 | # GRC/next
64 | PyYAML \
65 | python36-PyYAML \
66 | gtk3 \
67 | python-gobject \
68 | python36-gobject \
69 | pycairo \
70 | python36-cairo \
71 | pango \
72 | && \
73 | yum clean all && \
74 | rm /usr/bin/python3 && \
75 | ln -s /usr/bin/python3.6 /usr/bin/python3
76 | # download all the source RPMs we'll build later
77 | RUN cd && \
78 | # symlink cmake3 and ctest3 to cmake / ctest
79 | cd /usr/bin && \
80 | ln -s ctest3 ctest && \
81 | ln -s cmake3 cmake && \
82 | yum clean all && \
83 | pip3 --no-cache-dir install 'mako' && \
84 | # Test runs produce a great quantity of dead grandchild processes. In a
85 | # non-docker environment, these are automatically reaped by init (process 1),
86 | # so we need to simulate that here. See https://github.com/Yelp/dumb-init
87 | curl -Lo /usr/local/bin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.1.3/dumb-init_1.1.3_amd64 && \
88 | chmod +x /usr/local/bin/dumb-init
89 |
90 | COPY buildbot.tac /buildbot/buildbot.tac
91 |
92 | # Install required python packages, and twisted
93 | RUN pip3 --no-cache-dir install \
94 | 'buildbot-worker' \
95 | 'twisted[tls]' && \
96 | useradd -u 2017 -ms /bin/bash buildbot && chown -R buildbot /buildbot && \
97 | echo "max_size = 20G" > /etc/ccache.conf
98 |
99 | RUN mkdir -p /src/volk && \
100 | cd /src && \
101 | curl -Lo volk.tar.gz https://github.com/gnuradio/volk/archive/v2.1.0.tar.gz && \
102 | tar xzf volk.tar.gz -C volk --strip-components=1 && \
103 | cmake -DCMAKE_BUILD_TYPE=Release -S ./volk/ -B build && \
104 | cd build && \
105 | cmake --build . && \
106 | cmake --build . --target install && \
107 | cd / && \
108 | rm -rf /src/volk && \
109 | rm -rf /src/build
110 |
111 | RUN mkdir -p /src/pybind11 && \
112 | cd /src && \
113 | curl -Lo pybind11.tar.gz https://github.com/pybind/pybind11/archive/v2.4.3.tar.gz && \
114 | tar xzf pybind11.tar.gz -C pybind11 --strip-components=1 && \
115 | mkdir build && \
116 | cd build && \
117 | cmake -DCMAKE_BUILD_TYPE=Release -DPYBIND11_TEST=OFF ../pybind11/ && \
118 | make && \
119 | make install && \
120 | cd / && \
121 | rm -rf /src/pybind11 && \
122 | rm -rf /src/build
123 |
124 | USER buildbot
125 |
126 | WORKDIR /buildbot
127 |
128 | CMD ["/usr/local/bin/dumb-init", "twistd", "-ny", "buildbot.tac"]
129 |
--------------------------------------------------------------------------------
/worker/controller.Dockerfile:
--------------------------------------------------------------------------------
1 | # noc0lour/gnuradio-buildbot-worker:controller
2 |
3 | # please follow docker best practices
4 | # https://docs.docker.com/engine/userguide/eng-image/dockerfile_best-practices/
5 | #
6 | # Provides a base alpine 3.4 image with latest buildbot master installed
7 | # Alpine base build is ~130MB vs ~500MB for the ubuntu build
8 |
9 | # Note that the UI and worker packages are the latest version published on pypi
10 | # This is to avoid pulling node inside this container
11 |
12 | FROM alpine:3.9
13 | MAINTAINER Andrej Rode
14 |
15 | # Last build date - this can be updated whenever there are security updates so
16 | # that everything is rebuilt
17 | ENV security_updates_as_of 2019-03-31
18 |
19 |
20 | # We install as much as possible python packages from the distro in order to avoid
21 | # having to pull gcc for building native extensions
22 | # Some packages are at the moment (10/2016) only available on @testing
23 | RUN \
24 | echo @testing http://nl.alpinelinux.org/alpine/edge/testing >> /etc/apk/repositories && \
25 | echo @edge http://nl.alpinelinux.org/alpine/edge/community >> /etc/apk/repositories && \
26 | apk add --no-cache \
27 | git \
28 | python3 \
29 | py3-requests \
30 | py3-openssl@edge \
31 | py3-cryptography@edge \
32 | py3-service_identity@edge \
33 | dumb-init@edge\
34 | gcc \
35 | musl-dev \
36 | python3-dev \
37 | rsync \
38 | tar \
39 | xz
40 |
41 | COPY buildbot.tac /buildbot/buildbot.tac
42 | COPY .gitconfig /buildbot/.gitconfig
43 |
44 | # Upgrade pip and setuptools
45 | RUN pip3 install --upgrade pip setuptools
46 |
47 | #Install dependencies
48 | RUN pip3 install docker-pycreds backports.ssl_match_hostname && \
49 | pip3 install --upgrade "twisted" "txrequests" && \
50 | pip3 install "buildbot-worker" && \
51 | adduser -D -u 2017 -s /bin/bash -h /buildbot buildbot && chown -R buildbot /buildbot && \
52 | rm -r /root/.cache
53 |
54 | USER buildbot
55 |
56 | WORKDIR /buildbot
57 |
58 | CMD ["dumb-init", "twistd", "-ny", "buildbot.tac"]
59 |
--------------------------------------------------------------------------------
/worker/debian-10.Dockerfile:
--------------------------------------------------------------------------------
1 | FROM debian:buster
2 | MAINTAINER Andrej Rode
3 |
4 | ENV security_updates_as_of 2020-04-07
5 |
6 | RUN apt-get update -q \
7 | && apt-get -y upgrade
8 |
9 | # CPP deps
10 | RUN DEBIAN_FRONTEND=noninteractive \
11 | apt-get install -qy \
12 | libasound2 \
13 | libboost-date-time1.67.0 \
14 | libboost-filesystem1.67.0 \
15 | libboost-program-options1.67.0 \
16 | libboost-thread1.67.0 \
17 | libcomedi0 \
18 | libfftw3-bin \
19 | libgmp10 \
20 | libgsl23 \
21 | libgtk-3-0 \
22 | libjack-jackd2-0 \
23 | liblog4cpp5v5 \
24 | libpangocairo-1.0-0 \
25 | libportaudio2 \
26 | libqwt6abi1 \
27 | libsdl-image1.2 \
28 | libsndfile1-dev \
29 | libuhd3.13.1 \
30 | libusb-1.0-0 \
31 | libzmq5 \
32 | libpango-1.0-0 \
33 | gir1.2-gtk-3.0 \
34 | gir1.2-pango-1.0 \
35 | pkg-config \
36 | --no-install-recommends \
37 | && apt-get clean
38 |
39 | # Py deps
40 | RUN DEBIAN_FRONTEND=noninteractive \
41 | apt-get install -qy \
42 | python-cheetah \
43 | python-click \
44 | python-click-plugins \
45 | python-dev \
46 | python-gi \
47 | python-gi-cairo \
48 | python-gtk2 \
49 | python-lxml \
50 | python-mako \
51 | python-numpy \
52 | python-opengl \
53 | python-qt4 \
54 | python-pyqt5 \
55 | python-wxgtk3.0 \
56 | python-yaml \
57 | python-zmq \
58 | --no-install-recommends \
59 | && apt-get clean
60 |
61 | # Py3 deps
62 | RUN DEBIAN_FRONTEND=noninteractive \
63 | apt-get install -qy \
64 | python3-click \
65 | python3-click-plugins \
66 | python3-mako \
67 | python3-dev \
68 | python3-gi \
69 | python3-gi-cairo \
70 | python3-lxml \
71 | python3-numpy \
72 | python3-opengl \
73 | python3-pyqt5 \
74 | python-wxgtk3.0 \
75 | python3-yaml \
76 | python3-zmq \
77 | python-six \
78 | python3-six \
79 | --no-install-recommends \
80 | && apt-get clean
81 |
82 | # Build deps
83 | RUN DEBIAN_FRONTEND=noninteractive apt-get install -y \
84 | --no-install-recommends \
85 | build-essential \
86 | ccache \
87 | cmake \
88 | libboost-date-time-dev \
89 | libboost-dev \
90 | libboost-filesystem-dev \
91 | libboost-program-options-dev \
92 | libboost-regex-dev \
93 | libboost-system-dev \
94 | libboost-test-dev \
95 | libboost-thread-dev \
96 | libcomedi-dev \
97 | libcppunit-dev \
98 | libfftw3-dev \
99 | libgmp-dev \
100 | libgsl0-dev \
101 | liblog4cpp5-dev \
102 | libqt4-dev \
103 | libqwt-dev \
104 | libqwt5-qt4 \
105 | libqwt-qt5-dev \
106 | qtbase5-dev \
107 | libsdl1.2-dev \
108 | libuhd-dev \
109 | libusb-1.0-0-dev \
110 | libzmq3-dev \
111 | libgsm1-dev \
112 | libcodec2-dev \
113 | portaudio19-dev \
114 | pyqt4-dev-tools \
115 | pyqt5-dev-tools \
116 | python-cheetah \
117 | python-sphinx \
118 | doxygen \
119 | doxygen-latex \
120 | swig \
121 | && ln -s /usr/bin/ccache /usr/lib/ccache/cc \
122 | && ln -s /usr/bin/ccache /usr/lib/ccache/c++
123 |
124 | # Testing deps
125 | RUN DEBIAN_FRONTEND=noninteractive \
126 | apt-get install -qy \
127 | xvfb \
128 | lcov \
129 | python3-scipy \
130 | python-scipy \
131 | --no-install-recommends \
132 | && apt-get clean
133 |
134 |
135 | # Buildbot worker
136 | # Copy worker configuration
137 |
138 | COPY buildbot.tac /buildbot/buildbot.tac
139 |
140 | # Install buildbot dependencies
141 | RUN apt-get -y install -q \
142 | git \
143 | subversion \
144 | libffi-dev \
145 | libssl-dev \
146 | python3-pip \
147 | curl
148 |
149 | # Test runs produce a great quantity of dead grandchild processes. In a
150 | # non-docker environment, these are automatically reaped by init (process 1),
151 | # so we need to simulate that here. See https://github.com/Yelp/dumb-init
152 | RUN curl -Lo /usr/local/bin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.1.3/dumb-init_1.1.3_amd64 && \
153 | chmod +x /usr/local/bin/dumb-init && \
154 | # ubuntu pip version has issues so we should upgrade it: https://github.com/pypa/pip/pull/3287
155 | pip3 install -U pip virtualenv
156 | # Install required python packages, and twisted
157 | RUN pip3 --no-cache-dir install \
158 | 'twisted[tls]' \
159 | 'buildbot_worker' \
160 | 'xvfbwrapper' && \
161 | useradd -u 2017 -ms /bin/bash buildbot && chown -R buildbot /buildbot && \
162 | echo "max_size = 20G" > /etc/ccache.conf
163 |
164 | RUN rm -rf /var/lib/apt/*
165 |
166 | RUN mkdir -p /src/volk && cd /src && curl -Lo volk.tar.gz https://github.com/gnuradio/volk/archive/v2.1.0.tar.gz && tar xzf volk.tar.gz -C volk --strip-components=1 && cmake -DCMAKE_BUILD_TYPE=Release -S ./volk/ -B build && cd build && cmake --build . && cmake --build . --target install && cd / && rm -rf /src/volk && rm -rf /src/build
167 |
168 | RUN mkdir -p /src/pybind11 && cd /src && curl -Lo pybind11.tar.gz https://github.com/pybind/pybind11/archive/v2.4.3.tar.gz && tar xzf pybind11.tar.gz -C pybind11 --strip-components=1 && mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Release -DPYBIND11_TEST=OFF ../pybind11/ && make && make install && cd / && rm -rf /src/pybind11 && rm -rf /src/build
169 |
170 | USER buildbot
171 | WORKDIR /buildbot
172 |
173 | CMD ["/usr/local/bin/dumb-init", "twistd", "-ny", "buildbot.tac"]
174 |
--------------------------------------------------------------------------------
/worker/debian-11.Dockerfile:
--------------------------------------------------------------------------------
1 | FROM debian:bullseye
2 | MAINTAINER Andrej Rode
3 |
4 | ENV security_updates_as_of 2020-12-19
5 |
6 | RUN apt-get update -q \
7 | && apt-get -y upgrade
8 |
9 | # CPP deps
10 | RUN DEBIAN_FRONTEND=noninteractive \
11 | apt-get install -qy \
12 | libasound2 \
13 | libfftw3-bin \
14 | libgmp10 \
15 | libgsl25 \
16 | libgtk-3-0 \
17 | libjack-jackd2-0 \
18 | liblog4cpp5v5 \
19 | libpangocairo-1.0-0 \
20 | libportaudio2 \
21 | libqwt-qt5-6 \
22 | libsdl-image1.2 \
23 | libsndfile1-dev \
24 | libuhd3.15.0 \
25 | libzmq5 \
26 | libpango-1.0-0 \
27 | gir1.2-gtk-3.0 \
28 | gir1.2-pango-1.0 \
29 | pkg-config \
30 | --no-install-recommends \
31 | && apt-get clean
32 |
33 | # Py3 deps
34 | RUN DEBIAN_FRONTEND=noninteractive \
35 | apt-get install -qy \
36 | python3-click \
37 | python3-click-plugins \
38 | python3-mako \
39 | python3-dev \
40 | python3-gi \
41 | python3-gi-cairo \
42 | python3-lxml \
43 | python3-numpy \
44 | python3-opengl \
45 | python3-pyqt5 \
46 | python3-yaml \
47 | python3-zmq \
48 | python3-six \
49 | --no-install-recommends \
50 | && apt-get clean
51 |
52 | # Build deps
53 | RUN DEBIAN_FRONTEND=noninteractive apt-get install -y \
54 | --no-install-recommends \
55 | build-essential \
56 | ccache \
57 | cmake \
58 | libboost-date-time-dev \
59 | libboost-dev \
60 | libboost-filesystem-dev \
61 | libboost-program-options-dev \
62 | libboost-regex-dev \
63 | libboost-system-dev \
64 | libboost-test-dev \
65 | libboost-thread-dev \
66 | libcppunit-dev \
67 | libfftw3-dev \
68 | libgmp-dev \
69 | libgsl-dev \
70 | liblog4cpp5-dev \
71 | libqwt-qt5-dev \
72 | qtbase5-dev \
73 | libsdl1.2-dev \
74 | libuhd-dev \
75 | libusb-1.0-0-dev \
76 | libzmq3-dev \
77 | libgsm1-dev \
78 | libcodec2-dev \
79 | portaudio19-dev \
80 | pyqt5-dev-tools \
81 | python3-cheetah \
82 | python3-sphinx \
83 | doxygen \
84 | doxygen-latex \
85 | swig \
86 | pybind11-dev \
87 | && ln -s /usr/bin/ccache /usr/lib/ccache/cc \
88 | && ln -s /usr/bin/ccache /usr/lib/ccache/c++
89 |
90 | # Testing deps
91 | RUN DEBIAN_FRONTEND=noninteractive \
92 | apt-get install -qy \
93 | --no-install-recommends \
94 | xvfb \
95 | lcov \
96 | python3-scipy \
97 | && apt-get clean
98 |
99 |
100 | # Buildbot worker
101 | # Copy worker configuration
102 |
103 | COPY buildbot.tac /buildbot/buildbot.tac
104 |
105 | # Install buildbot dependencies
106 | RUN apt-get -y install -q \
107 | git \
108 | subversion \
109 | libffi-dev \
110 | libssl-dev \
111 | python3-pip \
112 | curl
113 |
114 | # Test runs produce a great quantity of dead grandchild processes. In a
115 | # non-docker environment, these are automatically reaped by init (process 1),
116 | # so we need to simulate that here. See https://github.com/Yelp/dumb-init
117 | RUN curl -Lo /usr/local/bin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.1.3/dumb-init_1.1.3_amd64 && \
118 | chmod +x /usr/local/bin/dumb-init && \
119 | # ubuntu pip version has issues so we should upgrade it: https://github.com/pypa/pip/pull/3287
120 | pip3 install -U pip virtualenv
121 | # Install required python packages, and twisted
122 | RUN pip3 --no-cache-dir install \
123 | 'twisted[tls]' \
124 | 'buildbot_worker' \
125 | 'xvfbwrapper' && \
126 | useradd -u 2017 -ms /bin/bash buildbot && chown -R buildbot /buildbot && \
127 | echo "max_size = 20G" > /etc/ccache.conf
128 |
129 | RUN rm -rf /var/lib/apt/*
130 |
131 | RUN mkdir -p /src/volk && \
132 | cd /src && \
133 | curl -Lo volk.tar.gz https://github.com/gnuradio/volk/releases/download/v2.4.1/volk-2.4.1.tar.gz && \
134 | tar xzf volk.tar.gz -C volk --strip-components=1 && \
135 | cmake -DCMAKE_BUILD_TYPE=Release -S ./volk/ -B build && \
136 | cd build && \
137 | cmake --build . && \
138 | cmake --build . --target install && \
139 | cd / && \
140 | rm -rf /src/volk && \
141 | rm -rf /src/build
142 |
143 | USER buildbot
144 | WORKDIR /buildbot
145 |
146 | CMD ["/usr/local/bin/dumb-init", "twistd", "-ny", "buildbot.tac"]
147 |
--------------------------------------------------------------------------------
/worker/debian-9.Dockerfile:
--------------------------------------------------------------------------------
1 | FROM debian:9
2 | MAINTAINER Andrej rode
3 |
4 | ENV security_updates_as_of 2019-05-14
5 |
6 | RUN apt-get update -q \
7 | && apt-get -y upgrade
8 |
9 | # CPP deps
10 | RUN DEBIAN_FRONTEND=noninteractive \
11 | apt-get install -qy \
12 | libasound2 \
13 | libboost-date-time1.62.0 \
14 | libboost-filesystem1.62.0 \
15 | libboost-program-options1.62.0 \
16 | libboost-thread1.62.0 \
17 | libcomedi0 \
18 | libfftw3-bin \
19 | libgmp10 \
20 | libgsl2 \
21 | libgtk-3-0 \
22 | libjack-jackd2-0 \
23 | liblog4cpp5v5 \
24 | libpangocairo-1.0-0 \
25 | libportaudio2 \
26 | libqwt6abi1 \
27 | libsdl-image1.2 \
28 | libuhd003 \
29 | libusb-1.0-0 \
30 | libzmq5 \
31 | libpango-1.0-0 \
32 | gir1.2-gtk-3.0 \
33 | gir1.2-pango-1.0 \
34 | pkg-config \
35 | --no-install-recommends \
36 | && apt-get clean
37 |
38 | # Py deps
39 | RUN DEBIAN_FRONTEND=noninteractive \
40 | apt-get install -qy \
41 | python-cheetah \
42 | python-click \
43 | python-click-plugins \
44 | python-dev \
45 | python-gi \
46 | python-gi-cairo \
47 | python-gtk2 \
48 | python-lxml \
49 | python-mako \
50 | python-numpy \
51 | python-opengl \
52 | python-qt4 \
53 | python-pyqt5 \
54 | python-wxgtk3.0 \
55 | python-yaml \
56 | python-zmq \
57 | python-click \
58 | python-click-plugins \
59 | --no-install-recommends \
60 | && apt-get clean
61 |
62 | # Py3 deps
63 | RUN DEBIAN_FRONTEND=noninteractive \
64 | apt-get install -qy \
65 | python3-click \
66 | python3-click-plugins \
67 | python3-mako \
68 | python3-dev \
69 | python3-gi \
70 | python3-gi-cairo \
71 | python3-lxml \
72 | python3-numpy \
73 | python3-opengl \
74 | python3-pyqt5 \
75 | python-wxgtk3.0 \
76 | python3-yaml \
77 | python3-zmq \
78 | python-six \
79 | python3-six \
80 | python3-click \
81 | python3-click-plugins \
82 | --no-install-recommends \
83 | && apt-get clean
84 |
85 | # Build deps
86 | RUN DEBIAN_FRONTEND=noninteractive apt-get install -y \
87 | --no-install-recommends \
88 | build-essential \
89 | ccache \
90 | cmake \
91 | libboost-date-time-dev \
92 | libboost-dev \
93 | libboost-filesystem-dev \
94 | libboost-program-options-dev \
95 | libboost-regex-dev \
96 | libboost-system-dev \
97 | libboost-test-dev \
98 | libboost-thread-dev \
99 | libcomedi-dev \
100 | libcppunit-dev \
101 | libfftw3-dev \
102 | libgmp-dev \
103 | libgsl0-dev \
104 | liblog4cpp5-dev \
105 | libqt4-dev \
106 | libqwt-dev \
107 | libqwt5-qt4 \
108 | libqwt-qt5-dev \
109 | qtbase5-dev \
110 | libsdl1.2-dev \
111 | libuhd-dev \
112 | libusb-1.0-0-dev \
113 | libzmq3-dev \
114 | portaudio19-dev \
115 | pyqt4-dev-tools \
116 | pyqt5-dev-tools \
117 | python-cheetah \
118 | python-sphinx \
119 | doxygen \
120 | doxygen-latex \
121 | swig \
122 | && ln -s /usr/bin/ccache /usr/lib/ccache/cc \
123 | && ln -s /usr/bin/ccache /usr/lib/ccache/c++
124 |
125 | # Testing deps
126 | RUN DEBIAN_FRONTEND=noninteractive \
127 | apt-get install -qy \
128 | xvfb \
129 | lcov \
130 | python3-scipy \
131 | python-scipy \
132 | --no-install-recommends \
133 | && apt-get clean
134 |
135 |
136 | # Buildbot worker
137 | # Copy worker configuration
138 |
139 | COPY buildbot.tac /buildbot/buildbot.tac
140 |
141 | # Install buildbot dependencies
142 | RUN apt-get -y install -q \
143 | git \
144 | subversion \
145 | libffi-dev \
146 | libssl-dev \
147 | python3-pip \
148 | curl
149 |
150 | # Test runs produce a great quantity of dead grandchild processes. In a
151 | # non-docker environment, these are automatically reaped by init (process 1),
152 | # so we need to simulate that here. See https://github.com/Yelp/dumb-init
153 | RUN curl -Lo /usr/local/bin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.1.3/dumb-init_1.1.3_amd64 && \
154 | chmod +x /usr/local/bin/dumb-init && \
155 | # ubuntu pip version has issues so we should upgrade it: https://github.com/pypa/pip/pull/3287
156 | pip3 install -U pip virtualenv
157 | # Install required python packages, and twisted
158 | RUN pip3 --no-cache-dir install \
159 | 'twisted[tls]' \
160 | 'buildbot_worker' \
161 | 'xvfbwrapper' && \
162 | useradd -u 2017 -ms /bin/bash buildbot && chown -R buildbot /buildbot && \
163 | echo "max_size = 20G" > /etc/ccache.conf
164 |
165 | RUN rm -rf /var/lib/apt/*
166 |
167 | USER buildbot
168 |
169 | WORKDIR /buildbot
170 |
171 | CMD ["/usr/local/bin/dumb-init", "twistd", "-ny", "buildbot.tac"]
172 |
--------------------------------------------------------------------------------
/worker/docker-compose.yml:
--------------------------------------------------------------------------------
1 | version: '2'
2 | services:
3 | worker_centos76:
4 | build:
5 | context: ./
6 | dockerfile: ./centos-7.6.Dockerfile
7 | image: noc0lour/gnuradio-buildbot-worker:centos-7.6
8 | container_name: worker_cos76
9 | worker_f30:
10 | build:
11 | context: ./
12 | dockerfile: ./fedora-30.Dockerfile
13 | image: noc0lour/gnuradio-buildbot-worker:f30
14 | container_name: worker_f30
15 | worker_f29:
16 | build:
17 | context: ./
18 | dockerfile: ./fedora-29.Dockerfile
19 | image: noc0lour/gnuradio-buildbot-worker:f29
20 | container_name: worker_f29
21 | worker_u1804:
22 | build:
23 | context: ./
24 | dockerfile: ./ubuntu-18.04.Dockerfile
25 | image: noc0lour/gnuradio-buildbot-worker:ubuntu-18.04
26 | container_name: worker_u1804
27 | worker_u1604:
28 | build:
29 | context: ./
30 | dockerfile: ./ubuntu-16.04.Dockerfile
31 | image: noc0lour/gnuradio-buildbot-worker:ubuntu-16.04
32 | container_name: worker_u1604
33 | worker_u1404:
34 | build:
35 | context: ./
36 | dockerfile: ./ubuntu-14.04.Dockerfile
37 | image: noc0lour/gnuradio-buildbot-worker:ubuntu-14.04
38 | container_name: worker_u1404
39 | worker_controller:
40 | build:
41 | context: ./
42 | dockerfile: ./controller.Dockerfile
43 | image: noc0lour/gnuradio-buildbot-worker:controller
44 | container_name: worker_controller
45 |
46 |
47 |
--------------------------------------------------------------------------------
/worker/fedora-29.Dockerfile:
--------------------------------------------------------------------------------
1 | FROM fedora:29
2 | MAINTAINER Andrej Rode
3 |
4 | ENV security_updates_as_of 2019-05-14
5 |
6 | RUN dnf install -y \
7 | # General building
8 | ccache \
9 | cmake \
10 | make \
11 | gcc \
12 | gcc-c++ \
13 | python3-pip \
14 | shadow-utils \
15 | xz \
16 | # Build infrastructure
17 | cmake \
18 | boost-devel \
19 | python3-devel \
20 | python-devel \
21 | swig \
22 | cppunit-devel \
23 | # Documentation
24 | doxygen \
25 | doxygen-latex \
26 | graphviz \
27 | python2-sphinx \
28 | # Math libraries
29 | fftw-devel \
30 | gsl-devel \
31 | numpy \
32 | scipy \
33 | python3-scipy \
34 | gmp-devel \
35 | # IO libraries
36 | SDL-devel \
37 | alsa-lib-devel \
38 | portaudio-devel \
39 | libsndfile-devel \
40 | # because fedora is too stupid to install dependencies
41 | jack-audio-connection-kit \
42 | cppzmq-devel \
43 | python-zmq \
44 | uhd-devel \
45 | ## Gnuradio deprecated gr-comedi
46 | ## http://gnuradio.org/redmine/issues/show/395
47 | comedilib-devel \
48 | ## Vocoder libraries
49 | codec2-devel \
50 | gsm-devel \
51 | # ctrlport - thrift
52 | thrift \
53 | thrift-devel \
54 | # GUI libraries
55 | wxPython-devel \
56 | PyQt4-devel \
57 | xdg-utils \
58 | PyQwt-devel\
59 | qwt-devel \
60 | # XML Parsing / GRC
61 | python-lxml \
62 | python-cheetah \
63 | pygtk2-devel \
64 | desktop-file-utils \
65 | # next
66 | python-mako \
67 | python3-mako \
68 | python3-zmq \
69 | log4cpp-devel \
70 | PyQt5-devel \
71 | python3-PyQt5 \
72 | python3-click \
73 | python3-click-plugins \
74 | python2-click \
75 | python2-click-plugins \
76 | # GRC/next
77 | PyYAML \
78 | python3-PyYAML \
79 | python-lxml \
80 | python3-lxml \
81 | python-gobject \
82 | python3-gobject \
83 | pycairo \
84 | python3-cairo \
85 | pango \
86 | && \
87 | dnf clean all && \
88 | # Test runs produce a great quantity of dead grandchild processes. In a
89 | # non-docker environment, these are automatically reaped by init (process 1),
90 | # so we need to simulate that here. See https://github.com/Yelp/dumb-init
91 | curl -Lo /usr/local/bin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.1.3/dumb-init_1.1.3_amd64 && \
92 | chmod +x /usr/local/bin/dumb-init
93 |
94 | COPY buildbot.tac /buildbot/buildbot.tac
95 |
96 | # ubuntu pip version has issues so we should upgrade it: https://github.com/pypa/pip/pull/3287
97 | RUN pip3 install -U pip virtualenv
98 | # Install required python packages, and twisted
99 | RUN pip3 --no-cache-dir install \
100 | 'buildbot-worker' \
101 | 'twisted[tls]' && \
102 | useradd -u 2017 -ms /bin/bash buildbot && chown -R buildbot /buildbot && \
103 | echo "max_size = 20G" > /etc/ccache.conf
104 |
105 | RUN mkdir -p /src/volk && cd /src && curl -Lo volk.tar.gz https://github.com/gnuradio/volk/archive/v2.1.0.tar.gz && tar xzf volk.tar.gz -C volk --strip-components=1 && cmake -DCMAKE_BUILD_TYPE=Release -S ./volk/ -B build && cd build && cmake --build . && cmake --build . --target install && cd / && rm -rf /src/volk && rm -rf /src/build
106 |
107 | RUN mkdir -p /src/pybind11 && cd /src && curl -Lo pybind11.tar.gz https://github.com/pybind/pybind11/archive/v2.4.3.tar.gz && tar xzf pybind11.tar.gz -C pybind11 --strip-components=1 && mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Release -DPYBIND11_TEST=OFF ../pybind11/ && make && make install && cd / && rm -rf /src/pybind11 && rm -rf /src/build
108 |
109 | USER buildbot
110 |
111 | WORKDIR /buildbot
112 |
113 | CMD ["/usr/local/bin/dumb-init", "twistd", "-ny", "buildbot.tac"]
114 |
--------------------------------------------------------------------------------
/worker/fedora-30.Dockerfile:
--------------------------------------------------------------------------------
1 | FROM fedora:30
2 | MAINTAINER Andrej Rode
3 |
4 | ENV security_updates_as_of 2019-08-08
5 |
6 | # F30's container seems slightly broken due to a maintenance oversight when originally
7 | # setting up the repos. We need to disable zchunk before using dnf. WTH.
8 | RUN echo "zchunk=false" >> /etc/dnf/dnf.conf && \
9 | dnf install -y \
10 | # General building
11 | ccache \
12 | ccache-swig \
13 | cmake \
14 | make \
15 | gcc \
16 | gcc-c++ \
17 | shadow-utils \
18 | xz \
19 | # Build infrastructure
20 | cmake \
21 | boost-devel \
22 | python3-devel \
23 | swig \
24 | cppunit-devel \
25 | # Documentation
26 | doxygen \
27 | # disabling doxygen-latex for build speed reasons.
28 | # doxygen-latex \
29 | graphviz \
30 | python3-sphinx \
31 | # Math libraries
32 | fftw-devel \
33 | gsl-devel \
34 | python3-numpy \
35 | python3-scipy \
36 | gmp-devel \
37 | # IO libraries
38 | cppzmq-devel \
39 | python3-zmq \
40 | SDL-devel \
41 | alsa-lib-devel \
42 | portaudio-devel \
43 | jack-audio-connection-kit \
44 | libsndfile-devel \
45 | uhd-devel \
46 | log4cpp-devel \
47 | ## Vocoder libraries
48 | codec2-devel \
49 | gsm-devel \
50 | # ctrlport - thrift
51 | thrift \
52 | thrift-devel \
53 | python3-thrift \
54 | # GUI libraries
55 | xdg-utils \
56 | qwt-qt5-devel \
57 | python3-PyQt5 \
58 | python3-qt5-devel \
59 | # XML Parsing / GRC
60 | desktop-file-utils \
61 | python3-mako \
62 | python3-click \
63 | python3-click-plugins \
64 | # GRC/next
65 | python3-pyyaml \
66 | python3-lxml \
67 | python3-gobject \
68 | gtk3 \
69 | python3-cairo \
70 | pango \
71 | && \
72 | dnf clean all && \
73 | echo "max_size = 20G" > /etc/ccache.conf
74 |
75 | COPY buildbot.tac /buildbot/buildbot.tac
76 |
77 | # Install required python packages, and twisted
78 | RUN dnf install -y \
79 | #buildbot infra
80 | python3-pip \
81 | python3-virtualenv \
82 | python3-twisted \
83 | python3-future \
84 | # Test runs produce a great quantity of dead grandchild processes. In a
85 | # non-docker environment, these are automatically reaped by init (process 1),
86 | # so we need to simulate that here. See https://github.com/Yelp/dumb-init
87 | dumb-init && \
88 | dnf clean all && \
89 | pip3 --no-cache-dir install 'buildbot-worker' && \
90 | useradd -u 2017 -ms /bin/bash buildbot && \
91 | chown -R buildbot /buildbot
92 |
93 | USER buildbot
94 |
95 | WORKDIR /buildbot
96 |
97 | CMD ["/usr/bin/dumb-init", "twistd", "-ny", "buildbot.tac"]
98 |
--------------------------------------------------------------------------------
/worker/fedora-32.Dockerfile:
--------------------------------------------------------------------------------
1 | FROM fedora:32
2 | MAINTAINER Andrej Rode
3 |
4 | ENV security_updates_as_of 2020-10-17
5 |
6 | # F30's container seems slightly broken due to a maintenance oversight when originally
7 | # setting up the repos. We need to disable zchunk before using dnf. WTH.
8 | RUN echo "zchunk=false" >> /etc/dnf/dnf.conf && \
9 | dnf install -y \
10 | # General building
11 | ccache \
12 | ccache-swig \
13 | cmake \
14 | make \
15 | gcc \
16 | gcc-c++ \
17 | shadow-utils \
18 | xz \
19 | # Build infrastructure
20 | cmake \
21 | boost-devel \
22 | python3-devel \
23 | swig \
24 | cppunit-devel \
25 | # Documentation
26 | doxygen \
27 | # disabling doxygen-latex for build speed reasons.
28 | # doxygen-latex \
29 | graphviz \
30 | python3-sphinx \
31 | # Math libraries
32 | fftw-devel \
33 | gsl-devel \
34 | python3-numpy \
35 | python3-scipy \
36 | gmp-devel \
37 | # IO libraries
38 | cppzmq-devel \
39 | python3-zmq \
40 | SDL-devel \
41 | alsa-lib-devel \
42 | portaudio-devel \
43 | jack-audio-connection-kit \
44 | uhd-devel \
45 | log4cpp-devel \
46 | ## Vocoder libraries
47 | codec2-devel \
48 | gsm-devel \
49 | # ctrlport - thrift
50 | thrift \
51 | thrift-devel \
52 | python3-thrift \
53 | # GUI libraries
54 | xdg-utils \
55 | qwt-qt5-devel \
56 | python3-PyQt5 \
57 | python3-qt5-devel \
58 | # XML Parsing / GRC
59 | desktop-file-utils \
60 | python3-mako \
61 | python3-click \
62 | python3-click-plugins \
63 | # GRC/next
64 | python3-pyyaml \
65 | python3-lxml \
66 | python3-gobject \
67 | gtk3 \
68 | python3-cairo \
69 | pango \
70 | && \
71 | dnf clean all && \
72 | echo "max_size = 20G" > /etc/ccache.conf
73 |
74 | COPY buildbot.tac /buildbot/buildbot.tac
75 |
76 | # Install required python packages, and twisted
77 | RUN dnf install -y \
78 | #buildbot infra
79 | python3-pip \
80 | python3-virtualenv \
81 | python3-twisted \
82 | python3-future \
83 | # Test runs produce a great quantity of dead grandchild processes. In a
84 | # non-docker environment, these are automatically reaped by init (process 1),
85 | # so we need to simulate that here. See https://github.com/Yelp/dumb-init
86 | dumb-init && \
87 | dnf clean all && \
88 | pip3 --no-cache-dir install 'buildbot-worker' && \
89 | useradd -u 2017 -ms /bin/bash buildbot && \
90 | chown -R buildbot /buildbot
91 |
92 | USER buildbot
93 |
94 | WORKDIR /buildbot
95 |
96 | CMD ["/usr/bin/dumb-init", "twistd", "-ny", "buildbot.tac"]
97 |
--------------------------------------------------------------------------------
/worker/fedora-33.Dockerfile:
--------------------------------------------------------------------------------
1 | FROM fedora:33
2 | MAINTAINER Andrej Rode
3 |
4 | ENV security_updates_as_of 2020-12-19
5 |
6 | # F30's container seems slightly broken due to a maintenance oversight when originally
7 | # setting up the repos. We need to disable zchunk before using dnf. WTH.
8 | RUN echo "zchunk=false" >> /etc/dnf/dnf.conf && \
9 | dnf install -y \
10 | # General building
11 | ccache \
12 | ccache-swig \
13 | cmake \
14 | make \
15 | gcc \
16 | gcc-c++ \
17 | shadow-utils \
18 | xz \
19 | # Build infrastructure
20 | cmake \
21 | boost-devel \
22 | python3-devel \
23 | swig \
24 | pybind11-devel \
25 | cppunit-devel \
26 | # Documentation
27 | doxygen \
28 | # disabling doxygen-latex for build speed reasons.
29 | # doxygen-latex \
30 | graphviz \
31 | python3-sphinx \
32 | # Math libraries
33 | fftw-devel \
34 | gsl-devel \
35 | python3-numpy \
36 | python3-scipy \
37 | gmp-devel \
38 | # IO libraries
39 | cppzmq-devel \
40 | python3-zmq \
41 | SDL-devel \
42 | alsa-lib-devel \
43 | portaudio-devel \
44 | jack-audio-connection-kit \
45 | uhd-devel \
46 | log4cpp-devel \
47 | ## Vocoder libraries
48 | codec2-devel \
49 | gsm-devel \
50 | # ctrlport - thrift
51 | thrift \
52 | thrift-devel \
53 | python3-thrift \
54 | # GUI libraries
55 | xdg-utils \
56 | qwt-qt5-devel \
57 | python3-PyQt5 \
58 | python3-qt5-devel \
59 | # XML Parsing / GRC
60 | desktop-file-utils \
61 | python3-mako \
62 | python3-click \
63 | python3-click-plugins \
64 | # GRC/next
65 | python3-pyyaml \
66 | python3-lxml \
67 | python3-gobject \
68 | gtk3 \
69 | python3-cairo \
70 | pango \
71 | && \
72 | dnf clean all && \
73 | echo "max_size = 20G" > /etc/ccache.conf
74 |
75 | COPY buildbot.tac /buildbot/buildbot.tac
76 |
77 | # Install required python packages, and twisted
78 | RUN dnf install -y \
79 | git \
80 | #buildbot infra
81 | python3-pip \
82 | python3-virtualenv \
83 | python3-twisted \
84 | python3-future \
85 | # Test runs produce a great quantity of dead grandchild processes. In a
86 | # non-docker environment, these are automatically reaped by init (process 1),
87 | # so we need to simulate that here. See https://github.com/Yelp/dumb-init
88 | dumb-init && \
89 | dnf clean all && \
90 | pip3 --no-cache-dir install 'buildbot-worker' && \
91 | useradd -u 2017 -ms /bin/bash buildbot && \
92 | chown -R buildbot /buildbot
93 |
94 | RUN mkdir -p /src/volk && \
95 | cd /src && \
96 | curl -Lo volk.tar.gz https://github.com/gnuradio/volk/releases/download/v2.4.1/volk-2.4.1.tar.gz && \
97 | tar xzf volk.tar.gz -C volk --strip-components=1 && \
98 | cmake -DCMAKE_BUILD_TYPE=Release -S ./volk/ -B build && \
99 | cd build && \
100 | cmake --build . && \
101 | cmake --build . --target install && \
102 | cd / && \
103 | rm -rf /src/volk && \
104 | rm -rf /src/build
105 |
106 | USER buildbot
107 |
108 | WORKDIR /buildbot
109 |
110 | CMD ["/usr/bin/dumb-init", "twistd", "-ny", "buildbot.tac"]
111 |
--------------------------------------------------------------------------------
/worker/ubuntu-14.04.Dockerfile:
--------------------------------------------------------------------------------
1 | FROM ubuntu:14.04
2 | MAINTAINER Andrej Rode
3 |
4 | ENV security_updates_as_of 2018-01-08
5 |
6 | # Prepare distribution
7 | RUN apt-get update -q \
8 | && apt-get -y upgrade
9 |
10 | # CPP deps
11 | RUN DEBIAN_FRONTEND=noninteractive \
12 | apt-get install -qy \
13 | libasound2 \
14 | libboost-date-time1.54.0 \
15 | libboost-filesystem1.54.0 \
16 | libboost-program-options1.54.0 \
17 | libboost-thread1.54.0 \
18 | libcomedi0 \
19 | libfftw3-bin \
20 | libgsl0ldbl \
21 | libgtk-3-0 \
22 | libgmp10 \
23 | libjack-jackd2-0 \
24 | liblog4cpp5 \
25 | libpangocairo-1.0-0 \
26 | libportaudio2 \
27 | libqwt6 \
28 | libsdl-image1.2 \
29 | libuhd003 \
30 | libusb-1.0-0 \
31 | libzmq3 \
32 | pkg-config \
33 | --no-install-recommends \
34 | && apt-get clean
35 |
36 | # Py deps
37 | RUN DEBIAN_FRONTEND=noninteractive \
38 | apt-get install -qy \
39 | python-cheetah \
40 | python-dev \
41 | python-gi \
42 | python-gi-cairo \
43 | python-gtk2 \
44 | python-lxml \
45 | python-mako \
46 | python-numpy \
47 | python-opengl \
48 | python-qt4 \
49 | python-wxgtk2.8 \
50 | python-yaml \
51 | python-zmq \
52 | --no-install-recommends \
53 | && apt-get clean
54 |
55 | # Py3 deps
56 | RUN DEBIAN_FRONTEND=noninteractive \
57 | apt-get install -qy \
58 | python3-mako \
59 | python3-dev \
60 | python3-gi \
61 | python3-lxml \
62 | python3-numpy \
63 | python3-opengl \
64 | python-qt4 \
65 | python-wxgtk2.8 \
66 | python3-yaml \
67 | python3-zmq \
68 | python-six \
69 | python3-six \
70 | --no-install-recommends \
71 | && apt-get clean
72 |
73 | # Build deps
74 | RUN mv /sbin/sysctl /sbin/sysctl.orig \
75 | && ln -sf /bin/true /sbin/sysctl \
76 | && DEBIAN_FRONTEND=noninteractive apt-get install -y \
77 | --no-install-recommends \
78 | build-essential \
79 | ccache \
80 | cmake \
81 | libboost-date-time-dev \
82 | libboost-dev \
83 | libboost-filesystem-dev \
84 | libboost-program-options-dev \
85 | libboost-regex-dev \
86 | libboost-system-dev \
87 | libboost-test-dev \
88 | libboost-thread-dev \
89 | libcomedi-dev \
90 | libcppunit-dev \
91 | libfftw3-dev \
92 | libgmp-dev \
93 | libgsl0-dev \
94 | liblog4cpp5-dev \
95 | libqt4-dev \
96 | libqwt-dev \
97 | libqwt5-qt4 \
98 | libsdl1.2-dev \
99 | libuhd-dev \
100 | libusb-1.0-0-dev \
101 | libzmq3-dev \
102 | portaudio19-dev \
103 | pyqt4-dev-tools \
104 | python-cheetah \
105 | python-sphinx \
106 | doxygen \
107 | doxygen-latex \
108 | swig \
109 | && rm -f /sbin/sysctl \
110 | && mv /sbin/sysctl.orig /sbin/sysctl
111 |
112 | # Testing deps
113 | RUN DEBIAN_FRONTEND=noninteractive \
114 | apt-get install -qy \
115 | xvfb \
116 | lcov \
117 | python3-scipy \
118 | python-scipy \
119 | --no-install-recommends \
120 | && apt-get clean
121 |
122 |
123 | # Buildbot worker
124 | # Copy worker configuration
125 |
126 | COPY buildbot.tac /buildbot/buildbot.tac
127 |
128 | # Install buildbot dependencies
129 | RUN apt-get -y install -q \
130 | git \
131 | subversion \
132 | libffi-dev \
133 | libssl-dev \
134 | python3-pip \
135 | curl
136 |
137 | # Test runs produce a great quantity of dead grandchild processes. In a
138 | # non-docker environment, these are automatically reaped by init (process 1),
139 | # so we need to simulate that here. See https://github.com/Yelp/dumb-init
140 | RUN curl -Lo /usr/local/bin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.1.3/dumb-init_1.1.3_amd64 && \
141 | chmod +x /usr/local/bin/dumb-init && \
142 | # ubuntu pip version has issues so we should upgrade it: https://github.com/pypa/pip/pull/3287
143 | pip3 install -U pip virtualenv
144 | # Install required python packages, and twisted
145 | RUN pip3 install --upgrade \
146 | 'twisted[tls]' \
147 | 'buildbot_worker' \
148 | 'xvfbwrapper' && \
149 |
150 | useradd -u 2017 -ms /bin/bash buildbot && chown -R buildbot /buildbot && \
151 | echo "max_size = 20G" > /etc/ccache.conf
152 |
153 | RUN rm -rf /var/lib/apt/*
154 |
155 | USER buildbot
156 |
157 | WORKDIR /buildbot
158 |
159 | CMD ["/usr/local/bin/dumb-init", "twistd", "-ny", "buildbot.tac"]
160 |
161 |
162 |
--------------------------------------------------------------------------------
/worker/ubuntu-16.04.Dockerfile:
--------------------------------------------------------------------------------
1 | FROM ubuntu:16.04
2 | MAINTAINER Andrej Rode
3 |
4 | ENV security_updates_as_of 2019-05-14
5 |
6 | # Prepare distribution
7 | RUN apt-get update -q \
8 | && apt-get -y upgrade
9 |
10 | # CPP deps
11 | RUN DEBIAN_FRONTEND=noninteractive \
12 | apt-get install -qy \
13 | libasound2 \
14 | libboost-date-time1.58.0 \
15 | libboost-filesystem1.58.0 \
16 | libboost-program-options1.58.0 \
17 | libboost-thread1.58.0 \
18 | libcomedi0 \
19 | libfftw3-bin \
20 | libgmp10 \
21 | libgsl2 \
22 | libgtk-3-0 \
23 | libjack-jackd2-0 \
24 | liblog4cpp5v5 \
25 | libpangocairo-1.0-0 \
26 | libportaudio2 \
27 | libqwt6abi1 \
28 | libsdl-image1.2 \
29 | libuhd003 \
30 | libusb-1.0-0 \
31 | libzmq5 \
32 | libpango-1.0-0 \
33 | gir1.2-gtk-3.0 \
34 | gir1.2-pango-1.0 \
35 | pkg-config \
36 | --no-install-recommends \
37 | && apt-get clean
38 |
39 | # Py deps
40 | RUN DEBIAN_FRONTEND=noninteractive \
41 | apt-get install -qy \
42 | python-cheetah \
43 | python-click \
44 | python-click-plugins \
45 | python-dev \
46 | python-gi \
47 | python-gi-cairo \
48 | python-gtk2 \
49 | python-lxml \
50 | python-mako \
51 | python-numpy \
52 | python-opengl \
53 | python-qt4 \
54 | python-pyqt5 \
55 | python-wxgtk3.0 \
56 | python-yaml \
57 | python-zmq \
58 | --no-install-recommends \
59 | && apt-get clean
60 |
61 | # Py3 deps
62 | RUN DEBIAN_FRONTEND=noninteractive \
63 | apt-get install -qy \
64 | python3-click \
65 | python3-click-plugins \
66 | python3-mako \
67 | python3-dev \
68 | python3-gi \
69 | python3-gi-cairo \
70 | python3-lxml \
71 | python3-numpy \
72 | python3-opengl \
73 | python3-pyqt5 \
74 | python-wxgtk3.0 \
75 | python3-yaml \
76 | python3-zmq \
77 | python-six \
78 | python3-six \
79 | --no-install-recommends \
80 | && apt-get clean
81 |
82 | # Build deps
83 | RUN mv /sbin/sysctl /sbin/sysctl.orig \
84 | && ln -sf /bin/true /sbin/sysctl \
85 | && DEBIAN_FRONTEND=noninteractive apt-get install -y \
86 | --no-install-recommends \
87 | build-essential \
88 | ccache \
89 | cmake \
90 | libboost-date-time-dev \
91 | libboost-dev \
92 | libboost-filesystem-dev \
93 | libboost-program-options-dev \
94 | libboost-regex-dev \
95 | libboost-system-dev \
96 | libboost-test-dev \
97 | libboost-thread-dev \
98 | libcomedi-dev \
99 | libcppunit-dev \
100 | libfftw3-dev \
101 | libgmp-dev \
102 | libgsl0-dev \
103 | liblog4cpp5-dev \
104 | libqt4-dev \
105 | libqwt-dev \
106 | libqwt5-qt4 \
107 | libqwt-qt5-dev \
108 | qtbase5-dev \
109 | libsdl1.2-dev \
110 | libuhd-dev \
111 | libusb-1.0-0-dev \
112 | libzmq3-dev \
113 | portaudio19-dev \
114 | pyqt4-dev-tools \
115 | pyqt5-dev-tools \
116 | python-cheetah \
117 | python-sphinx \
118 | doxygen \
119 | doxygen-latex \
120 | swig \
121 | && rm -f /sbin/sysctl \
122 | && mv /sbin/sysctl.orig /sbin/sysctl
123 |
124 | # Testing deps
125 | RUN DEBIAN_FRONTEND=noninteractive \
126 | apt-get install -qy \
127 | xvfb \
128 | lcov \
129 | python3-scipy \
130 | python-scipy \
131 | --no-install-recommends \
132 | && apt-get clean
133 |
134 |
135 | # Buildbot worker
136 | # Copy worker configuration
137 |
138 | COPY buildbot.tac /buildbot/buildbot.tac
139 |
140 | # Install buildbot dependencies
141 | RUN apt-get -y install -q \
142 | git \
143 | subversion \
144 | libffi-dev \
145 | libssl-dev \
146 | python3-pip \
147 | curl
148 |
149 | # Test runs produce a great quantity of dead grandchild processes. In a
150 | # non-docker environment, these are automatically reaped by init (process 1),
151 | # so we need to simulate that here. See https://github.com/Yelp/dumb-init
152 | RUN curl -Lo /usr/local/bin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.1.3/dumb-init_1.1.3_amd64 && \
153 | chmod +x /usr/local/bin/dumb-init && \
154 | # ubuntu pip version has issues so we should upgrade it: https://github.com/pypa/pip/pull/3287
155 | pip3 install -U pip virtualenv
156 | # Install required python packages, and twisted
157 | RUN pip3 --no-cache-dir install \
158 | 'twisted[tls]' \
159 | 'buildbot_worker' \
160 | 'xvfbwrapper' && \
161 | useradd -u 2017 -ms /bin/bash buildbot && chown -R buildbot /buildbot && \
162 | echo "max_size = 20G" > /etc/ccache.conf
163 |
164 | RUN rm -rf /var/lib/apt/*
165 |
166 | USER buildbot
167 |
168 | WORKDIR /buildbot
169 |
170 | CMD ["/usr/local/bin/dumb-init", "twistd", "-ny", "buildbot.tac"]
171 |
--------------------------------------------------------------------------------
/worker/ubuntu-18.04.Dockerfile:
--------------------------------------------------------------------------------
1 | FROM ubuntu:18.04
2 | MAINTAINER Andrej Rode
3 |
4 | ENV security_updates_as_of 2019-05-14
5 |
6 | # Prepare distribution
7 | RUN apt-get update -q \
8 | && apt-get -y upgrade
9 |
10 | # CPP deps
11 | RUN DEBIAN_FRONTEND=noninteractive \
12 | apt-get install -qy \
13 | libasound2 \
14 | libboost-date-time1.65.1 \
15 | libboost-filesystem1.65.1 \
16 | libboost-program-options1.65.1 \
17 | libboost-thread1.65.1 \
18 | libcomedi0 \
19 | libfftw3-bin \
20 | libgmp10 \
21 | libgsl23 \
22 | libgtk-3-0 \
23 | libjack-jackd2-0 \
24 | liblog4cpp5v5 \
25 | libpangocairo-1.0-0 \
26 | libportaudio2 \
27 | libqwt6abi1 \
28 | libsdl-image1.2 \
29 | libsndfile1-dev \
30 | libuhd003.010.003 \
31 | libusb-1.0-0 \
32 | libzmq5 \
33 | libpango-1.0-0 \
34 | gir1.2-gtk-3.0 \
35 | gir1.2-pango-1.0 \
36 | pkg-config \
37 | --no-install-recommends \
38 | && apt-get clean
39 |
40 | # Py deps
41 | RUN DEBIAN_FRONTEND=noninteractive \
42 | apt-get install -qy \
43 | python-cheetah \
44 | python-click \
45 | python-click-plugins \
46 | python-dev \
47 | python-gi \
48 | python-gi-cairo \
49 | python-gtk2 \
50 | python-lxml \
51 | python-mako \
52 | python-numpy \
53 | python-opengl \
54 | python-qt4 \
55 | python-pyqt5 \
56 | python-wxgtk3.0 \
57 | python-yaml \
58 | python-zmq \
59 | --no-install-recommends \
60 | && apt-get clean
61 |
62 | # Py3 deps
63 | RUN DEBIAN_FRONTEND=noninteractive \
64 | apt-get install -qy \
65 | python3-click \
66 | python3-click-plugins \
67 | python3-mako \
68 | python3-dev \
69 | python3-gi \
70 | python3-gi-cairo \
71 | python3-lxml \
72 | python3-numpy \
73 | python3-opengl \
74 | python3-pyqt5 \
75 | python-wxgtk3.0 \
76 | python3-yaml \
77 | python3-zmq \
78 | python-six \
79 | python3-six \
80 | --no-install-recommends \
81 | && apt-get clean
82 |
83 | # Build deps
84 | RUN mv /sbin/sysctl /sbin/sysctl.orig \
85 | && ln -sf /bin/true /sbin/sysctl \
86 | && DEBIAN_FRONTEND=noninteractive apt-get install -y \
87 | --no-install-recommends \
88 | build-essential \
89 | ccache \
90 | cmake \
91 | libboost-date-time-dev \
92 | libboost-dev \
93 | libboost-filesystem-dev \
94 | libboost-program-options-dev \
95 | libboost-regex-dev \
96 | libboost-system-dev \
97 | libboost-test-dev \
98 | libboost-thread-dev \
99 | libcomedi-dev \
100 | libcppunit-dev \
101 | libfftw3-dev \
102 | libgmp-dev \
103 | libgsl0-dev \
104 | liblog4cpp5-dev \
105 | libqt4-dev \
106 | libqwt-dev \
107 | libqwt5-qt4 \
108 | libqwt-qt5-dev \
109 | qtbase5-dev \
110 | libsdl1.2-dev \
111 | libuhd-dev \
112 | libusb-1.0-0-dev \
113 | libzmq3-dev \
114 | libgsm1-dev \
115 | libcodec2-dev \
116 | portaudio19-dev \
117 | pyqt4-dev-tools \
118 | pyqt5-dev-tools \
119 | python-cheetah \
120 | python-sphinx \
121 | doxygen \
122 | doxygen-latex \
123 | swig \
124 | && rm -f /sbin/sysctl \
125 | && ln -s /usr/bin/ccache /usr/lib/ccache/cc \
126 | && ln -s /usr/bin/ccache /usr/lib/ccache/c++ \
127 | && mv /sbin/sysctl.orig /sbin/sysctl
128 |
129 | # Testing deps
130 | RUN DEBIAN_FRONTEND=noninteractive \
131 | apt-get install -qy \
132 | xvfb \
133 | lcov \
134 | python3-scipy \
135 | python-scipy \
136 | --no-install-recommends \
137 | && apt-get clean
138 |
139 |
140 | # Buildbot worker
141 | # Copy worker configuration
142 |
143 | COPY buildbot.tac /buildbot/buildbot.tac
144 |
145 | # Install buildbot dependencies
146 | RUN apt-get -y install -q \
147 | git \
148 | subversion \
149 | libffi-dev \
150 | libssl-dev \
151 | python3-pip \
152 | curl
153 |
154 | # Work around broken scan.coverity.com certificates
155 | RUN curl -s -L https://entrust.com/root-certificates/entrust_l1k.cer -o /usr/local/share/ca-certificates/entrust_l1k.crt && update-ca-certificates
156 |
157 | # Test runs produce a great quantity of dead grandchild processes. In a
158 | # non-docker environment, these are automatically reaped by init (process 1),
159 | # so we need to simulate that here. See https://github.com/Yelp/dumb-init
160 | RUN curl -Lo /usr/local/bin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.1.3/dumb-init_1.1.3_amd64 && \
161 | chmod +x /usr/local/bin/dumb-init && \
162 | # ubuntu pip version has issues so we should upgrade it: https://github.com/pypa/pip/pull/3287
163 | pip3 install -U pip virtualenv
164 | # Install required python packages, and twisted
165 | RUN pip3 --no-cache-dir install \
166 | 'twisted[tls]' \
167 | 'buildbot_worker' \
168 | 'xvfbwrapper' && \
169 | useradd -u 2017 -ms /bin/bash buildbot && chown -R buildbot /buildbot && \
170 | echo "max_size = 20G" > /etc/ccache.conf
171 |
172 | RUN rm -rf /var/lib/apt/*
173 |
174 | RUN mkdir -p /src/volk && cd /src && curl -Lo volk.tar.gz https://github.com/gnuradio/volk/archive/v2.1.0.tar.gz && tar xzf volk.tar.gz -C volk --strip-components=1 && mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Release ../volk/ && make && make install && cd / && rm -rf /src/volk && rm -rf /src/build
175 |
176 | RUN mkdir -p /src/pybind11 && cd /src && curl -Lo pybind11.tar.gz https://github.com/pybind/pybind11/archive/v2.4.3.tar.gz && tar xzf pybind11.tar.gz -C pybind11 --strip-components=1 && mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Release -DPYBIND11_TEST=OFF ../pybind11/ && make && make install && cd / && rm -rf /src/pybind11 && rm -rf /src/build
177 |
178 | USER buildbot
179 |
180 | WORKDIR /buildbot
181 |
182 | CMD ["/usr/local/bin/dumb-init", "twistd", "-ny", "buildbot.tac"]
183 |
--------------------------------------------------------------------------------
/worker/ubuntu-20.04.Dockerfile:
--------------------------------------------------------------------------------
1 | FROM ubuntu:20.04
2 | MAINTAINER Andrej Rode
3 |
4 | ENV security_updates_as_of 2020-10-17
5 |
6 | # Prepare distribution
7 | RUN apt-get update -q \
8 | && apt-get -y upgrade
9 |
10 | # CPP deps
11 | RUN DEBIAN_FRONTEND=noninteractive \
12 | apt-get install -qy \
13 | libasound2 \
14 | libboost-date-time1.71.0 \
15 | libboost-filesystem1.71.0 \
16 | libboost-program-options1.71.0 \
17 | libboost-thread1.71.0 \
18 | libcomedi0 \
19 | libfftw3-bin \
20 | libgmp10 \
21 | libgsl23 \
22 | libgtk-3-0 \
23 | libjack-jackd2-0 \
24 | liblog4cpp5v5 \
25 | libpangocairo-1.0-0 \
26 | libportaudio2 \
27 | libqwt-qt5-6 \
28 | libsdl-image1.2 \
29 | libuhd3.15.0 \
30 | libusb-1.0-0 \
31 | libzmq5 \
32 | libpango-1.0-0 \
33 | gir1.2-gtk-3.0 \
34 | gir1.2-pango-1.0 \
35 | pkg-config \
36 | --no-install-recommends \
37 | && apt-get clean
38 |
39 | # Py3 deps
40 | RUN DEBIAN_FRONTEND=noninteractive \
41 | apt-get install -qy \
42 | python3-click \
43 | python3-click-plugins \
44 | python3-mako \
45 | python3-dev \
46 | python3-gi \
47 | python3-gi-cairo \
48 | python3-lxml \
49 | python3-numpy \
50 | python3-opengl \
51 | python3-pyqt5 \
52 | python3-yaml \
53 | python3-zmq \
54 | python3-six \
55 | --no-install-recommends \
56 | && apt-get clean
57 |
58 | # Build deps
59 | RUN mv /sbin/sysctl /sbin/sysctl.orig \
60 | && ln -sf /bin/true /sbin/sysctl \
61 | && DEBIAN_FRONTEND=noninteractive apt-get install -y \
62 | --no-install-recommends \
63 | build-essential \
64 | ccache \
65 | cmake \
66 | libboost-date-time-dev \
67 | libboost-dev \
68 | libboost-filesystem-dev \
69 | libboost-program-options-dev \
70 | libboost-regex-dev \
71 | libboost-system-dev \
72 | libboost-test-dev \
73 | libboost-thread-dev \
74 | libcomedi-dev \
75 | libcppunit-dev \
76 | libfftw3-dev \
77 | libgmp-dev \
78 | libgsl0-dev \
79 | liblog4cpp5-dev \
80 | libqwt-qt5-dev \
81 | qtbase5-dev \
82 | libsdl1.2-dev \
83 | libuhd-dev \
84 | libusb-1.0-0-dev \
85 | libzmq3-dev \
86 | portaudio19-dev \
87 | pyqt5-dev-tools \
88 | doxygen \
89 | doxygen-latex \
90 | swig \
91 | && rm -f /sbin/sysctl \
92 | && ln -s /usr/bin/ccache /usr/lib/ccache/cc \
93 | && ln -s /usr/bin/ccache /usr/lib/ccache/c++ \
94 | && mv /sbin/sysctl.orig /sbin/sysctl
95 |
96 | # Testing deps
97 | RUN DEBIAN_FRONTEND=noninteractive \
98 | apt-get install -qy \
99 | xvfb \
100 | lcov \
101 | python3-scipy \
102 | --no-install-recommends \
103 | && apt-get clean
104 |
105 |
106 | # Buildbot worker
107 | # Copy worker configuration
108 |
109 | COPY buildbot.tac /buildbot/buildbot.tac
110 |
111 | # Install buildbot dependencies
112 | RUN apt-get -y install -q \
113 | git \
114 | subversion \
115 | libffi-dev \
116 | libssl-dev \
117 | python3-pip \
118 | curl
119 |
120 | # Work around broken scan.coverity.com certificates
121 | RUN curl -s -L https://entrust.com/root-certificates/entrust_l1k.cer -o /usr/local/share/ca-certificates/entrust_l1k.crt && update-ca-certificates
122 |
123 | # Test runs produce a great quantity of dead grandchild processes. In a
124 | # non-docker environment, these are automatically reaped by init (process 1),
125 | # so we need to simulate that here. See https://github.com/Yelp/dumb-init
126 | RUN curl -Lo /usr/local/bin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.1.3/dumb-init_1.1.3_amd64 && \
127 | chmod +x /usr/local/bin/dumb-init && \
128 | # ubuntu pip version has issues so we should upgrade it: https://github.com/pypa/pip/pull/3287
129 | pip3 install -U pip virtualenv
130 | # Install required python packages, and twisted
131 | RUN pip3 --no-cache-dir install \
132 | 'twisted[tls]' \
133 | 'buildbot_worker' \
134 | 'xvfbwrapper' && \
135 | useradd -u 2017 -ms /bin/bash buildbot && chown -R buildbot /buildbot && \
136 | echo "max_size = 20G" > /etc/ccache.conf
137 |
138 | RUN rm -rf /var/lib/apt/*
139 |
140 | RUN mkdir -p /src/volk && cd /src && curl -Lo volk.tar.gz https://github.com/gnuradio/volk/archive/v2.1.0.tar.gz && tar xzf volk.tar.gz -C volk --strip-components=1 && mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Release ../volk/ && make && make install && cd / && rm -rf /src/volk && rm -rf /src/build
141 |
142 | USER buildbot
143 |
144 | WORKDIR /buildbot
145 |
146 | CMD ["/usr/local/bin/dumb-init", "twistd", "-ny", "buildbot.tac"]
147 |
--------------------------------------------------------------------------------
/worker/ubuntu-20.10.Dockerfile:
--------------------------------------------------------------------------------
1 | FROM ubuntu:20.10
2 | MAINTAINER Andrej Rode
3 |
4 | ENV security_updates_as_of 2020-12-19
5 |
6 | # Prepare distribution
7 | RUN apt-get update -q \
8 | && apt-get -y upgrade
9 |
10 | # CPP deps
11 | RUN DEBIAN_FRONTEND=noninteractive \
12 | apt-get install -qy \
13 | libasound2 \
14 | libboost-date-time1.71.0 \
15 | libboost-filesystem1.71.0 \
16 | libboost-program-options1.71.0 \
17 | libboost-thread1.71.0 \
18 | libcomedi0 \
19 | libfftw3-bin \
20 | libgmp10 \
21 | libgsl25 \
22 | libgtk-3-0 \
23 | libjack-jackd2-0 \
24 | liblog4cpp5v5 \
25 | libpangocairo-1.0-0 \
26 | libportaudio2 \
27 | libqwt-qt5-6 \
28 | libsdl-image1.2 \
29 | libuhd3.15.0 \
30 | libusb-1.0-0 \
31 | libzmq5 \
32 | libpango-1.0-0 \
33 | gir1.2-gtk-3.0 \
34 | gir1.2-pango-1.0 \
35 | pkg-config \
36 | --no-install-recommends \
37 | && apt-get clean
38 |
39 | # Py3 deps
40 | RUN DEBIAN_FRONTEND=noninteractive \
41 | apt-get install -qy \
42 | python3-click \
43 | python3-click-plugins \
44 | python3-mako \
45 | python3-dev \
46 | python3-gi \
47 | python3-gi-cairo \
48 | python3-lxml \
49 | python3-numpy \
50 | python3-opengl \
51 | python3-pyqt5 \
52 | python3-yaml \
53 | python3-zmq \
54 | python3-six \
55 | --no-install-recommends \
56 | && apt-get clean
57 |
58 | # Build deps
59 | RUN mv /sbin/sysctl /sbin/sysctl.orig \
60 | && ln -sf /bin/true /sbin/sysctl \
61 | && DEBIAN_FRONTEND=noninteractive apt-get install -y \
62 | --no-install-recommends \
63 | build-essential \
64 | ccache \
65 | cmake \
66 | libboost-date-time-dev \
67 | libboost-dev \
68 | libboost-filesystem-dev \
69 | libboost-program-options-dev \
70 | libboost-regex-dev \
71 | libboost-system-dev \
72 | libboost-test-dev \
73 | libboost-thread-dev \
74 | libcomedi-dev \
75 | libcppunit-dev \
76 | libfftw3-dev \
77 | libgmp-dev \
78 | libgsl-dev \
79 | liblog4cpp5-dev \
80 | libqwt-qt5-dev \
81 | qtbase5-dev \
82 | libsdl1.2-dev \
83 | libuhd-dev \
84 | libusb-1.0-0-dev \
85 | libzmq3-dev \
86 | portaudio19-dev \
87 | pyqt5-dev-tools \
88 | doxygen \
89 | doxygen-latex \
90 | pybind11-dev \
91 | swig \
92 | && rm -f /sbin/sysctl \
93 | && ln -s /usr/bin/ccache /usr/lib/ccache/cc \
94 | && ln -s /usr/bin/ccache /usr/lib/ccache/c++ \
95 | && mv /sbin/sysctl.orig /sbin/sysctl
96 |
97 | # Testing deps
98 | RUN DEBIAN_FRONTEND=noninteractive \
99 | apt-get install -qy \
100 | xvfb \
101 | lcov \
102 | python3-scipy \
103 | --no-install-recommends \
104 | && apt-get clean
105 |
106 |
107 | # Buildbot worker
108 | # Copy worker configuration
109 |
110 | COPY buildbot.tac /buildbot/buildbot.tac
111 |
112 | # Install buildbot dependencies
113 | RUN apt-get -y install -q \
114 | git \
115 | subversion \
116 | libffi-dev \
117 | libssl-dev \
118 | python3-pip \
119 | curl
120 |
121 | # Work around broken scan.coverity.com certificates
122 | RUN curl -s -L https://entrust.com/root-certificates/entrust_l1k.cer -o /usr/local/share/ca-certificates/entrust_l1k.crt && update-ca-certificates
123 |
124 | # Test runs produce a great quantity of dead grandchild processes. In a
125 | # non-docker environment, these are automatically reaped by init (process 1),
126 | # so we need to simulate that here. See https://github.com/Yelp/dumb-init
127 | RUN curl -Lo /usr/local/bin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.1.3/dumb-init_1.1.3_amd64 && \
128 | chmod +x /usr/local/bin/dumb-init && \
129 | # ubuntu pip version has issues so we should upgrade it: https://github.com/pypa/pip/pull/3287
130 | pip3 install -U pip virtualenv
131 | # Install required python packages, and twisted
132 | RUN pip3 --no-cache-dir install \
133 | 'twisted[tls]' \
134 | 'buildbot_worker' \
135 | 'xvfbwrapper' && \
136 | useradd -u 2017 -ms /bin/bash buildbot && chown -R buildbot /buildbot && \
137 | echo "max_size = 20G" > /etc/ccache.conf
138 |
139 | RUN rm -rf /var/lib/apt/*
140 |
141 | RUN mkdir -p /src/volk && \
142 | cd /src && \
143 | curl -Lo volk.tar.gz https://github.com/gnuradio/volk/releases/download/v2.4.1/volk-2.4.1.tar.gz && \
144 | tar xzf volk.tar.gz -C volk --strip-components=1 && \
145 | cmake -DCMAKE_BUILD_TYPE=Release -S ./volk/ -B build && \
146 | cd build && \
147 | cmake --build . && \
148 | cmake --build . --target install && \
149 | cd / && \
150 | rm -rf /src/volk && \
151 | rm -rf /src/build
152 |
153 | USER buildbot
154 |
155 | WORKDIR /buildbot
156 |
157 | CMD ["/usr/local/bin/dumb-init", "twistd", "-ny", "buildbot.tac"]
158 |
--------------------------------------------------------------------------------