Mercurial > octave-buildbot
annotate master.cfg @ 1:97e7b7963dc9
make test log filtering work again
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 12 Jun 2018 21:14:47 +0000 |
parents | 4ad92f00bca5 |
children | f77e7e92cc95 |
rev | line source |
---|---|
0 | 1 ## -*- python -*- |
2 ## ex: set syntax=python: | |
3 | |
4 ## This is a sample buildmaster config file. It must be installed as | |
5 ## 'master.cfg' in your buildmaster's base directory. | |
6 | |
7 ## This is the dictionary that the buildmaster pays attention to. We | |
8 ## also use a shorter alias to save typing. | |
9 | |
10 c = BuildmasterConfig = {} | |
11 | |
12 ## WORKERS | |
13 | |
14 ## The 'worker' list defines the set of recognized workers. Each | |
15 ## element is a Worker object, specifying a unique worker name and | |
16 ## password. The same worker name and password must be configured on | |
17 ## the worker. | |
18 | |
19 from buildbot.worker import Worker | |
20 | |
21 ## Not in hg archive because it contains password and system configuration info. | |
22 import octave_buildbot_config | |
23 | |
24 c["workers"] = [] | |
25 | |
26 for worker, info in octave_buildbot_config.workers.iteritems (): | |
27 c["workers"].append (Worker (worker, info["pass"], max_builds = info["max_builds"])) | |
28 | |
29 ## 'protocols' contains information about protocols which master will | |
30 ## use for communicating with workers. You must define at least 'port' | |
31 ## option that workers could connect to your master with this protocol. | |
32 ## 'port' must match the value configured into the workers (with | |
33 ## their --master option) | |
34 | |
35 c["protocols"] = { "pb" : { "port" : 9990 }} | |
36 | |
37 ## SOURCES | |
38 | |
39 ## The main mercurial repository server. This machines pings the | |
40 ## PBChangeSource. The workers should pull from it, to make | |
41 ## sure they are in sync. | |
42 | |
43 octave_hg_repo = "https://hg.savannah.gnu.org/hgweb/octave" | |
44 ## NOTE: We need this second URL for the Octave sources because | |
45 ## of a bug in buildbot that won't allow two hg poller instances | |
46 ## for the same URL. If that were possible, then we could have | |
47 ## one URL for both the stable and default branches. | |
48 stable_octave_hg_repo = "http://hg.octave.org/octave" | |
49 mxe_octave_hg_repo = "http://hg.octave.org/mxe-octave" | |
50 | |
51 ## CHANGESOURCES | |
52 | |
53 ## the 'change_source' setting tells the buildmaster how it should | |
54 ## find out about source code changes. Here we point to the buildbot | |
55 ## clone of Octave. | |
56 | |
57 from buildbot.changes.hgpoller import HgPoller | |
58 | |
59 c["change_source"] = [] | |
60 | |
61 c["change_source"].append (HgPoller (project = "octave", | |
62 repourl = octave_hg_repo, | |
63 workdir = "octave-hg-repo", | |
64 pollinterval = 5*60)) | |
65 | |
66 c["change_source"].append (HgPoller (project = "stable octave", | |
67 branch = "stable", | |
68 repourl = stable_octave_hg_repo, | |
69 workdir = "stable-octave-hg-repo", | |
70 pollinterval = 5*60)) | |
71 | |
72 c["change_source"].append (HgPoller (project = "mxe-octave", | |
73 repourl = mxe_octave_hg_repo, | |
74 workdir = "mxe-octave-hg-repo", | |
75 pollinterval = 15*60)) | |
76 | |
77 ## FILTERS | |
78 | |
79 from buildbot.changes import filter | |
80 | |
81 octave_default_filter = filter.ChangeFilter (project = "octave", branch = "default") | |
82 | |
83 octave_stable_filter = filter.ChangeFilter (project = "stable octave", branch = "stable") | |
84 | |
85 mxe_octave_default_filter = filter.ChangeFilter (project = "mxe-octave", branch = "default") | |
86 | |
87 ## SCHEDULERS | |
88 | |
89 ## Configure the Schedulers, which decide how to react to incoming | |
90 ## changes. | |
91 | |
92 from buildbot.schedulers.basic import SingleBranchScheduler | |
93 from buildbot.schedulers.forcesched import ForceScheduler | |
94 from buildbot.schedulers import timed | |
95 | |
96 all_default_octave_builders = []; | |
97 #all_default_octave_builders.append ("gcc-4.9-debian") | |
98 #all_default_octave_builders.append ("gcc-5-debian") | |
99 all_default_octave_builders.append ("gcc-6-debian") # mtmx | |
100 all_default_octave_builders.append ("gcc-7-debian") # jwe | |
101 all_default_octave_builders.append ("gcc-7-lto-debian") # jwe | |
102 all_default_octave_builders.append ("gcc-fedora") # das | |
103 all_default_octave_builders.append ("gcc-lto-fedora") # das | |
104 all_default_octave_builders.append ("no-extras-debian") # jwe | |
105 all_default_octave_builders.append ("clang-3.9-debian") # mtmx | |
106 all_default_octave_builders.append ("clang-4.0-debian") # jwe | |
107 all_default_octave_builders.append ("clang-5.0-debian") # jwe | |
108 all_default_octave_builders.append ("clang-fedora") # das | |
109 all_default_octave_builders.append ("clang-osx") # simone | |
110 | |
111 all_stable_octave_builders = []; | |
112 all_stable_octave_builders.append ("stable-gcc-7-debian") # jwe | |
113 all_stable_octave_builders.append ("stable-gcc-7-lto-debian") # jwe | |
114 all_stable_octave_builders.append ("stable-gcc-fedora") # das | |
115 all_stable_octave_builders.append ("stable-no-extras-debian") # jwe | |
116 all_stable_octave_builders.append ("stable-clang-4.0-debian") # jwe | |
117 all_stable_octave_builders.append ("stable-clang-5.0-debian") # jwe | |
118 all_stable_octave_builders.append ("stable-clang-osx") # simone | |
119 | |
120 all_mxe_octave_builders = []; | |
121 all_mxe_octave_builders.append ("w32-on-debian") # jwe | |
122 all_mxe_octave_builders.append ("w64-32-on-debian") # jwe | |
123 all_mxe_octave_builders.append ("w64-64-on-debian") # jwe | |
124 all_mxe_octave_builders.append ("w32-stable-on-debian") # jwe | |
125 all_mxe_octave_builders.append ("w64-32-stable-on-debian") # jwe | |
126 all_mxe_octave_builders.append ("mxe-native-on-debian") # jwe | |
127 all_mxe_octave_builders.append ("mxe-native-all-on-debian") # jwe | |
128 | |
129 c["schedulers"] = [] | |
130 | |
131 c["schedulers"].append (SingleBranchScheduler (name = "default octave", | |
132 change_filter = octave_default_filter, | |
133 treeStableTimer = 5*60, | |
134 builderNames = all_default_octave_builders)) | |
135 | |
136 c["schedulers"].append (ForceScheduler (name = "force_default_octave", builderNames = all_default_octave_builders)) | |
137 | |
138 c["schedulers"].append (SingleBranchScheduler (name = "stable octave", | |
139 change_filter = octave_stable_filter, | |
140 treeStableTimer = 5*60, | |
141 builderNames = all_stable_octave_builders)) | |
142 | |
143 c["schedulers"].append (ForceScheduler (name = "force_stable_octave", builderNames = all_stable_octave_builders)) | |
144 | |
145 ## Here, branch is the mxe-octave branch. | |
146 c["schedulers"].append (timed.Nightly (name = "periodic mxe-octave-w32", | |
147 branch = "default", | |
148 change_filter = mxe_octave_default_filter, | |
149 builderNames = ["w32-on-debian"], | |
150 hour = 0)) | |
151 | |
152 ## Here, branch is the mxe-octave branch. | |
153 c["schedulers"].append (timed.Nightly (name = "periodic mxe-octave-w64-32", | |
154 branch = "default", | |
155 change_filter = mxe_octave_default_filter, | |
156 builderNames = ["w64-32-on-debian"], | |
157 hour = 6)) | |
158 | |
159 ## Here, branch is the mxe-octave branch. | |
160 c["schedulers"].append (timed.Nightly (name = "periodic mxe-octave-w64-64", | |
161 branch = "default", | |
162 change_filter = mxe_octave_default_filter, | |
163 builderNames = ["w64-64-on-debian"], | |
164 hour = 12)) | |
165 | |
166 ## Here, branch is the mxe-octave branch. | |
167 c["schedulers"].append (timed.Nightly (name = "periodic mxe-octave-native", | |
168 branch = "default", | |
169 change_filter = mxe_octave_default_filter, | |
170 builderNames = ["mxe-native-on-debian"], | |
171 hour = 18)) | |
172 | |
173 ## Here, branch is the mxe-octave branch. | |
174 c["schedulers"].append (timed.Nightly (name = "periodic mxe-octave-native-all", | |
175 branch = "default", | |
176 change_filter = mxe_octave_default_filter, | |
177 builderNames = ["mxe-native-all-on-debian"], | |
178 hour = 0)) | |
179 | |
180 ## Here, branch is the mxe-octave branch. | |
181 c["schedulers"].append (timed.Nightly (name = "periodic mxe-octave-w32-stable", | |
182 branch = "default", | |
183 change_filter = mxe_octave_default_filter, | |
184 builderNames = ["w32-stable-on-debian"], | |
185 hour = 8)) | |
186 | |
187 ## Here, branch is the mxe-octave branch. | |
188 c["schedulers"].append (timed.Nightly (name = "periodic mxe-octave-w64-32-stable", | |
189 branch = "default", | |
190 change_filter = mxe_octave_default_filter, | |
191 builderNames = ["w64-32-stable-on-debian"], | |
192 hour = 16)) | |
193 | |
194 c["schedulers"].append (ForceScheduler (name = "force_mxe_octave", builderNames = all_mxe_octave_builders)) | |
195 | |
196 ## BUILDERS | |
197 | |
198 ## The 'builders' list defines the Builders, which tell Buildbot how | |
199 ## to perform a build: what steps, and which workers can execute them. | |
200 ## Note that any particular build will only take place on one worker. | |
201 | |
202 from buildbot.process.factory import BuildFactory | |
203 from buildbot.steps.source.mercurial import Mercurial | |
204 from buildbot.steps.shell import ShellCommand | |
205 from buildbot.steps.shell import Configure | |
206 from buildbot.steps.shell import Compile | |
207 from buildbot.steps.shell import Test | |
208 | |
209 ## Steps we may use in more than one build factory. | |
210 | |
211 def build_cmd_list (cmd, nice = 0, opts = []): | |
212 cmd_list = [] | |
213 | |
214 if nice != 0: | |
215 cmd_list.extend (["nice", "-n", str (nice)]) | |
216 | |
217 if isinstance (cmd, list): | |
218 cmd_list.extend (cmd) | |
219 else: | |
220 cmd_list.append (cmd) | |
221 | |
222 if isinstance (opts, list): | |
223 cmd_list.extend (opts) | |
224 else: | |
225 cmd_list.append (opts) | |
226 | |
227 return cmd_list | |
228 | |
229 | |
230 build_env = { "PATH" : "${HOME}/bin:${PATH}" }; | |
231 | |
232 def mk_octave_hg_update_step (repo, branch): | |
233 return Mercurial (repourl = repo, | |
234 defaultBranch = branch, branchType = "inrepo", | |
235 workdir = "src", mode = "full", method = "fresh", | |
236 haltOnFailure = True) | |
237 | |
238 def mk_octave_bootstrap_step (nice = 0): | |
239 boot_cmd = build_cmd_list ("./bootstrap", nice = nice) | |
240 return ShellCommand (command = boot_cmd, workdir = "src", env = build_env, | |
241 description = "bootstrap") | |
242 | |
243 sh_rm_build_dir = ShellCommand (command = ["rm", "-rf", "build"], workdir = ".", | |
244 env = build_env, description = "clean build dir") | |
245 | |
246 sh_mk_build_dir = ShellCommand (command = ["mkdir", "build"], | |
247 description = "create build dir") | |
248 | |
249 def mk_octave_configure_step (nice = 0, opts = []): | |
250 conf_cmd = build_cmd_list ("../src/configure", nice = nice, opts = opts) | |
251 return Configure (command = conf_cmd, workdir = "build", env = build_env) | |
252 | |
253 | |
254 def mk_octave_compile_step (nice = 0, opts = []): | |
255 make_cmd = build_cmd_list (["make", "V=1"], nice = nice, opts = opts) | |
256 return Compile (command = make_cmd, workdir = "build", env = build_env, | |
257 warningPattern = ":[0-9][0-9]*:[0-9][0-9]*:warning: ") | |
258 | |
259 import re | |
1
97e7b7963dc9
make test log filtering work again
John W. Eaton <jwe@octave.org>
parents:
0
diff
changeset
|
260 from buildbot.process import logobserver |
0 | 261 from buildbot.process.results import SUCCESS |
262 from buildbot.process.results import FAILURE | |
263 from buildbot.process.results import WARNINGS | |
264 | |
1
97e7b7963dc9
make test log filtering work again
John W. Eaton <jwe@octave.org>
parents:
0
diff
changeset
|
265 class octave_test_observer (logobserver.LogLineObserver): |
97e7b7963dc9
make test log filtering work again
John W. Eaton <jwe@octave.org>
parents:
0
diff
changeset
|
266 |
97e7b7963dc9
make test log filtering work again
John W. Eaton <jwe@octave.org>
parents:
0
diff
changeset
|
267 def __init__ (self, warningPattern): |
97e7b7963dc9
make test log filtering work again
John W. Eaton <jwe@octave.org>
parents:
0
diff
changeset
|
268 logobserver.LogLineObserver.__init__ (self) |
97e7b7963dc9
make test log filtering work again
John W. Eaton <jwe@octave.org>
parents:
0
diff
changeset
|
269 if warningPattern: |
97e7b7963dc9
make test log filtering work again
John W. Eaton <jwe@octave.org>
parents:
0
diff
changeset
|
270 self.warningPattern = re.compile (warningPattern) |
97e7b7963dc9
make test log filtering work again
John W. Eaton <jwe@octave.org>
parents:
0
diff
changeset
|
271 else: |
97e7b7963dc9
make test log filtering work again
John W. Eaton <jwe@octave.org>
parents:
0
diff
changeset
|
272 self.warningPattern = None |
97e7b7963dc9
make test log filtering work again
John W. Eaton <jwe@octave.org>
parents:
0
diff
changeset
|
273 self.rc = SUCCESS |
97e7b7963dc9
make test log filtering work again
John W. Eaton <jwe@octave.org>
parents:
0
diff
changeset
|
274 self.total = 0 |
97e7b7963dc9
make test log filtering work again
John W. Eaton <jwe@octave.org>
parents:
0
diff
changeset
|
275 self.failed = 0 |
97e7b7963dc9
make test log filtering work again
John W. Eaton <jwe@octave.org>
parents:
0
diff
changeset
|
276 self.warnings = 0 |
97e7b7963dc9
make test log filtering work again
John W. Eaton <jwe@octave.org>
parents:
0
diff
changeset
|
277 self.complete = False |
97e7b7963dc9
make test log filtering work again
John W. Eaton <jwe@octave.org>
parents:
0
diff
changeset
|
278 |
97e7b7963dc9
make test log filtering work again
John W. Eaton <jwe@octave.org>
parents:
0
diff
changeset
|
279 testsRe = re.compile (r"^ (PASS|FAIL|REGRESSION|XFAIL|SKIP).*(\d+)") |
97e7b7963dc9
make test log filtering work again
John W. Eaton <jwe@octave.org>
parents:
0
diff
changeset
|
280 |
97e7b7963dc9
make test log filtering work again
John W. Eaton <jwe@octave.org>
parents:
0
diff
changeset
|
281 def outLineReceived (self, line): |
97e7b7963dc9
make test log filtering work again
John W. Eaton <jwe@octave.org>
parents:
0
diff
changeset
|
282 if self.warningPattern.match (line): |
97e7b7963dc9
make test log filtering work again
John W. Eaton <jwe@octave.org>
parents:
0
diff
changeset
|
283 self.warnings += 1 |
97e7b7963dc9
make test log filtering work again
John W. Eaton <jwe@octave.org>
parents:
0
diff
changeset
|
284 mo = self.testsRe.search (line) |
97e7b7963dc9
make test log filtering work again
John W. Eaton <jwe@octave.org>
parents:
0
diff
changeset
|
285 if mo: |
97e7b7963dc9
make test log filtering work again
John W. Eaton <jwe@octave.org>
parents:
0
diff
changeset
|
286 type = mo.group(1) |
97e7b7963dc9
make test log filtering work again
John W. Eaton <jwe@octave.org>
parents:
0
diff
changeset
|
287 count = int (mo.group(2)) |
97e7b7963dc9
make test log filtering work again
John W. Eaton <jwe@octave.org>
parents:
0
diff
changeset
|
288 self.total += num |
97e7b7963dc9
make test log filtering work again
John W. Eaton <jwe@octave.org>
parents:
0
diff
changeset
|
289 if type == "FAIL" or type == "REGRESSION": |
97e7b7963dc9
make test log filtering work again
John W. Eaton <jwe@octave.org>
parents:
0
diff
changeset
|
290 if count > 0: |
97e7b7963dc9
make test log filtering work again
John W. Eaton <jwe@octave.org>
parents:
0
diff
changeset
|
291 self.rc = FAILURE |
97e7b7963dc9
make test log filtering work again
John W. Eaton <jwe@octave.org>
parents:
0
diff
changeset
|
292 self.failed += count |
97e7b7963dc9
make test log filtering work again
John W. Eaton <jwe@octave.org>
parents:
0
diff
changeset
|
293 |
97e7b7963dc9
make test log filtering work again
John W. Eaton <jwe@octave.org>
parents:
0
diff
changeset
|
294 |
0 | 295 class octave_test (Test): |
296 | |
1
97e7b7963dc9
make test log filtering work again
John W. Eaton <jwe@octave.org>
parents:
0
diff
changeset
|
297 def __init__ (self, *args, **kwargs): |
97e7b7963dc9
make test log filtering work again
John W. Eaton <jwe@octave.org>
parents:
0
diff
changeset
|
298 Test.__init__ (self, *args, **kwargs) |
97e7b7963dc9
make test log filtering work again
John W. Eaton <jwe@octave.org>
parents:
0
diff
changeset
|
299 self.observer = octave_test_observer (warningPattern = self.warningPattern) |
97e7b7963dc9
make test log filtering work again
John W. Eaton <jwe@octave.org>
parents:
0
diff
changeset
|
300 self.addLogObserver ('stdio', self.observer) |
97e7b7963dc9
make test log filtering work again
John W. Eaton <jwe@octave.org>
parents:
0
diff
changeset
|
301 |
0 | 302 def evaluateCommand (self, cmd): |
1
97e7b7963dc9
make test log filtering work again
John W. Eaton <jwe@octave.org>
parents:
0
diff
changeset
|
303 if self.observer.total: |
97e7b7963dc9
make test log filtering work again
John W. Eaton <jwe@octave.org>
parents:
0
diff
changeset
|
304 passed = self.observer.total - self.observer.failed |
0 | 305 |
1
97e7b7963dc9
make test log filtering work again
John W. Eaton <jwe@octave.org>
parents:
0
diff
changeset
|
306 self.setTestResults (total = self.observer.total, |
97e7b7963dc9
make test log filtering work again
John W. Eaton <jwe@octave.org>
parents:
0
diff
changeset
|
307 failed = self.observer.failed, |
97e7b7963dc9
make test log filtering work again
John W. Eaton <jwe@octave.org>
parents:
0
diff
changeset
|
308 passed = passed, |
97e7b7963dc9
make test log filtering work again
John W. Eaton <jwe@octave.org>
parents:
0
diff
changeset
|
309 warnings = self.observer.warnings) |
0 | 310 |
1
97e7b7963dc9
make test log filtering work again
John W. Eaton <jwe@octave.org>
parents:
0
diff
changeset
|
311 rc = self.observer.rc |
97e7b7963dc9
make test log filtering work again
John W. Eaton <jwe@octave.org>
parents:
0
diff
changeset
|
312 if rc == SUCCESS and self.observer.warnings: |
97e7b7963dc9
make test log filtering work again
John W. Eaton <jwe@octave.org>
parents:
0
diff
changeset
|
313 rc = WARNINGS |
0 | 314 return rc |
315 | |
1
97e7b7963dc9
make test log filtering work again
John W. Eaton <jwe@octave.org>
parents:
0
diff
changeset
|
316 |
0 | 317 def mk_octave_test_step (nice = 0, xvfb = True): |
318 if xvfb: | |
319 cmd = ["xvfb-run", "-a", "-s", "-screen 0 640x480x24"] | |
320 else: | |
321 cmd = [] | |
322 cmd.extend (["make", "V=1", "check"]) | |
323 test_cmd = build_cmd_list (cmd, nice = nice) | |
324 return octave_test (command = test_cmd, workdir = "build", env = build_env) | |
325 | |
1
97e7b7963dc9
make test log filtering work again
John W. Eaton <jwe@octave.org>
parents:
0
diff
changeset
|
326 |
0 | 327 def mk_octave_factory (nice, configure_opts, compile_opts, branch, xvfb = True): |
328 factory = BuildFactory () | |
329 | |
330 factory.addStep (mk_octave_hg_update_step (octave_hg_repo, branch)) | |
331 factory.addStep (mk_octave_bootstrap_step (nice = nice)) | |
332 factory.addStep (sh_rm_build_dir) | |
333 factory.addStep (sh_mk_build_dir) | |
334 factory.addStep (mk_octave_configure_step (nice = nice, opts = configure_opts)) | |
335 factory.addStep (mk_octave_compile_step (nice = nice, opts = compile_opts)) | |
336 factory.addStep (mk_octave_test_step (nice = nice, xvfb = xvfb)) | |
337 | |
338 return factory | |
339 | |
1
97e7b7963dc9
make test log filtering work again
John W. Eaton <jwe@octave.org>
parents:
0
diff
changeset
|
340 |
0 | 341 def mk_gcc_factory (nice, compile_opts, branch): |
342 return mk_octave_factory (nice, [], compile_opts, branch) | |
343 | |
344 | |
345 def mk_gcc_4_9_factory (nice, compile_opts, branch): | |
346 return mk_octave_factory (nice, | |
347 ["CC=gcc-4.9", "CXX=g++-4.9", "F77=gfortran-4.9", "--without-magick"], | |
348 compile_opts, branch) | |
349 | |
350 | |
351 ## Default build. | |
352 def mk_gcc_5_factory (nice, compile_opts, branch): | |
353 return mk_octave_factory (nice, | |
354 ["CC=gcc-5", "CXX=g++-5", "F77=gfortran-5"], | |
355 compile_opts, branch) | |
356 | |
357 | |
358 def mk_gcc_6_factory (nice, compile_opts, branch): | |
359 return mk_octave_factory (nice, | |
360 ["CC=gcc-6", "CXX=g++-6", "F77=gfortran-6"], | |
361 compile_opts, branch) | |
362 | |
363 | |
364 def mk_gcc_7_factory (nice, compile_opts, branch): | |
365 return mk_octave_factory (nice, | |
366 ["CC=gcc-7", "CXX=g++-7", "F77=gfortran-7"], | |
367 compile_opts, branch) | |
368 | |
369 | |
370 def mk_gcc_7_lto_factory (nice, compile_opts, branch): | |
371 return mk_octave_factory (nice, | |
372 ["CC=gcc-7", "CXX=g++-7", "F77=gfortran-7", | |
373 "CFLAGS=-O2 -flto=4 -ffat-lto-objects", | |
374 "CXXFLAGS=-O2 -flto=4 -ffat-lto-objects", | |
375 "FFLAGS=-O2 -flto=4 -ffat-lto-objects", | |
376 "LDFLAGS=-flto=4", | |
377 "NM=gcc-nm-7", "AR=gcc-ar-7", "RANLIB=gcc-ranlib-7"], | |
378 compile_opts, branch) | |
379 | |
380 | |
381 def mk_gcc_lto_factory (nice, compile_opts, branch): | |
382 return mk_octave_factory (nice, | |
383 ["CFLAGS=-O2 -flto=4 -ffat-lto-objects", | |
384 "CXXFLAGS=-O2 -flto=4 -ffat-lto-objects", | |
385 "FFLAGS=-O2 -flto=4 -ffat-lto-objects", | |
386 "LDFLAGS=-flto=4", | |
387 "NM=gcc-nm", "AR=gcc-ar", "RANLIB=gcc-ranlib"], | |
388 compile_opts, branch) | |
389 | |
390 | |
391 no_extras = ["--disable-docs", | |
392 "--disable-fftw-threads", | |
393 "--disable-java", | |
394 "--disable-jit", | |
395 "--disable-openmp", | |
396 "--disable-readline", | |
397 "--without-osmesa", | |
398 "--without-amd", | |
399 "--without-arpack", | |
400 "--without-bz2", | |
401 "--without-camd", | |
402 "--without-ccolamd", | |
403 "--without-cholmod", | |
404 "--without-colamd", | |
405 "--without-curl", | |
406 "--without-cxsparse", | |
407 "--without-fftw3", | |
408 "--without-fftw3f", | |
409 "--without-fltk", | |
410 "--without-framework-opengl", | |
411 "--without-glpk", | |
412 "--without-hdf5", | |
413 "--without-klu", | |
414 "--without-sundials-ida", | |
415 "--without-sundials_nvecserial", | |
416 "--without-magick", | |
417 "--without-opengl", | |
418 "--without-openssl", | |
419 "--without-portaudio", | |
420 "--without-qhull", | |
421 "--without-qrupdate", | |
422 "--without-qscintilla", | |
423 "--without-qt", | |
424 "--without-sndfile", | |
425 "--without-sundials_ida", | |
426 "--without-sundials_nvecserial", | |
427 "--without-umfpack", | |
428 "--without-x", | |
429 "--without-z"] | |
430 | |
431 def mk_no_extras_factory (nice, compile_opts, branch): | |
432 return mk_octave_factory (nice, no_extras, compile_opts, branch) | |
433 | |
434 | |
435 def mk_clang_3_8_factory (nice, compile_opts, branch): | |
436 return mk_octave_factory (nice, | |
437 ["CC=clang-3.8", "CXX=clang++-3.8"], | |
438 compile_opts, branch) | |
439 | |
440 | |
441 def mk_clang_3_9_factory (nice, compile_opts, branch): | |
442 return mk_octave_factory (nice, | |
443 ["CC=clang-3.9", "CXX=clang++-3.9"], | |
444 compile_opts, branch) | |
445 | |
446 def mk_clang_4_0_factory (nice, compile_opts, branch): | |
447 return mk_octave_factory (nice, | |
448 ["CC=clang-4.0", "CXX=clang++-4.0"], | |
449 compile_opts, branch) | |
450 | |
451 def mk_clang_5_0_factory (nice, compile_opts, branch): | |
452 return mk_octave_factory (nice, | |
453 ["CC=clang-5.0", "CXX=clang++-5.0"], | |
454 compile_opts, branch) | |
455 | |
456 def mk_clang_factory (nice, compile_opts, branch): | |
457 return mk_octave_factory (nice, | |
458 ["CC=clang", "CXX=clang++"], | |
459 compile_opts, branch) | |
460 | |
461 def mk_clang_osx_factory (nice, compile_opts, branch): | |
462 ## The linker does search /usr/local/lib, but it does so after | |
463 ## searching /usr/lib. That selects a readline library that is not | |
464 ## fully compatible with GNU readline. | |
465 return mk_octave_factory (nice, | |
466 ["CC=clang", | |
467 "CXX=clang++", | |
468 "CPPFLAGS=-I/opt/X11/include -I/usr/local/opt/gettext/include -I/usr/local/opt/icu4c/include -I/usr/local/opt/openssl/include -I/usr/local/opt/readline/include -I/usr/local/opt/sqlite/include", | |
469 "LDFLAGS=-L/usr/local/lib -L/opt/X11/lib -L/usr/local/opt/qt/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/texinfo/lib -L/usr/local/opt/bison/lib -L/usr/local/opt/gettext/lib -L/usr/local/opt/icu4c/lib -L/usr/local/opt/libffi/lib -L/usr/local/opt/openblas/lib -L/usr/local/opt/openssl/lib -L/usr/local/opt/sqlite/lib", | |
470 "PKG_CONFIG_PATH=/usr/local/opt/icu4c/lib/pkgconfig:/usr/local/opt/qt/lib/pkgconfig", | |
471 "--enable-link-all-dependencies", | |
472 "--with-x=no", | |
473 "--without-osmesa", | |
474 "--with-blas=openblas"], | |
475 compile_opts, branch, xvfb = False) | |
476 | |
477 from buildbot.config import BuilderConfig | |
478 | |
479 c["builders"] = [] | |
480 | |
481 #c["builders"].append (BuilderConfig (name = "gcc-4.9-debian", | |
482 # workernames = ["jwe-debian-x86_64-0"], | |
483 # factory = mk_gcc_4_9_factory (19, "-j8", "default"))) | |
484 | |
485 #c["builders"].append (BuilderConfig (name = "gcc-5-debian", | |
486 # workernames = ["jwe-debian-x86_64-0"], | |
487 # factory = mk_gcc_5_factory (19, "-j8", "default"))) | |
488 | |
489 c["builders"].append (BuilderConfig (name = "gcc-6-debian", | |
490 workernames = ["mtmx-debian-x86_64"], | |
491 factory = mk_gcc_6_factory (10, "-j2", "default"))) | |
492 | |
493 c["builders"].append (BuilderConfig (name = "gcc-7-debian", | |
494 workernames = ["jwe-debian-x86_64-1"], | |
495 factory = mk_gcc_7_factory (19, "-j8", "default"))) | |
496 | |
497 c["builders"].append (BuilderConfig (name = "stable-gcc-7-debian", | |
498 workernames = ["jwe-debian-x86_64-1"], | |
499 factory = mk_gcc_7_factory (19, "-j8", "stable"))) | |
500 | |
501 c["builders"].append (BuilderConfig (name = "gcc-7-lto-debian", | |
502 workernames = ["jwe-debian-x86_64-2"], | |
503 factory = mk_gcc_7_lto_factory (19, "-j8", "default"))) | |
504 | |
505 c["builders"].append (BuilderConfig (name = "stable-gcc-7-lto-debian", | |
506 workernames = ["jwe-debian-x86_64-2"], | |
507 factory = mk_gcc_7_lto_factory (19, "-j8", "stable"))) | |
508 | |
509 c["builders"].append (BuilderConfig (name = "gcc-fedora", | |
510 workernames = ["das_fc25-x86_64"], | |
511 factory = mk_gcc_factory (0, "-j8", "default"))) | |
512 | |
513 c["builders"].append (BuilderConfig (name = "stable-gcc-fedora", | |
514 workernames = ["das_fc25-x86_64"], | |
515 factory = mk_gcc_factory (0, "-j8", "stable"))) | |
516 | |
517 c["builders"].append (BuilderConfig (name = "gcc-lto-fedora", | |
518 workernames = ["das_fc25-x86_64"], | |
519 factory = mk_gcc_lto_factory (10, "-j8", "default"))) | |
520 | |
521 c["builders"].append (BuilderConfig (name = "no-extras-debian", | |
522 workernames = ["jwe-debian-x86_64-1"], | |
523 factory = mk_no_extras_factory (19, "-j8", "default"))) | |
524 | |
525 c["builders"].append (BuilderConfig (name = "stable-no-extras-debian", | |
526 workernames = ["jwe-debian-x86_64-1"], | |
527 factory = mk_no_extras_factory (19, "-j8", "stable"))) | |
528 | |
529 ##c["builders"].append (BuilderConfig (name = "clang-3.8-debian", | |
530 ## workernames = ["jwe-debian-x86_64-2"], | |
531 ## factory = mk_clang_3_8_factory (19, "-j8", "default"))) | |
532 | |
533 c["builders"].append (BuilderConfig (name = "clang-3.9-debian", | |
534 workernames = ["mtmx-debian-x86_64"], | |
535 factory = mk_clang_3_9_factory (19, "-j2", "default"))) | |
536 | |
537 c["builders"].append (BuilderConfig (name = "clang-4.0-debian", | |
538 workernames = ["jwe-debian-x86_64-0"], | |
539 factory = mk_clang_4_0_factory (19, "-j8", "default"))) | |
540 | |
541 c["builders"].append (BuilderConfig (name = "stable-clang-4.0-debian", | |
542 workernames = ["jwe-debian-x86_64-0"], | |
543 factory = mk_clang_4_0_factory (19, "-j8", "stable"))) | |
544 | |
545 c["builders"].append (BuilderConfig (name = "clang-5.0-debian", | |
546 workernames = ["jwe-debian-x86_64-2"], | |
547 factory = mk_clang_5_0_factory (19, "-j8", "default"))) | |
548 | |
549 c["builders"].append (BuilderConfig (name = "stable-clang-5.0-debian", | |
550 workernames = ["jwe-debian-x86_64-2"], | |
551 factory = mk_clang_5_0_factory (19, "-j8", "stable"))) | |
552 | |
553 c["builders"].append (BuilderConfig (name = "clang-fedora", | |
554 workernames = ["das_fc25-x86_64"], | |
555 factory = mk_clang_factory (19, "-j8", "default"))) | |
556 | |
557 | |
558 c["builders"].append (BuilderConfig (name = "clang-osx", | |
559 workernames = ["epfl-elcapitan-x86_64"], | |
560 factory = mk_clang_osx_factory (0, "-j4", "default"))) | |
561 | |
562 c["builders"].append (BuilderConfig (name = "stable-clang-osx", | |
563 workernames = ["epfl-elcapitan-x86_64"], | |
564 factory = mk_clang_osx_factory (0, "-j4", "stable"))) | |
565 | |
566 | |
567 def mk_mxe_octave_hg_update_step (repo): | |
568 return Mercurial (repourl = repo, | |
569 defaultBranch = "default", branchType = "inrepo", | |
570 workdir = "src", mode = "full", method = "fresh", | |
571 haltOnFailure = True) | |
572 | |
573 | |
574 def mk_mxe_octave_bootstrap_step (nice = 0): | |
575 boot_cmd = build_cmd_list ("autoconf", nice = nice) | |
576 return ShellCommand (command = boot_cmd, workdir = "src", env = build_env, | |
577 description = "bootstrap") | |
578 | |
579 | |
580 def mk_mxe_octave_configure_step (nice = 0, branch = "default", opts = []): | |
581 conf_cmd = build_cmd_list (["./configure", | |
582 "--with-pkg-dir=../../mxe-pkg-src", | |
583 "--with-ccache", "--enable-octave=" + branch, | |
584 "--enable-binary-packages"], | |
585 nice = nice, opts = opts) | |
586 return Configure (command = conf_cmd, workdir = "src", env = build_env) | |
587 | |
588 | |
589 def mk_mxe_octave_clean_step (nice = 0): | |
590 boot_cmd = build_cmd_list (["make", "clean"], nice = nice) | |
591 return ShellCommand (command = boot_cmd, workdir = "src", env = build_env, | |
592 description = "clean") | |
593 | |
594 | |
595 ## Timeout is large for these steps because mxe-octave currently only | |
596 ## prints a status update for each package, not detailed output from | |
597 ## make. The way the dependencies currently work, making | |
598 ## hg-octave-dist will also cause all the build tools to be updated, | |
599 ## and some of those make take significant time to build, especially | |
600 ## if the build is running on a heavily loaded system and this step | |
601 ## has a high nice value. | |
602 | |
603 def mk_mxe_octave_hg_tarball_step (nice = 0, jobs = 8, branch = "default"): | |
604 make_cmd = build_cmd_list (["make", "JOBS=" + str (jobs), "hg-octave-dist", "hg-octave-branch=" + branch], | |
605 nice = nice) | |
606 return Compile (command = make_cmd, workdir = "src", env = build_env, | |
607 timeout = 14400) | |
608 | |
609 | |
610 def mk_mxe_octave_compile_step (nice = 0, jobs = 8, opts = []): | |
611 make_cmd = build_cmd_list (["make", "JOBS=" + str (jobs)], | |
612 nice = nice, opts = opts) | |
613 return Compile (command = make_cmd, workdir = "src", env = build_env, | |
614 timeout = 14400) | |
615 | |
616 | |
617 def mk_mxe_octave_factory (nice, jobs, branch, configure_opts, compile_opts): | |
618 factory = BuildFactory () | |
619 | |
620 factory.addStep (mk_mxe_octave_hg_update_step (mxe_octave_hg_repo)) | |
621 factory.addStep (mk_mxe_octave_bootstrap_step (nice = nice)) | |
622 ## Must run configure to ensure clean target will work, then must | |
623 ## run configure again to recreate makefile. | |
624 factory.addStep (mk_mxe_octave_configure_step (nice = nice, branch = branch, | |
625 opts = configure_opts)) | |
626 factory.addStep (mk_mxe_octave_clean_step (nice = nice)) | |
627 factory.addStep (mk_mxe_octave_configure_step (nice = nice, branch = branch, | |
628 opts = configure_opts)) | |
629 ## Create a tarball file from an hg checkout, then build from that. | |
630 ## This also builds all dependencies for Octave, so it can take a | |
631 ## while. Using ccache should help us significantly since we are | |
632 ## typically rebuilding the same sets of packages repeatedly. | |
633 factory.addStep (mk_mxe_octave_hg_tarball_step (nice = nice, jobs = jobs, | |
634 branch = branch)) | |
635 factory.addStep (mk_mxe_octave_compile_step (nice = nice, jobs = jobs, | |
636 opts = compile_opts)) | |
637 ## factory.addStep (mk_mxe_octave_test_step (nice = nice)) | |
638 | |
639 return factory | |
640 | |
641 | |
642 def mk_w32_factory (nice, jobs, branch, compile_opts): | |
643 return mk_mxe_octave_factory (nice, jobs, branch, | |
644 ["--enable-qt5", | |
645 "--enable-devel-tools", | |
646 "--disable-windows-64", | |
647 "--disable-system-opengl"], | |
648 compile_opts) | |
649 | |
650 | |
651 def mk_w64_32_factory (nice, jobs, branch, compile_opts): | |
652 configure_opts = ["--enable-qt5", | |
653 "--enable-devel-tools", | |
654 "--disable-system-opengl"] | |
655 if branch == "stable": | |
656 configure_opts.extend (["--disable-64"]) | |
657 | |
658 return mk_mxe_octave_factory (nice, jobs, branch, | |
659 configure_opts, | |
660 compile_opts) | |
661 | |
662 | |
663 def mk_w64_64_factory (nice, jobs, branch, compile_opts): | |
664 return mk_mxe_octave_factory (nice, jobs, branch, | |
665 ["--enable-qt5", | |
666 "--enable-devel-tools", | |
667 "--enable-fortran-int64", | |
668 "--disable-system-opengl", | |
669 "--enable-64"], | |
670 compile_opts) | |
671 | |
672 | |
673 def mk_native_factory (nice, jobs, branch, compile_opts): | |
674 return mk_mxe_octave_factory (nice, jobs, branch, | |
675 ["--enable-native-build", | |
676 "--enable-qt5", | |
677 "--enable-lib64-directory", | |
678 "--enable-pic-flag", | |
679 "--disable-devel-tools", | |
680 "--enable-system-x11-libs", | |
681 "--enable-system-fontconfig", | |
682 "--enable-system-gcc", | |
683 "gnu-linux"], | |
684 compile_opts) | |
685 | |
686 | |
687 def mk_native_all_factory (nice, jobs, branch, compile_opts): | |
688 return mk_mxe_octave_factory (nice, jobs, branch, | |
689 ["--enable-native-build", | |
690 "--enable-qt5", | |
691 "--enable-lib64-directory", | |
692 "--enable-pic-flag", | |
693 "--disable-devel-tools", | |
694 "--disable-system-x11-libs", | |
695 "--disable-system-fontconfig", | |
696 "--disable-system-gcc", | |
697 "--disable-system-opengl", | |
698 "gnu-linux"], | |
699 compile_opts) | |
700 | |
701 | |
702 c["builders"].append (BuilderConfig (name = "w32-on-debian", | |
703 workernames = ["jwe-debian-x86_64-0"], | |
704 factory = mk_w32_factory (19, 8, "default", "nsis-installer"))) | |
705 | |
706 c["builders"].append (BuilderConfig (name = "w64-32-on-debian", | |
707 workernames = ["jwe-debian-x86_64-0"], | |
708 factory = mk_w64_32_factory (19, 8, "default", "nsis-installer"))) | |
709 | |
710 c["builders"].append (BuilderConfig (name = "w64-64-on-debian", | |
711 workernames = ["jwe-debian-x86_64-0"], | |
712 factory = mk_w64_64_factory (19, 8, "default", "nsis-installer"))) | |
713 | |
714 | |
715 c["builders"].append (BuilderConfig (name = "mxe-native-on-debian", | |
716 workernames = ["jwe-debian-x86_64-0"], | |
717 factory = mk_native_factory (19, 8, "default", "tar-dist"))) | |
718 | |
719 c["builders"].append (BuilderConfig (name = "mxe-native-all-on-debian", | |
720 workernames = ["jwe-debian-x86_64-3"], | |
721 factory = mk_native_all_factory (19, 8, "default", "tar-dist"))) | |
722 | |
723 | |
724 c["builders"].append (BuilderConfig (name = "w32-stable-on-debian", | |
725 workernames = ["jwe-debian-x86_64-3"], | |
726 factory = mk_w32_factory (19, 8, "stable", "nsis-installer"))) | |
727 | |
728 c["builders"].append (BuilderConfig (name = "w64-32-stable-on-debian", | |
729 workernames = ["jwe-debian-x86_64-3"], | |
730 factory = mk_w64_32_factory (19, 8, "stable", "nsis-installer"))) | |
731 | |
732 ## PROJECT IDENTITY | |
733 | |
734 ## the 'title' string will appear at the top of this buildbot | |
735 ## installation's html.WebStatus home page (linked to the 'titleURL') | |
736 ## and is embedded in the title of the waterfall HTML page. | |
737 | |
738 c["title"] = "GNU Octave Buildbot" | |
739 c["titleURL"] = "https://octave.org" | |
740 | |
741 # The 'buildbotURL' string should point to the location where the buildbot's | |
742 # internal web server is visible. This typically uses the port number set in | |
743 # the 'www' entry below, but with an externally-visible host name which the | |
744 # buildbot cannot figure out without some help. | |
745 | |
746 c['buildbotURL'] = "http://buildbot.octave.org:8011/" | |
747 | |
748 ## Minimalistic config to activate new web UI | |
749 | |
750 from buildbot.plugins import util | |
751 | |
752 c['www'] = { | |
753 "port" : 8011, | |
754 "auth" : util.UserPasswordAuth ({"octave" : "8avete$t$"}), | |
755 "plugins" : { "waterfall_view" : True } | |
756 } | |
757 | |
758 ## DB URL | |
759 | |
760 ## This specifies what database buildbot uses to store its state. You | |
761 ## can leave this at its default for all but the largest installations. | |
762 | |
763 c["db"] = { "db_url" : "sqlite:///state.sqlite" } | |
764 | |
765 ## NOTIFICATIONS | |
766 | |
767 from buildbot.plugins import reporters | |
768 | |
769 c["services"] = [] | |
770 | |
771 m = reporters.MailNotifier (fromaddr = "NO-REPLY@octave.org", | |
772 sendToInterestedUsers = False, | |
773 extraRecipients = ["octave-buildbot@gnu.org"], | |
774 mode = "failing") | |
775 c["services"].append (m) |