forked from PGBuildFarm/client-code
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild-farm.conf.sample
396 lines (306 loc) · 12.4 KB
/
build-farm.conf.sample
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
# -*-perl-*- hey - emacs - this is a perl file
=comment
Copyright (c) 2003-2010, Andrew Dunstan
See accompanying License file for license details
=cut
package PGBuild; ## no critic (RequireFilenameMatchesPackage)
use strict;
use warnings FATAL => 'qw';
use vars qw(%conf);
# use vars qw($VERSION); $VERSION = 'REL_8';
my $branch;
{
no warnings qw(once);
$branch = $main::branch;
}
# useful for making settings relative to the config file location
# all the clients should have used these two standard packages
my $confdir = File::Spec->rel2abs(File::Basename::dirname(__FILE__));
# to force from-source in the directory where this config file is located,
# uncomment the line below. See also buildroot below
# $PGBuild::Options::from_source = $confdir;
%conf = (
# identity
animal => "CHANGEME",
secret => "CHANGEME",
# source code
scm => 'git', # or 'cvs'
git_keep_mirror => 1, # manage a git mirror in the build root
git_ignore_mirror_failure => 1, # ignore failures in fetching to mirror
git_gc_hours => 7 * 24, # garbage collect once a week, 0/undef to disable
# use symlinked git repo from non-HEAD branches,
# like git-new-workdir does
git_use_workdirs => 1,
scmrepo => undef, # default is community repo for either type
scm_url => undef, # webref for diffs on server - use default for community
# git_reference => undef, # for --reference on git repo
# cvsmethod => 'update', # or 'export'
use_git_cvsserver => undef, # or 'true' if repo is a git cvsserver
# external commands and control
make => 'make', # or gmake if required. can include path if necessary.
make_jobs => undef, # >1 for parallel "make" and "make check" steps
tar_log_cmd => undef, # default is "tar -z -cf runlogs.tgz *.log"
# replacement must have the same effect
# max time in seconds allowed for a single branch run
# undef/0 means unlimited
wait_timeout => undef,
# if true run installcheck-parallel instead of installcheck
use_installcheck_parallel => undef,
# where and how to build
# must be absolute, can be either Unix or Windows style for MSVC
# undef means default, buildroot dir in script directory
# "$confdir/buildroot" means buildroot in the config file's directory,
# which is useful for auto from-source setups
build_root => undef, # or '/path/to/buildroot',
use_vpath => undef, # set true to do vpath builds
# valgrind settings - default is don't use valgrind
# It will use the .supp file in the source code so that's not in the
# options here.
use_valgrind => undef,
valgrind_options => join(
' ', qw{--quiet --trace-children=yes
--track-origins=yes --read-var-info=yes --num-callers=20
--leak-check=no --gen-suppressions=all --error-limit=no}
),
# path to directory with auxiliary web script
# if relative, the must be relative to buildroot/branch
# Now only used on older Msys installations
# aux_path => "../..",
keep_error_builds => 0,
core_file_glob => "core*", # Linux style, use "*.core" for BSD
# where to report status
target => "https://buildfarm.postgresql.org/cgi-bin/pgstatus.pl",
# where to report change in OS version or compiler version
upgrade_target => "https://buildfarm.postgresql.org/cgi-bin/upgrade.pl",
# change this to a true value if using MSVC, in which case also
# see MSVC section below
using_msvc => undef,
# if force_every is a scalar it will be used on all branches, like this
# for legacy reasons:
# force_every => 336 , # max hours between builds, undef or 0 = unforced
# we now prefer it to be a hash with branch names as the keys, like this
#
# this setting should be kept conservatively high, or not used at all -
# for the most part it's best to let the script decide if something
# has changed that requires a new run for the branch.
#
# an entry with a name of 'default' matches any branch not named
force_every => {
# HEAD => 48,
# default => 168,
},
# alerts are triggered if the server doesn't see a build on a branch after
# this many hours, and then sent out every so often,
alerts => {
# HEAD => { alert_after => 72, alert_every => 24 },
# REL_10_STABLE => { alert_after => 240, alert_every => 48 },
},
# include / exclude patterns for files that trigger a build
# if both are specified then they are both applied as filters
# undef means don't ignore anything.
# exclude qr[^doc/|\.po$] to ignore changes to docs and po files
# (recommended)
# undef means null filter.
trigger_exclude => qr[^doc/|\.po$],
trigger_include => undef,
# settings for mail notices - default to notifying nobody
# these lists contain addresses to be notified
# must be complete email addresses, as the email is sent from the server
mail_events => {
all => [], # unconditional
fail => [], # if this build fails
change => [], # if this build causes a state change
green => [], # if this build causes a state change to/from OK
},
# if this flag is set and ccache is used, an unsuccessful run will result
# in the removal of the ccache directory (and you need to make sure that
# its parent is writable). The default is off - ccache should be able to
# handle failures, although there have been suspicions in the past that
# it's not quite as reliable as we'd want, and thus we have this option.
ccache_failure_remove => undef,
# set this if you want to use ccache with the default ccache directory
# location, effectively $buildroot/ccache-$animal.
use_default_ccache_dir => 1,
# set this to allow caching of the configure script's results
use_accache => 1,
# env settings to apply within build/report process
# these settings will be seen by all the processes, including the
# configure process.
build_env => {
# use a dedicated cache for the build farm. this should give us
# very high hit rates and slightly faster cache searching.
#
# only set this if you want to set your own path for the ccache
# directory
# CCACHE_DIR => "/path/to/your/ccache",
### use these settings for CYGWIN
# CYGWIN => 'server',
# MAX_CONNECTIONS => '3',
### set this if you need a proxy setting for the
# outbound web transaction that reports the results
# BF_PROXY => 'http://my.proxy.server:portnum/',
# see below for MSVC settings
# possibly set this to something high if you get pg_ctl failures
# default is 120
# PGCTLTIMEOUT => '120',
# run extra TAP tests if listed here
# These are the ones omitted without the setting
# PG_TEST_EXTRA => "ssl ldap kerberos",
},
# env settings to pass to configure. These settings will only be seen by
# configure.
config_env => {
# comment out if not using ccache
CC => 'ccache gcc',
# In the rare event that you need to tell configure where the prove
# program lives instead of letting it work it out you do it here.
# Msys is one such case.
# PROVE => '/bin/prove',
},
# don't use --prefix or --with-pgport here
# they are set up by the script
# per-branch config can be done here or
# more simply by using the examples below.
# (default ldap flag is below because it's not supported in all branches)
# see below for MSVC config
config_opts => [
qw(
--enable-cassert
--enable-debug
--enable-nls
--with-perl
--with-python
--with-tcl
--with-gssapi
--with-openssl
--with-ldap
--with-libxml
--with-libxslt
)
],
# per-branch contents of extra config for check stages.
# each branch has an array of setting lines (no \n required)
# a DEFAULT entry is used for all branches, before any
# branch-specific settings.
extra_config => {
DEFAULT => [
q(log_line_prefix = '%m [%p:%l] %q%a '),
"log_connections = 'true'",
"log_disconnections = 'true'",
"log_statement = 'all'",
"fsync = off"
],
HEAD => ['force_parallel_mode = regress'],
},
optional_steps => {
# which optional steps to run and when to run them
# valid keys are: branches, dow, min_hours_since, min_hour, max_hour
# find_typedefs => { branches => ['HEAD'], dow => [1,4],
# min_hours_since => 25 },
# build_docs => {min_hours_since => 24},
},
# locales to test
locales => [qw( C )],
# port number actually used will be based on this param and the branch,
# so we ensure they don't collide
base_port => 5678,
modules => [qw(TestUpgrade TestDecoding)],
#
);
# settings used by run_branches.pl
if ($branch eq 'global')
{
$conf{branches_to_build} = 'ALL';
# or 'HEAD_PLUS_LATEST' or 'HEAD_PLUS_LATEST2'
# or [qw( HEAD RELx_y_STABLE etc )]
# set this if you are running multiple animals and want them coordinated
# $conf{global_lock_dir} = '/path/to/lockdir';
}
# MSVC setup
if ($conf{using_msvc})
{
# all this stuff is to support MSVC builds - it's literally what
# a VS Command Prompt sets for me.
# make sure it's what your sets for you. There can be subtle differences.
# Note: we need to set here whatever would be set in buildenv.bat, as
# we aren't going to write that file. This supercedes it. In
# particular, the PATH possibly needs to include the path to perl, bison,
# flex etc., as well as CVS if that's not in the path.
my %extra_buildenv = (
VSINSTALLDIR => 'C:\Program Files\Microsoft Visual Studio 8',
VCINSTALLDIR => 'C:\Program Files\Microsoft Visual Studio 8\VC',
VS80COMNTOOLS =>
'C:\Program Files\Microsoft Visual Studio 8\Common7\Tools',
FrameworkDir => 'C:\WINDOWS\Microsoft.NET\Framework',
FrameworkVersion => 'v2.0.50727',
FrameworkSDKDir =>
'C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0',
DevEnvDir => 'C:\Program Files\Microsoft Visual Studio 8\Common7\IDE',
PATH => join(';',
'C:\Program Files\Microsoft Visual Studio 8\Common7\IDE',
'C:\Program Files\Microsoft Visual Studio 8\VC\BIN',
'C:\Program Files\Microsoft Visual Studio 8\Common7\Tools',
'C:\Program Files\Microsoft Visual Studio 8\Common7\Tools\bin',
'C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\bin',
'C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\bin',
'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727',
'C:\Program Files\Microsoft Visual Studio 8\VC\VCPackages',
'C:\Perl\Bin',
'c:\prog\pgdepend\bin',
$ENV{PATH}),
INCLUDE => join(';',
'C:\Program Files\Microsoft Visual Studio 8\VC\ATLMFC\INCLUDE',
'C:\Program Files\Microsoft Visual Studio 8\VC\INCLUDE',
'C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include',
'C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\include',
$ENV{INCLUDE}),
LIB => join(';',
'C:\Program Files\Microsoft Visual Studio 8\VC\ATLMFC\LIB',
'C:\Program Files\Microsoft Visual Studio 8\VC\LIB'
. 'C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\lib',
'C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\lib'
. $ENV{LIB}),
LIBPATH => join(';',
'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727',
'C:\Program Files\Microsoft Visual Studio 8\VC\ATLMFC\LIB'),
);
%{ $conf{build_env} } = (%{ $conf{build_env} }, %extra_buildenv);
# MSVC needs a somewhat different style of config opts (why??)
# What we write here will be literally (via Data::Dumper) put into
# the config.pl file for the MSVC build.
$conf{config_opts} = {
asserts => 1, # --enable-cassert
integer_datetimes => 1, # --enable-integer-datetimes
nls => undef, # --enable-nls=<path>
tcl => 'c:\tcl', # --with-tcl=<path>
perl => 'c:\perl', # --with-perl=<path>
python => 'c:\python25', # --with-python=<path>
krb5 => undef, # --with-krb5=<path>
ldap => 0, # --with-ldap
openssl => undef, # --with-ssl=<path>
xml => undef, # --with-libxml=<path>
xslt => undef, # --with-libxslt=<path>,
iconv => undef, # path to iconv library
zlib => undef, # --with-zlib=<path>
};
}
##################################
#
# examples of per branch processing
# tailor as required for your site.
#
##################################
if ($branch eq 'HEAD')
{
# push(@{$conf{config_opts}},"--enable-depend");
# Note that config_opts is a hashref for MSVC, rather than
# an arrayref like elsewhere. That means the right way to set
# semething there is like this:
#
# $conf{config_opts}->{openssl} = 'c:\path\to\openssl\installation';
}
elsif ($branch =~ /^REL7_/)
{
# push(@{$conf{config_opts}},"--without-tk");
}
1;