Mercurial > octave-buildbot
annotate master.cfg @ 22:f2bc3b633414
eliminate duplicate config flags in no-extras builder
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 12 Jun 2020 13:47:53 +0000 |
parents | 58667d78ead7 |
children | 0e1fc3eea4d0 |
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", | |
501 "--without-sundials_ida", | |
502 "--without-sundials_nvecserial", | |
503 "--without-umfpack", | |
504 "--without-x", | |
505 "--without-z"] | |
506 | |
507 def mk_no_extras_factory (nice, compile_opts, branch): | |
508 return mk_octave_factory (nice, no_extras, compile_opts, branch) | |
509 | |
510 | |
511 def mk_clang_3_8_factory (nice, compile_opts, branch): | |
512 return mk_octave_factory (nice, | |
513 ["CC=clang-3.8", "CXX=clang++-3.8"], | |
514 compile_opts, branch) | |
515 | |
516 | |
517 def mk_clang_3_9_factory (nice, compile_opts, branch): | |
518 return mk_octave_factory (nice, | |
519 ["CC=clang-3.9", "CXX=clang++-3.9"], | |
520 compile_opts, branch) | |
521 | |
522 def mk_clang_4_0_factory (nice, compile_opts, branch): | |
523 return mk_octave_factory (nice, | |
524 ["CC=clang-4.0", "CXX=clang++-4.0"], | |
525 compile_opts, branch) | |
526 | |
527 def mk_clang_5_0_factory (nice, compile_opts, branch): | |
528 return mk_octave_factory (nice, | |
529 ["CC=clang-5.0", "CXX=clang++-5.0"], | |
530 compile_opts, branch) | |
531 | |
532 def mk_clang_factory (nice, compile_opts, branch): | |
533 return mk_octave_factory (nice, | |
534 ["CC=clang", "CXX=clang++"], | |
535 compile_opts, branch) | |
536 | |
537 def mk_clang_osx_factory (nice, compile_opts, branch): | |
538 ## The linker does search /usr/local/lib, but it does so after | |
539 ## searching /usr/lib. That selects a readline library that is not | |
540 ## fully compatible with GNU readline. | |
541 return mk_octave_factory (nice, | |
542 ["CC=clang", | |
543 "CXX=clang++", | |
544 "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", | |
545 "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", | |
546 "PKG_CONFIG_PATH=/usr/local/opt/icu4c/lib/pkgconfig:/usr/local/opt/qt/lib/pkgconfig", | |
547 "--enable-link-all-dependencies", | |
548 "--with-x=no", | |
549 "--without-osmesa", | |
550 "--with-blas=openblas"], | |
551 compile_opts, branch, xvfb = False) | |
552 | |
553 from buildbot.config import BuilderConfig | |
554 | |
555 c["builders"] = [] | |
556 | |
557 #c["builders"].append (BuilderConfig (name = "gcc-4.9-debian", | |
9 | 558 # workernames = ["jwe-debian-x86_64-1"], |
0 | 559 # factory = mk_gcc_4_9_factory (19, "-j8", "default"))) |
560 | |
561 #c["builders"].append (BuilderConfig (name = "gcc-5-debian", | |
9 | 562 # workernames = ["jwe-debian-x86_64-1"], |
0 | 563 # factory = mk_gcc_5_factory (19, "-j8", "default"))) |
564 | |
565 c["builders"].append (BuilderConfig (name = "gcc-6-debian", | |
566 workernames = ["mtmx-debian-x86_64"], | |
567 factory = mk_gcc_6_factory (10, "-j2", "default"))) | |
568 | |
569 c["builders"].append (BuilderConfig (name = "gcc-7-debian", | |
9 | 570 workernames = ["jwe-debian-x86_64-2"], |
0 | 571 factory = mk_gcc_7_factory (19, "-j8", "default"))) |
572 | |
573 c["builders"].append (BuilderConfig (name = "stable-gcc-7-debian", | |
9 | 574 workernames = ["jwe-debian-x86_64-2"], |
0 | 575 factory = mk_gcc_7_factory (19, "-j8", "stable"))) |
576 | |
577 c["builders"].append (BuilderConfig (name = "gcc-7-lto-debian", | |
9 | 578 workernames = ["jwe-debian-x86_64-3"], |
0 | 579 factory = mk_gcc_7_lto_factory (19, "-j8", "default"))) |
580 | |
581 c["builders"].append (BuilderConfig (name = "stable-gcc-7-lto-debian", | |
9 | 582 workernames = ["jwe-debian-x86_64-3"], |
0 | 583 factory = mk_gcc_7_lto_factory (19, "-j8", "stable"))) |
584 | |
585 c["builders"].append (BuilderConfig (name = "gcc-fedora", | |
586 workernames = ["das_fc25-x86_64"], | |
11 | 587 factory = mk_gcc_factory (0, "-j4", "default"))) |
0 | 588 |
589 c["builders"].append (BuilderConfig (name = "stable-gcc-fedora", | |
590 workernames = ["das_fc25-x86_64"], | |
11 | 591 factory = mk_gcc_factory (0, "-j4", "stable"))) |
0 | 592 |
593 c["builders"].append (BuilderConfig (name = "gcc-lto-fedora", | |
594 workernames = ["das_fc25-x86_64"], | |
11 | 595 factory = mk_gcc_lto_factory (10, "-j4", "default"))) |
0 | 596 |
597 c["builders"].append (BuilderConfig (name = "no-extras-debian", | |
9 | 598 workernames = ["jwe-debian-x86_64-2"], |
0 | 599 factory = mk_no_extras_factory (19, "-j8", "default"))) |
600 | |
601 c["builders"].append (BuilderConfig (name = "stable-no-extras-debian", | |
9 | 602 workernames = ["jwe-debian-x86_64-2"], |
0 | 603 factory = mk_no_extras_factory (19, "-j8", "stable"))) |
604 | |
605 ##c["builders"].append (BuilderConfig (name = "clang-3.8-debian", | |
9 | 606 ## workernames = ["jwe-debian-x86_64-3"], |
0 | 607 ## factory = mk_clang_3_8_factory (19, "-j8", "default"))) |
608 | |
609 c["builders"].append (BuilderConfig (name = "clang-3.9-debian", | |
610 workernames = ["mtmx-debian-x86_64"], | |
611 factory = mk_clang_3_9_factory (19, "-j2", "default"))) | |
612 | |
613 c["builders"].append (BuilderConfig (name = "clang-4.0-debian", | |
9 | 614 workernames = ["jwe-debian-x86_64-1"], |
0 | 615 factory = mk_clang_4_0_factory (19, "-j8", "default"))) |
616 | |
617 c["builders"].append (BuilderConfig (name = "stable-clang-4.0-debian", | |
9 | 618 workernames = ["jwe-debian-x86_64-1"], |
0 | 619 factory = mk_clang_4_0_factory (19, "-j8", "stable"))) |
620 | |
621 c["builders"].append (BuilderConfig (name = "clang-5.0-debian", | |
9 | 622 workernames = ["jwe-debian-x86_64-0"], |
0 | 623 factory = mk_clang_5_0_factory (19, "-j8", "default"))) |
624 | |
625 c["builders"].append (BuilderConfig (name = "stable-clang-5.0-debian", | |
9 | 626 workernames = ["jwe-debian-x86_64-0"], |
0 | 627 factory = mk_clang_5_0_factory (19, "-j8", "stable"))) |
628 | |
629 c["builders"].append (BuilderConfig (name = "clang-fedora", | |
630 workernames = ["das_fc25-x86_64"], | |
11 | 631 factory = mk_clang_factory (19, "-j4", "default"))) |
0 | 632 |
633 | |
13
9f694d100a7b
new stable-clang-fedora builder
John W. Eaton <jwe@octave.org>
parents:
12
diff
changeset
|
634 c["builders"].append (BuilderConfig (name = "stable-clang-fedora", |
9f694d100a7b
new stable-clang-fedora builder
John W. Eaton <jwe@octave.org>
parents:
12
diff
changeset
|
635 workernames = ["das_fc25-x86_64"], |
9f694d100a7b
new stable-clang-fedora builder
John W. Eaton <jwe@octave.org>
parents:
12
diff
changeset
|
636 factory = mk_clang_factory (19, "-j4", "stable"))) |
9f694d100a7b
new stable-clang-fedora builder
John W. Eaton <jwe@octave.org>
parents:
12
diff
changeset
|
637 |
9f694d100a7b
new stable-clang-fedora builder
John W. Eaton <jwe@octave.org>
parents:
12
diff
changeset
|
638 |
0 | 639 c["builders"].append (BuilderConfig (name = "clang-osx", |
640 workernames = ["epfl-elcapitan-x86_64"], | |
641 factory = mk_clang_osx_factory (0, "-j4", "default"))) | |
642 | |
643 c["builders"].append (BuilderConfig (name = "stable-clang-osx", | |
644 workernames = ["epfl-elcapitan-x86_64"], | |
645 factory = mk_clang_osx_factory (0, "-j4", "stable"))) | |
646 | |
647 | |
648 def mk_mxe_octave_hg_update_step (repo): | |
649 return Mercurial (repourl = repo, | |
650 defaultBranch = "default", branchType = "inrepo", | |
651 workdir = "src", mode = "full", method = "fresh", | |
652 haltOnFailure = True) | |
653 | |
654 | |
655 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
|
656 boot_cmd = build_cmd_list ("./bootstrap", nice = nice) |
0 | 657 return ShellCommand (command = boot_cmd, workdir = "src", env = build_env, |
658 description = "bootstrap") | |
659 | |
660 | |
661 def mk_mxe_octave_configure_step (nice = 0, branch = "default", opts = []): | |
662 conf_cmd = build_cmd_list (["./configure", | |
663 "--with-pkg-dir=../../mxe-pkg-src", | |
664 "--with-ccache", "--enable-octave=" + branch, | |
665 "--enable-binary-packages"], | |
666 nice = nice, opts = opts) | |
667 return Configure (command = conf_cmd, workdir = "src", env = build_env) | |
668 | |
669 | |
670 def mk_mxe_octave_clean_step (nice = 0): | |
671 boot_cmd = build_cmd_list (["make", "clean"], nice = nice) | |
672 return ShellCommand (command = boot_cmd, workdir = "src", env = build_env, | |
673 description = "clean") | |
674 | |
675 | |
676 ## Timeout is large for these steps because mxe-octave currently only | |
677 ## prints a status update for each package, not detailed output from | |
678 ## make. The way the dependencies currently work, making | |
679 ## hg-octave-dist will also cause all the build tools to be updated, | |
680 ## and some of those make take significant time to build, especially | |
681 ## if the build is running on a heavily loaded system and this step | |
682 ## has a high nice value. | |
683 | |
684 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
|
685 |
4
5d2e18ee2b92
mxe-octave: don't build tarball from hg for "release" branch
John W. Eaton <jwe@octave.org>
parents:
3
diff
changeset
|
686 make_cmd = build_cmd_list (["make", "JOBS=" + str (jobs), "hg-octave-dist", "hg-octave-branch=" + branch], |
0 | 687 nice = nice) |
688 return Compile (command = make_cmd, workdir = "src", env = build_env, | |
689 timeout = 14400) | |
690 | |
691 | |
692 def mk_mxe_octave_compile_step (nice = 0, jobs = 8, opts = []): | |
693 make_cmd = build_cmd_list (["make", "JOBS=" + str (jobs)], | |
694 nice = nice, opts = opts) | |
695 return Compile (command = make_cmd, workdir = "src", env = build_env, | |
696 timeout = 14400) | |
697 | |
698 | |
699 def mk_mxe_octave_factory (nice, jobs, branch, configure_opts, compile_opts): | |
700 factory = BuildFactory () | |
701 | |
702 factory.addStep (mk_mxe_octave_hg_update_step (mxe_octave_hg_repo)) | |
703 factory.addStep (mk_mxe_octave_bootstrap_step (nice = nice)) | |
704 ## Must run configure to ensure clean target will work, then must | |
705 ## run configure again to recreate makefile. | |
706 factory.addStep (mk_mxe_octave_configure_step (nice = nice, branch = branch, | |
707 opts = configure_opts)) | |
708 factory.addStep (mk_mxe_octave_clean_step (nice = nice)) | |
709 factory.addStep (mk_mxe_octave_configure_step (nice = nice, branch = branch, | |
710 opts = configure_opts)) | |
3
7a07ae3068be
add mxe-octave 'release' builds and rebalance worker loads
John W. Eaton <jwe@octave.org>
parents:
2
diff
changeset
|
711 |
6
c8ce098ecc08
mxe-octave: update build rules
John W. Eaton <jwe@octave.org>
parents:
5
diff
changeset
|
712 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
|
713 opts = "prerequisites")) |
c8ce098ecc08
mxe-octave: update build rules
John W. Eaton <jwe@octave.org>
parents:
5
diff
changeset
|
714 |
4
5d2e18ee2b92
mxe-octave: don't build tarball from hg for "release" branch
John W. Eaton <jwe@octave.org>
parents:
3
diff
changeset
|
715 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
|
716 ## 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
|
717 ## 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
|
718 ## 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
|
719 ## 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
|
720 |
5d2e18ee2b92
mxe-octave: don't build tarball from hg for "release" branch
John W. Eaton <jwe@octave.org>
parents:
3
diff
changeset
|
721 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
|
722 branch = branch)) |
5d2e18ee2b92
mxe-octave: don't build tarball from hg for "release" branch
John W. Eaton <jwe@octave.org>
parents:
3
diff
changeset
|
723 |
0 | 724 factory.addStep (mk_mxe_octave_compile_step (nice = nice, jobs = jobs, |
725 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
|
726 |
0 | 727 ## factory.addStep (mk_mxe_octave_test_step (nice = nice)) |
728 | |
729 return factory | |
730 | |
731 | |
732 def mk_w32_factory (nice, jobs, branch, compile_opts): | |
733 return mk_mxe_octave_factory (nice, jobs, branch, | |
734 ["--enable-qt5", | |
735 "--enable-devel-tools", | |
736 "--disable-windows-64", | |
3
7a07ae3068be
add mxe-octave 'release' builds and rebalance worker loads
John W. Eaton <jwe@octave.org>
parents:
2
diff
changeset
|
737 "--disable-64", |
7a07ae3068be
add mxe-octave 'release' builds and rebalance worker loads
John W. Eaton <jwe@octave.org>
parents:
2
diff
changeset
|
738 "--disable-fortran-int64", |
0 | 739 "--disable-system-opengl"], |
740 compile_opts) | |
741 | |
742 | |
743 def mk_w64_32_factory (nice, jobs, branch, compile_opts): | |
744 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
|
745 ["--enable-qt5", |
7a07ae3068be
add mxe-octave 'release' builds and rebalance worker loads
John W. Eaton <jwe@octave.org>
parents:
2
diff
changeset
|
746 "--enable-devel-tools", |
7a07ae3068be
add mxe-octave 'release' builds and rebalance worker loads
John W. Eaton <jwe@octave.org>
parents:
2
diff
changeset
|
747 "--enable-windows-64", |
7a07ae3068be
add mxe-octave 'release' builds and rebalance worker loads
John W. Eaton <jwe@octave.org>
parents:
2
diff
changeset
|
748 "--enable-64", |
7a07ae3068be
add mxe-octave 'release' builds and rebalance worker loads
John W. Eaton <jwe@octave.org>
parents:
2
diff
changeset
|
749 "--disable-fortran-int64", |
7a07ae3068be
add mxe-octave 'release' builds and rebalance worker loads
John W. Eaton <jwe@octave.org>
parents:
2
diff
changeset
|
750 "--disable-system-opengl"], |
0 | 751 compile_opts) |
752 | |
753 | |
754 def mk_w64_64_factory (nice, jobs, branch, compile_opts): | |
755 return mk_mxe_octave_factory (nice, jobs, branch, | |
756 ["--enable-qt5", | |
757 "--enable-devel-tools", | |
3
7a07ae3068be
add mxe-octave 'release' builds and rebalance worker loads
John W. Eaton <jwe@octave.org>
parents:
2
diff
changeset
|
758 "--enable-windows-64", |
7a07ae3068be
add mxe-octave 'release' builds and rebalance worker loads
John W. Eaton <jwe@octave.org>
parents:
2
diff
changeset
|
759 "--enable-64", |
0 | 760 "--enable-fortran-int64", |
3
7a07ae3068be
add mxe-octave 'release' builds and rebalance worker loads
John W. Eaton <jwe@octave.org>
parents:
2
diff
changeset
|
761 "--disable-system-opengl"], |
0 | 762 compile_opts) |
763 | |
764 | |
765 def mk_native_factory (nice, jobs, branch, compile_opts): | |
766 return mk_mxe_octave_factory (nice, jobs, branch, | |
767 ["--enable-native-build", | |
768 "--enable-qt5", | |
769 "--enable-lib64-directory", | |
770 "--enable-pic-flag", | |
771 "--disable-devel-tools", | |
772 "--enable-system-x11-libs", | |
773 "--enable-system-fontconfig", | |
774 "--enable-system-gcc", | |
775 "gnu-linux"], | |
776 compile_opts) | |
777 | |
778 | |
779 def mk_native_all_factory (nice, jobs, branch, compile_opts): | |
780 return mk_mxe_octave_factory (nice, jobs, branch, | |
781 ["--enable-native-build", | |
782 "--enable-qt5", | |
783 "--enable-lib64-directory", | |
784 "--enable-pic-flag", | |
785 "--disable-devel-tools", | |
786 "--disable-system-x11-libs", | |
787 "--disable-system-fontconfig", | |
788 "--disable-system-gcc", | |
789 "--disable-system-opengl", | |
790 "gnu-linux"], | |
791 compile_opts) | |
792 | |
793 | |
794 c["builders"].append (BuilderConfig (name = "w32-on-debian", | |
9 | 795 workernames = ["jwe-debian-x86_64-0"], |
6
c8ce098ecc08
mxe-octave: update build rules
John W. Eaton <jwe@octave.org>
parents:
5
diff
changeset
|
796 factory = mk_w32_factory (19, 8, "default", |
c8ce098ecc08
mxe-octave: update build rules
John W. Eaton <jwe@octave.org>
parents:
5
diff
changeset
|
797 ["nsis-installer", "7z-dist"]))) |
0 | 798 |
799 c["builders"].append (BuilderConfig (name = "w64-32-on-debian", | |
9 | 800 workernames = ["jwe-debian-x86_64-1"], |
6
c8ce098ecc08
mxe-octave: update build rules
John W. Eaton <jwe@octave.org>
parents:
5
diff
changeset
|
801 factory = mk_w64_32_factory (19, 8, "default", |
c8ce098ecc08
mxe-octave: update build rules
John W. Eaton <jwe@octave.org>
parents:
5
diff
changeset
|
802 ["nsis-installer", "7z-dist"]))) |
0 | 803 |
804 c["builders"].append (BuilderConfig (name = "w64-64-on-debian", | |
9 | 805 workernames = ["jwe-debian-x86_64-3"], |
6
c8ce098ecc08
mxe-octave: update build rules
John W. Eaton <jwe@octave.org>
parents:
5
diff
changeset
|
806 factory = mk_w64_64_factory (19, 8, "default", |
c8ce098ecc08
mxe-octave: update build rules
John W. Eaton <jwe@octave.org>
parents:
5
diff
changeset
|
807 ["nsis-installer", "7z-dist"]))) |
3
7a07ae3068be
add mxe-octave 'release' builds and rebalance worker loads
John W. Eaton <jwe@octave.org>
parents:
2
diff
changeset
|
808 |
7a07ae3068be
add mxe-octave 'release' builds and rebalance worker loads
John W. Eaton <jwe@octave.org>
parents:
2
diff
changeset
|
809 c["builders"].append (BuilderConfig (name = "w32-release-on-debian", |
9 | 810 workernames = ["jwe-debian-x86_64-0"], |
6
c8ce098ecc08
mxe-octave: update build rules
John W. Eaton <jwe@octave.org>
parents:
5
diff
changeset
|
811 factory = mk_w32_factory (19, 8, "release", |
c8ce098ecc08
mxe-octave: update build rules
John W. Eaton <jwe@octave.org>
parents:
5
diff
changeset
|
812 ["nsis-installer", "7z-dist"]))) |
3
7a07ae3068be
add mxe-octave 'release' builds and rebalance worker loads
John W. Eaton <jwe@octave.org>
parents:
2
diff
changeset
|
813 |
7a07ae3068be
add mxe-octave 'release' builds and rebalance worker loads
John W. Eaton <jwe@octave.org>
parents:
2
diff
changeset
|
814 c["builders"].append (BuilderConfig (name = "w64-32-release-on-debian", |
9 | 815 workernames = ["jwe-debian-x86_64-1"], |
6
c8ce098ecc08
mxe-octave: update build rules
John W. Eaton <jwe@octave.org>
parents:
5
diff
changeset
|
816 factory = mk_w64_32_factory (19, 8, "release", |
c8ce098ecc08
mxe-octave: update build rules
John W. Eaton <jwe@octave.org>
parents:
5
diff
changeset
|
817 ["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
|
818 |
7a07ae3068be
add mxe-octave 'release' builds and rebalance worker loads
John W. Eaton <jwe@octave.org>
parents:
2
diff
changeset
|
819 c["builders"].append (BuilderConfig (name = "w64-64-release-on-debian", |
9 | 820 workernames = ["jwe-debian-x86_64-3"], |
6
c8ce098ecc08
mxe-octave: update build rules
John W. Eaton <jwe@octave.org>
parents:
5
diff
changeset
|
821 factory = mk_w64_64_factory (19, 8, "release", |
c8ce098ecc08
mxe-octave: update build rules
John W. Eaton <jwe@octave.org>
parents:
5
diff
changeset
|
822 ["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
|
823 |
7a07ae3068be
add mxe-octave 'release' builds and rebalance worker loads
John W. Eaton <jwe@octave.org>
parents:
2
diff
changeset
|
824 |
7a07ae3068be
add mxe-octave 'release' builds and rebalance worker loads
John W. Eaton <jwe@octave.org>
parents:
2
diff
changeset
|
825 c["builders"].append (BuilderConfig (name = "w32-stable-on-debian", |
9 | 826 workernames = ["jwe-debian-x86_64-0"], |
6
c8ce098ecc08
mxe-octave: update build rules
John W. Eaton <jwe@octave.org>
parents:
5
diff
changeset
|
827 factory = mk_w32_factory (19, 8, "stable", |
c8ce098ecc08
mxe-octave: update build rules
John W. Eaton <jwe@octave.org>
parents:
5
diff
changeset
|
828 ["nsis-installer", "7z-dist"]))) |
3
7a07ae3068be
add mxe-octave 'release' builds and rebalance worker loads
John W. Eaton <jwe@octave.org>
parents:
2
diff
changeset
|
829 |
7a07ae3068be
add mxe-octave 'release' builds and rebalance worker loads
John W. Eaton <jwe@octave.org>
parents:
2
diff
changeset
|
830 c["builders"].append (BuilderConfig (name = "w64-32-stable-on-debian", |
9 | 831 workernames = ["jwe-debian-x86_64-1"], |
6
c8ce098ecc08
mxe-octave: update build rules
John W. Eaton <jwe@octave.org>
parents:
5
diff
changeset
|
832 factory = mk_w64_32_factory (19, 8, "stable", |
c8ce098ecc08
mxe-octave: update build rules
John W. Eaton <jwe@octave.org>
parents:
5
diff
changeset
|
833 ["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
|
834 |
7a07ae3068be
add mxe-octave 'release' builds and rebalance worker loads
John W. Eaton <jwe@octave.org>
parents:
2
diff
changeset
|
835 c["builders"].append (BuilderConfig (name = "w64-64-stable-on-debian", |
9 | 836 workernames = ["jwe-debian-x86_64-3"], |
6
c8ce098ecc08
mxe-octave: update build rules
John W. Eaton <jwe@octave.org>
parents:
5
diff
changeset
|
837 factory = mk_w64_64_factory (19, 8, "stable", |
c8ce098ecc08
mxe-octave: update build rules
John W. Eaton <jwe@octave.org>
parents:
5
diff
changeset
|
838 ["nsis-installer", "7z-dist"]))) |
0 | 839 |
840 c["builders"].append (BuilderConfig (name = "mxe-native-on-debian", | |
9 | 841 workernames = ["jwe-debian-x86_64-1"], |
0 | 842 factory = mk_native_factory (19, 8, "default", "tar-dist"))) |
843 | |
844 c["builders"].append (BuilderConfig (name = "mxe-native-all-on-debian", | |
9 | 845 workernames = ["jwe-debian-x86_64-3"], |
0 | 846 factory = mk_native_all_factory (19, 8, "default", "tar-dist"))) |
847 | |
848 | |
849 ## PROJECT IDENTITY | |
850 | |
851 ## the 'title' string will appear at the top of this buildbot | |
852 ## installation's html.WebStatus home page (linked to the 'titleURL') | |
853 ## and is embedded in the title of the waterfall HTML page. | |
854 | |
855 c["title"] = "GNU Octave Buildbot" | |
856 c["titleURL"] = "https://octave.org" | |
857 | |
858 # The 'buildbotURL' string should point to the location where the buildbot's | |
859 # internal web server is visible. This typically uses the port number set in | |
860 # the 'www' entry below, but with an externally-visible host name which the | |
861 # buildbot cannot figure out without some help. | |
862 | |
5
0b956eea0df3
move master web server back to port 8010
John W. Eaton <jwe@octave.org>
parents:
4
diff
changeset
|
863 c['buildbotURL'] = "http://buildbot.octave.org:8010/" |
0 | 864 |
865 ## Minimalistic config to activate new web UI | |
866 | |
867 from buildbot.plugins import util | |
868 | |
869 c['www'] = { | |
5
0b956eea0df3
move master web server back to port 8010
John W. Eaton <jwe@octave.org>
parents:
4
diff
changeset
|
870 "port" : 8010, |
0 | 871 "plugins" : { "waterfall_view" : True } |
872 } | |
873 | |
15 | 874 c['www']['ui_default_config'] = { |
875 "Waterfall.scaling_waterfall": 0.02, | |
876 "Waterfall.lazy_limit_waterfall": 400 | |
877 } | |
878 | |
20 | 879 ### HOW TF is this supposed to work to limit access to things like forcing or |
880 ### stopping builds through the web interface. Nothing seems to limit the | |
881 ### force actions to users who are logged in. WTF!?! | |
882 ## authz = util.Authz ( | |
883 ## stringsMatcher = util.fnmatchStrMatcher, | |
884 ## allowRules = [ | |
885 ## util.AnyEndpointMatcher (role = "admins", defaultDeny = False), | |
886 ## # admins can do anything, | |
887 ## # defaultDeny = False: if user does not have the admin role, we continue parsing rules | |
888 ## util.StopBuildEndpointMatcher (role = "admins"), | |
889 ## util.ForceBuildEndpointMatcher (role = "admins"), | |
890 ## # if future Buildbot implement new control, we are safe with this last rule | |
891 ## util.AnyControlEndpointMatcher (role = "admins") | |
892 ## ], | |
893 ## roleMatchers = [ | |
894 ## # role owner is granted when property owner matches the email of the user | |
895 ## util.RolesFromOwner (role = "owner") | |
896 ## ] | |
897 ## ) | |
898 | |
899 auth = util.UserPasswordAuth (octave_buildbot_config.master_id_and_pass) | |
900 | |
901 c['www']['auth'] = auth | |
902 ## c['www']['authz'] = authz | |
903 | |
0 | 904 ## DB URL |
905 | |
906 ## This specifies what database buildbot uses to store its state. You | |
907 ## can leave this at its default for all but the largest installations. | |
908 | |
909 c["db"] = { "db_url" : "sqlite:///state.sqlite" } | |
910 | |
911 ## NOTIFICATIONS | |
912 | |
913 from buildbot.plugins import reporters | |
914 | |
915 c["services"] = [] | |
916 | |
917 m = reporters.MailNotifier (fromaddr = "NO-REPLY@octave.org", | |
918 sendToInterestedUsers = False, | |
919 extraRecipients = ["octave-buildbot@gnu.org"], | |
920 mode = "failing") | |
921 c["services"].append (m) |