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