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