(travis) Adjust test infrastructure for recent extensive TravisCI changes
[dbsrgits/DBIx-Class.git] / .travis.yml
1 # Some overall notes on how this works
2 #
3 # * We smoke using the system provided latest, and custom built "oddball perls"
4 # The reason for not having a blanket matrix is to conserve travis resources
5 # as a full DBIC depchain isn't cheap
6 #
7 # * Minimum perl officially supported by DBIC is 5.8.3. This *includes* the
8 # basic depchain. On failure either attempt to fix it or bring it to the
9 # attention of the maintainer. *DO NOT* disable 5.8 testing - it is here for
10 # a very good reason
11 #
12 # the entire run times out after 50 minutes, or after 5 minutes without
13 # console output
14
15 #
16 # Smoke all branches except for blocked* and wip/*
17 #
18 # Additionally master does not smoke with bleadperl
19 # ( implemented in maint/travis-ci_scripts/10_before_install.bash )
20 #
21 branches:
22   except:
23     - /^wip\//
24     - /^blocked/
25
26 notifications:
27   irc:
28     channels:
29       - "irc.perl.org#dbic-smoke"
30     template:
31       - "%{branch}#%{build_number} by %{author}: %{message} (%{build_url})"
32     on_success: change
33     on_failure: always
34     use_notice: true
35
36   email:
37     recipients:
38       - ribasushi@cpan.org
39     on_success: change
40     on_failure: always
41
42 addons:
43   apt:
44     packages:
45       - libapp-nopaste-perl
46       - net-tools
47
48 # This is probably a net-loss for setup etc - a bare 'C' will likely fare much better
49 language: perl
50
51 # Currently not trying osx: https://github.com/travis-ci/travis-ci/issues/2314
52 os: linux
53
54 # The defaults run under the more rapid container infra. The hardware is
55 # actually *much* slower, but the jobs start much faster, for more info see
56 # https://docs.travis-ci.com/user/ci-environment/#Virtualization-environments
57 # Combined with 'fast_finish' this will result in an "uh-oh" email as early
58 # as possible
59 dist: precise
60 sudo: false
61 env: CLEANTEST=true
62
63 perl:
64   - "5.8"
65   - "5.22-extras"
66
67 matrix:
68   fast_finish: true
69
70   include:
71
72     # Same as the "master matrix" above, frozen under older dist/infrastructure
73     # In genereal it is strongly recommended to keep things on the older
74     # version indefinitely - there is little value in-depth smoking on
75     # more recent software stacks
76     - perl: "5.8"
77       sudo: required
78       dist: precise
79       env:
80         - CLEANTEST=false
81
82     - perl: "5.22-extras"
83       sudo: required
84       dist: precise
85       env:
86         - CLEANTEST=false
87
88     # CLEANTEST of minimum supported with non-tracing poisoning, single thread (hence the sudo)
89     - perl: "5.8.3_nt_mb"
90       sudo: required
91       dist: precise
92       env:
93         - VCPU_USE=1
94         - CLEANTEST=true
95         - POISON_ENV=true
96         - DBIC_TRACE_PROFILE=console_monochrome
97         - BREWVER=5.8.3
98         - BREWOPTS="-Dusemorebits"
99
100     # Full Test of minimum supported without threads with plain poisoned trace
101     - perl: "5.8.3_nt"
102       sudo: required
103       dist: precise
104       # run these under legacy - great simulation of low memory env
105       group: legacy
106       env:
107         - CLEANTEST=false
108         - POISON_ENV=true
109         - DBIC_TRACE=1
110         - BREWVER=5.8.3
111
112     # Full Test of minimum supported with threads with non-tracing poisoning
113     - perl: "5.8.5_thr"
114       sudo: required
115       dist: precise
116       # run these under legacy - great simulation of low memory env
117       group: legacy
118       env:
119         - CLEANTEST=false
120         - POISON_ENV=true
121         - DBIC_TRACE_PROFILE=console
122         - BREWVER=5.8.5
123         - BREWOPTS="-Duseithreads"
124
125     # CLEANTEST of solaris-like perl with non-tracing poisoning
126     - perl: "5.8.4_nt"
127       sudo: false
128       dist: precise
129       env:
130         - CLEANTEST=true
131         - POISON_ENV=true
132         - DBIC_TRACE_PROFILE=console
133         - BREWVER=5.8.4
134
135     # CLEANTEST: this particular perl is quite widespread
136     - perl: "5.8.8_thr"
137       sudo: false
138       dist: precise
139       env:
140         - CLEANTEST=true
141         - BREWVER=5.8.8
142         - BREWOPTS="-Duseithreads"
143
144     # CLEANTEST: this is the perl suse ships, with env poisoning
145     - perl: "5.10.0_thr_dbg"
146       sudo: false
147       dist: precise
148       env:
149         - CLEANTEST=true
150         - POISON_ENV=true
151         - BREWVER=5.10.0
152         - BREWOPTS="-DDEBUGGING -Duseithreads"
153
154     # CLEANTEST: this one is in a number of debian-based LTS (test a sane CPAN.pm, single thread)
155     - perl: "5.14.2_thr_mb"
156       sudo: required
157       dist: precise
158       env:
159         - VCPU_USE=1
160         - CLEANTEST=true
161         - BREWVER=5.14.2
162         - BREWOPTS="-Duseithreads -Dusemorebits"
163
164     ###
165     # some permutations of tracing and envvar poisoning
166
167     - perl: "5.12.3_thr"
168       sudo: false
169       dist: precise
170       env:
171         - CLEANTEST=true
172         - POISON_ENV=true
173         - DBIC_TRACE=1
174         - DBIC_MULTICREATE_DEBUG=1
175         - DBIC_STORAGE_RETRY_DEBUG=1
176         - DBIC_TRACE_PROFILE=console
177         - BREWVER=5.12.3
178         - BREWOPTS="-Duseithreads"
179
180     - perl: "5.16.3_thr_mb"
181       sudo: required
182       dist: precise
183       env:
184         - CLEANTEST=false
185         - POISON_ENV=true
186         - DBIC_TRACE=1
187         - BREWVER=5.16.3
188         - BREWOPTS="-Duseithreads -Dusemorebits"
189
190     - perl: "5.18-extras"
191       sudo: required
192       # explicit new infra spec preparing for a future forced upgrade
193       dist: trusty
194       env:
195         - CLEANTEST=false
196         - POISON_ENV=true
197         - DBIC_TRACE=1
198         - DBIC_TRACE_PROFILE=console_monochrome
199         - DBICTEST_VIA_REPLICATED=0
200         - DBICTEST_VERSION_WARNS_INDISCRIMINATELY=1
201
202     ###
203     # Start of the allow_failures block
204
205     # threaded oldest possible with blead CPAN
206     - perl: "devcpan_5.8.1_thr_mb"
207       sudo: false
208       dist: precise
209       env:
210         - CLEANTEST=true
211         - DEVREL_DEPS=true
212         - BREWVER=5.8.1
213         - BREWOPTS="-Duseithreads -Dusemorebits"
214
215     # oldest possible with blead CPAN with poisoning and plain trace
216     - perl: "devcpan_5.8.1"
217       sudo: false
218       dist: precise
219       env:
220         - CLEANTEST=true
221         - DEVREL_DEPS=true
222         - POISON_ENV=true
223         - DBIC_TRACE=1
224         - DBICTEST_VERSION_WARNS_INDISCRIMINATELY=1
225         - BREWVER=5.8.1
226
227     # 5.8.3 with blead CPAN
228     - perl: "devcpan_5.8.3_mb"
229       sudo: required
230       # explicit new infra spec preparing for a future forced upgrade
231       dist: trusty
232       env:
233         - CLEANTEST=false
234         - DEVREL_DEPS=true
235         - BREWVER=5.8.3
236         - BREWOPTS="-Dusemorebits"
237
238     # 5.8.7 threaded with blead CPAN with non-tracing poisoning
239     - perl: "devcpan_5.8.7_thr"
240       sudo: false
241       dist: precise
242       env:
243         - CLEANTEST=true
244         - DEVREL_DEPS=true
245         - POISON_ENV=true
246         - BREWVER=5.8.7
247         - BREWOPTS="-Duseithreads"
248
249     # 5.8.8 threaded MB (exercises P5#72210)
250     - perl: "devcpan_5.8.8_thr_mb"
251       sudo: false
252       dist: precise
253       env:
254         - CLEANTEST=true
255         - DBICTEST_VERSION_WARNS_INDISCRIMINATELY=1
256         - DEVREL_DEPS=true
257         - BREWVER=5.8.8
258         - BREWOPTS="-Duseithreads -Dusemorebits"
259
260     # 5.10.0 threaded with blead CPAN
261     - perl: "devcpan_5.10.0_thr_mb"
262       sudo: false
263       dist: precise
264       env:
265         - CLEANTEST=true
266         - DEVREL_DEPS=true
267         - BREWVER=5.10.0
268         - BREWOPTS="-Duseithreads -Dusemorebits"
269
270     # 5.12.1 with blead CPAN
271     - perl: "devcpan_5.12.1_thr"
272       sudo: false
273       dist: precise
274       env:
275         - CLEANTEST=true
276         - DEVREL_DEPS=true
277         - BREWVER=5.12.1
278         - BREWOPTS="-Duseithreads"
279
280     # bleadperl with stock CPAN, full depchain test with non-tracing poisoning, single thread
281     - perl: "bleadperl"
282       sudo: required
283       dist: precise
284       env:
285         - VCPU_USE=1
286         - CLEANTEST=true
287         - POISON_ENV=true
288         - BREWVER=blead
289
290     # bleadperl with blead CPAN
291     - perl: "devcpan_bleadperl_thr_mb"
292       sudo: required
293       # explicitly do not specify dist - see what the default does
294       env:
295         - CLEANTEST=false
296         - DEVREL_DEPS=true
297         - BREWVER=blead
298         - BREWOPTS="-Duseithreads -Dusemorebits"
299
300     # CLEANTEST of http://schplog.schmorp.de/2015-06-06-a-stable-perl.html with non-tracing poisoning
301     - perl: "schmorp_stableperl_thr_mb"
302       sudo: false
303       dist: precise
304       env:
305         - CLEANTEST=true
306         - POISON_ENV=true
307         - BREWVER=schmorp_stableperl
308         - BREWOPTS="-Duseithreads -Dusemorebits"
309
310   # which ones of the above can fail
311   allow_failures:
312
313     # these run with various dev snapshots - allowed to fail
314     - perl: devcpan_5.8.1_thr_mb
315     - perl: devcpan_5.8.1
316     - perl: devcpan_5.8.3_mb
317     - perl: devcpan_5.8.7_thr
318     - perl: devcpan_5.8.8_thr_mb
319     - perl: devcpan_5.10.0_thr_mb
320     - perl: devcpan_5.12.1_thr
321     - perl: bleadperl
322     - perl: devcpan_bleadperl_thr_mb
323     - perl: schmorp_stableperl_thr_mb
324
325
326 ###
327 ### For the following two phases -e is *set*
328 ###
329
330 before_install:
331   # common functions for all run phases below
332   #
333   # this is an exporter - sourcing it is crucial
334   # among other things it also sets -e
335   #
336   - source maint/travis-ci_scripts/common.bash
337
338   # Sets global envvars, downloads/configures debs based on CLEANTEST
339   # Sets extra DBICTEST_* envvars
340   #
341   # this is an exporter - sourcing it is crucial
342   #
343   - source maint/travis-ci_scripts/10_before_install.bash
344
345 install:
346   # Build and switch to a custom perl if requested
347   # Configure the perl env, preinstall some generic toolchain parts
348   # Possibly poison the environment
349   #
350   # this is an exporter - sourcing it is crucial
351   #
352   - source maint/travis-ci_scripts/20_install.bash
353
354 ###
355 ### From this point on -e is *unset*, rely on travis' error handling
356 ###
357   - set +e
358
359 before_script:
360   # Preinstall/install deps based on envvars/CLEANTEST
361   #
362   # need to invoke the after_failure script manually
363   # because 'after_failure' runs only after 'script' fails
364   #
365   - maint/getstatus maint/travis-ci_scripts/30_before_script.bash || ( maint/travis-ci_scripts/50_after_failure.bash && /bin/false )
366
367 script:
368   # Run actual tests
369   #
370   - maint/getstatus maint/travis-ci_scripts/40_script.bash
371
372 ###
373 ### Set -e back, work around https://github.com/travis-ci/travis-ci/issues/3533
374 ###
375   - set -e
376
377 after_success:
378   # Check if we can assemble a dist properly if not in CLEANTEST
379   #
380   - maint/getstatus maint/travis-ci_scripts/50_after_success.bash
381
382 after_failure:
383   # Final sysinfo printout on fail
384   #
385   - maint/getstatus maint/travis-ci_scripts/50_after_failure.bash
386
387 after_script:
388   # No tasks yet
389   #
390   #- maint/getstatus maint/travis-ci_scripts/60_after_script.bash