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