Tidy
[buildfarm-client.git] / build-farm.conf.template
1
2 # -*-perl-*- hey - emacs - this is a perl file
3
4 =comment
5
6 Copyright (c) 2003-2010, Andrew Dunstan
7
8 See accompanying License file for license details
9
10 =cut 
11
12 package EximBuild;
13
14 use 5.010;
15 use strict;
16 use warnings;
17
18 my $branch = $::branch;
19
20 # This template assumes that the user running the buildfarm process is "farm"
21 my $farm_user_name = getpwuid($<) // die "$0: can't get user name from uid $<: $!\n";
22
23 our %conf =(
24     scm => 'git',
25     # default is github mirror of Exim
26     # Only used for the initial clone (?)
27     scmrepo => 'https://github.com/Exim/exim.git',
28     # webref for diffs on server - use default for community
29     scm_url => undef,
30     # for --reference on git repo
31     # git_reference => undef,
32     # or gmake if required. can include path if necessary.
33     make => 'make',
34     # 1 = any make will do, 0 = require GNU (default)
35     non_gnu_make => 0,
36     # >1 for parallel "make" and "make check" steps
37     make_jobs => undef,
38     # default is "tar -z -cf runlogs.tgz *.log"
39     # replacement must have the same effect
40     # must be absolute, can be either Unix or Windows style for MSVC
41     tar_log_cmd => undef,
42     # If running multiple animals, an explicit common directory for
43     # the lockfile so that runs do not conflict. Otherwise, leave unset.
44     global_lock_dir => $ENV{HOME},
45     # this directory must exist before anything will work
46     build_root => "$ENV{HOME}/buildfarm",
47     # set true to do vpath builds
48     use_vpath => undef,
49
50     keep_error_builds => 0,
51     # Linux style, use "*.core" for BSD
52     core_file_glob => 'core*',
53
54     # Note about HTTPS: HTTPS support is experimental. For a
55     # limited time you may try to use HTTP, in case HTTPS doesn't
56     # work for you.
57
58     # build process will connect to this URL to upload results
59     target => 'https://buildfarm.exim.org/cgi-bin/eximstatus.pl',
60     # update_personality uses this when you want to update your
61     # machine's info (OS, version, compiler, version)
62     upgrade_target => 'https://buildfarm.exim.org/cgi-bin/upgrade.pl',
63
64     # Your host alias and password in the BuildFarm
65     animal => 'alias_assigned_by_build_team',
66     secret => 'secret_assigned_by_build_team',
67
68     # allow automatic updates of the buildfarm client code.
69     # Leave it *unset* to get the default behaviour, set it
70     # to some false value to disable automatic updates or set it
71     # to the name of the remote Git repo you follow for your
72     # buildfarm-client code.
73     #auto_update => 'origin',
74
75     # if force_every is a scalar it will be used on all branches, like this
76     # for legacy reasons:
77     # force_every => 336 , # max hours between builds, undef or 0 = unforced
78     # we now prefer it to be a hash with branch names as the keys, like this
79     #
80     # this setting should be kept conservatively high, or not used at all  -
81     # for the most part it's best to let the script decide if something
82     # has changed that requires a new run for the branch.
83     #
84     # an entry with a name of 'default' matches any branch not named
85     force_every => {
86         HEAD => 24*7,
87         # default => 168,
88     },
89
90     # alerts are triggered if the server doesn't see a build on a branch after
91     # this many hours, and then sent out every so often,
92     alerts => {
93         #HEAD          => { alert_after => 72,  alert_every => 24 },
94     },
95
96     print_success => undef,
97
98     # include / exclude pattern for files whose trigger a build
99     # if both are specified then they are both applied as filters
100     # undef means don't ignore anything.
101     # exclude qr[/(doc|po)/] to ignore changes to docs and po files (recommended)
102     # undef means null filter.
103     trigger_exclude => qr[/(doc|po)/],
104     trigger_include => undef,
105
106     # settings for mail notices - default to notifying nobody
107     # these lists contain addresses to be notified
108     # must be complete email addresses, as the email is sent from the server
109     mail_events =>{
110         all => [], # unconditional
111         fail => [], # if this build fails
112         change => [], # if this build causes a state change
113         green => [], # if this build causes a state change to/from OK
114     },
115
116     # env settings to apply within build/report process
117     # these settings will be seen by all the processes, including the
118     # configure process.
119     build_env =>{
120         # use a dedicated cache for the build farm. this should give us
121         # very high hit rates and slightly faster cache searching.
122         CCACHE_DIR => "$ENV{HOME}/buildfarm/ccache/$branch",
123
124         ### set this if you need a proxy setting for the
125         # outbound web transaction that reports the results
126         # BF_PROXY => 'http://my.proxy.server:portnum/',
127     },
128
129     # Environment settings on the make commandline.
130     # These cause full compile output and don't strip the binary.
131     make_args => q/FULLECHO='' STRIP_COMMAND=''/,
132
133     # Settings to add to Local/Makefile. These will set or override
134     # previous definitions of variables.  Example:
135     # LDFLAGS => '-Wall' will create LDFLAGS = '-Wall'
136     makefile_set =>{
137         # comment out if not using ccache
138         CC => 'ccache gcc',
139         # Required for some tests to pass
140         AUTH_PLAINTEXT => 'yes',
141         SUPPORT_MAILDIR => 'yes',
142         # Other examples. Could use makefile_regex instead.
143         #
144         #SUPPORT_TLS => 'yes',
145         #  Enable the proper libs here or see in makefile_regex
146         #  for use of pkg-config
147         #USE_GNUTLS => 'yes'
148         #TLS_LIBS => '-lssl -lcrypto',
149         #
150         #LOOKUP_LDAP => 'yes',
151         #LOOKUP_INCLUDE => '-I/usr/include/mysql -I/usr/include/postgresql'
152         #LOOKUP_LIBS => '-lmysqlclient -lpq -lldap -llber',
153         #LDAP_LIB_TYPE => 'OPENLDAP2',
154         #LOOKUP_MYSQL => 'yes',
155         #LOOKUP_PGSQL => 'yes',
156         #SUPPORT_PROXY => 'yes',
157         #SUPPORT_SOCKS => 'yes',
158         #EXPERIMENTAL_SPF => 'yes',
159         #EXPERIMENTAL_DANE => 'yes',
160     },
161     # Settings to add to Local/Makefile. These will add to variables that
162     # are already defined earlier in the Makefile.  Example:
163     # LDFLAGS => '-Wall'  will create  LDFLAGS+='-Wall'
164     makefile_add =>{
165         # Show all warnings and errors
166         CFLAGS => '-Wall -Werror=format-security',
167         # Or enable debugging flags
168         #CFLAGS => '-g -Wall',
169         #LFLAGS => '-g',
170         # If set EXPERIMENTAL_SPF above, add it to the linker:
171         #LDFLAGS => '-lspf2',
172     },
173
174     # Another way to enable things in the Local/Makefile.
175     # Use a simple regex to change a default to what you want.
176     makefile_regex =>[
177         # If have perl devel libraries installed, can build embedded perl
178         #q(s/^# EXIM_PERL=/EXIM_PERL=/),
179         # Use SSL libraries
180         #q(s/^# (USE_GNUTLS(?:_PC)?=.*)/$1/),
181         #q(s/^# (USE_OPENSSL_PC=.*)/$1/),
182         # Several experimental features to consider
183         # May be outdated, please check a current EDITME for
184         # for options.
185         #q(s/^# (EXPERIMENTAL_CERTNAMES.*)/$1/),
186         #q(s/^# (EXPERIMENTAL_DNSSEC.*)/$1/),
187     ],
188
189     # The user compiled as the master exim username.
190     # Requirement: The buildfarm user that runs the build farm script *MUST* have
191     # the group of the exim user as a secondary group. Example:
192     # user=>farm, group=>farm, secondary_groups=>exim
193     # user=>exim, group=>exim
194     master_exim_user => 'exim',
195
196     # Range of tests to run if enable make_test in optional steps.
197     # Start with just a couple while getting the aminal set up,
198     # then enable the full set
199     range_num_tests => '1 2',
200     #range_num_tests => '1 5999',
201     # Hardcode some valid version for use during make test
202     exim_test_version => '4.84',
203
204     optional_steps =>{
205         # which optional steps to run and when to run them
206         # 'make-doc' => {min_hours_since => 24*7},
207         test  => {min_hours_since => 24*7},
208     },
209
210     # locales to test
211     locales => [qw( C )],
212
213     # Placemarker for auto-generated build features
214     config_opts =>[
215         qw()
216     ],
217
218 );
219
220 if ($branch eq 'global')
221 {
222
223     $conf{branches_to_build} = 'ALL';
224
225     # or 'HEAD_PLUS_LATEST' or 'HEAD_PLUS_LATEST2'
226     # or [qw( HEAD RELx_y_STABLE etc )]
227
228 }
229
230 ##################################
231 #
232 # Can use perl below for
233 # per branch processing.
234 #
235 ##################################
236
237 1;