(travis) Better diagnostics on *why* a build failed, reduce parellelism
[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 ribasushi. *DO NOT* disable 5.8 testing - it is here for a
10 # reason
11 #
12 # * The matrix is built from two main modes - CLEANTEST = [true|false].
13 # - In the first case we test with minimal deps available, and skip everything
14 #   listed in DBIC::OptDesps. The modules are installed with classic CPAN
15 #   invocations and are *fully tested*. In other words we simulate what would
16 #   happen if a user tried to install on a just-compiled virgin perl
17 # - Without CLEANTEST we bring the armada of RDBMS and install the maximum
18 #   possible set of deps *without testing them*. This ensures we stay within
19 #   a reasonable build-time and still run as many of our tests as possible
20 #
21 # * The perl builds and the DBIC tests run under NUMTHREADS number of threads.
22 # The testing of dependencies under CLEANTEST runs single-threaded, at least
23 # until we fix our entire dep-chain to safely pass under -j
24 #
25 # * The way .travis.yml is fed to the command controller is idiotic - it
26 # makes using multiline `bash -c` statements impossible. Therefore to
27 # aid readability (our travis logic is rather complex), the bulk of
28 # functionality is moved to scripts. More about the problem (and the
29 # WONTFIX "explanation") here: https://github.com/travis-ci/travis-ci/issues/497
30 #
31 # the entire run times out after 50 minutes, or after 5 minutes without
32 # console output
33
34 #
35 # Smoke all branches except for blocked* and wip/*
36 #
37 # Additionally master does not smoke with bleadperl
38 # ( implemented in maint/travis-ci_scripts/10_before_install.bash )
39 #
40 branches:
41   except:
42     - /^wip\//
43     - /^blocked/
44
45 notifications:
46   irc:
47     channels:
48       - "irc.perl.org#dbic-smoke"
49     template:
50       - "%{branch}#%{build_number} by %{author}: %{message} (%{build_url})"
51     on_success: change
52     on_failure: always
53     use_notice: true
54
55   email:
56     recipients:
57       - ribasushi@cpan.org
58       # Temporary - if it proves to be too noisy, we'll shut it off
59       #- dbix-class-devel@lists.scsys.co.uk
60     on_success: change
61     on_failure: always
62
63 # FIXME - This stuff is not yet available for free OSS accounts, sadpanda
64 # First paragrah on http://about.travis-ci.org/docs/user/caching/
65 #cache:
66 #  apt: true
67 #  directories:
68 #    - /var/cache/apt/archives
69
70 language: perl
71
72 perl:
73   - "5.20-extras"
74
75 env:
76   - CLEANTEST=false
77   - CLEANTEST=true
78
79 matrix:
80   fast_finish: true
81   include:
82     # this particular perl is quite widespread
83     - perl: 5.8.8_thr_mb
84       env:
85         - CLEANTEST=true
86         - BREWOPTS="-Duseithreads -Dusemorebits"
87         - BREWVER=5.8.8
88
89     # so is this one (test a sane CPAN.pm)
90     - perl: 5.12.4_thr_mb
91       env:
92         - CLEANTEST=true
93         - BREWOPTS="-Duseithreads -Dusemorebits"
94         - BREWVER=5.12.4
95
96     # this is the perl suse ships
97     - perl: 5.10.0_thr_dbg
98       env:
99         - CLEANTEST=true
100         - BREWOPTS="-DDEBUGGING -Duseithreads"
101         - BREWVER=5.10.0
102
103     # CLEANTEST of minimum supported
104     - perl: 5.8.3_nt_mb
105       env:
106         - CLEANTEST=true
107         - BREWOPTS="-Dusemorebits"
108         - BREWVER=5.8.3
109
110     # Full Test of minimum supported with threads
111     - perl: 5.8.5_thr
112       env:
113         - CLEANTEST=false
114         - BREWOPTS="-Duseithreads"
115         - BREWVER=5.8.5
116         - DBIC_TRACE_PROFILE=console
117
118     # Full Test of minimum supported without threads
119     - perl: 5.8.3_nt
120       env:
121         - CLEANTEST=false
122         - BREWOPTS=""
123         - BREWVER=5.8.3
124         - DBIC_TRACE_PROFILE=console_monochrome
125
126     ###
127     # some permutations of tracing and envvar poisoning
128
129     - perl: 5.16.3_thr_mb
130       env:
131         - CLEANTEST=false
132         - POISON_ENV=true
133         - DBIC_TRACE=1
134         - DBIC_MULTICREATE_DEBUG=0
135         - BREWOPTS="-Duseithreads -Dusemorebits"
136         - BREWVER=5.16.3
137
138     - perl: 5.20-extras
139       env:
140         - CLEANTEST=false
141         - POISON_ENV=true
142         - DBIC_TRACE_PROFILE=console
143
144     - perl: 5.8
145       env:
146         - CLEANTEST=true
147         - POISON_ENV=true
148         - DBIC_TRACE=1
149         - DBIC_TRACE_PROFILE=console
150
151     - perl: 5.18-extras
152       env:
153         - CLEANTEST=false
154         - POISON_ENV=true
155         - DBIC_TRACE=1
156         - DBIC_TRACE_PROFILE=console_monochrome
157         - DBIC_MULTICREATE_DEBUG=0
158
159     ###
160     # Start of the allow_failures block
161
162     # old threaded with blead CPAN
163     - perl: devcpan_5.8.7_thr
164       env:
165         - CLEANTEST=true
166         - BREWOPTS="-Duseithreads"
167         - BREWVER=5.8.7
168         - DEVREL_DEPS=true
169
170     # 5.10.0 threaded with blead CPAN
171     - perl: devcpan_5.10.0_thr_mb
172       env:
173         - CLEANTEST=true
174         - BREWOPTS="-Duseithreads -Dusemorebits"
175         - BREWVER=5.10.0
176         - DEVREL_DEPS=true
177
178     # 5.12.2 with blead CPAN
179     - perl: devcpan_5.12.2_thr
180       env:
181         - CLEANTEST=true
182         - BREWOPTS="-Duseithreads"
183         - BREWVER=5.12.2
184         - DEVREL_DEPS=true
185
186     # recentish threaded stable with blead CPAN
187     - perl: devcpan_5.18.2_thr_mb
188       env:
189         - CLEANTEST=false
190         - BREWOPTS="-Duseithreads -Dusemorebits"
191         - BREWVER=5.18.2
192         - DEVREL_DEPS=true
193
194     # bleadperl with stock CPAN, full depchain test
195     - perl: bleadperl
196       env:
197         - CLEANTEST=true
198         - BREWVER=blead
199
200     # bleadperl with blead CPAN
201     - perl: devcpan_bleadperl_thr_mb
202       env:
203         - CLEANTEST=false
204         - BREWOPTS="-Duseithreads -Dusemorebits"
205         - BREWVER=blead
206         - DEVREL_DEPS=true
207
208
209   # which ones of the above can fail
210   allow_failures:
211
212     # these run with various dev snapshots - allowed to fail
213     - perl: devcpan_5.8.7_thr
214     - perl: devcpan_5.10.0_thr_mb
215     - perl: devcpan_5.12.2_thr
216     - perl: devcpan_5.18.2_thr_mb
217     - perl: bleadperl
218     - perl: devcpan_bleadperl_thr_mb
219
220
221 ###
222 ### For the following two phases -e is *set*
223 ###
224
225 before_install:
226   # common functions for all run phases below
227   #
228   # this is an exporter - sourcing it is crucial
229   # among other things it also sets -e
230   #
231   - source maint/travis-ci_scripts/common.bash
232
233   # Sets global envvars, downloads/configures debs based on CLEANTEST
234   # Sets extra DBICTEST_* envvars
235   #
236   # this is an exporter - sourcing it is crucial
237   #
238   - source maint/travis-ci_scripts/10_before_install.bash
239
240 install:
241   # Build and switch to a custom perl if requested
242   # Configure the perl env, preinstall some generic toolchain parts
243   # Possibly poison the environment
244   #
245   # this is an exporter - sourcing it is crucial
246   #
247   - source maint/travis-ci_scripts/20_install.bash
248
249 ###
250 ### From this point on -e is *unset*, rely on travis' error handling
251 ###
252   - set +e
253
254 before_script:
255   # Preinstall/install deps based on envvars/CLEANTEST
256   #
257   # need to invoke the after_failure script manually
258   # because 'after_failure' runs only after 'script' fails
259   #
260   - maint/getstatus maint/travis-ci_scripts/30_before_script.bash || ( maint/travis-ci_scripts/50_after_failure.bash && /bin/false )
261
262 script:
263   # Run actual tests
264   #
265   - maint/getstatus maint/travis-ci_scripts/40_script.bash
266
267 after_success:
268   # Check if we can assemble a dist properly if not in CLEANTEST
269   #
270   - maint/getstatus maint/travis-ci_scripts/50_after_success.bash
271
272 after_failure:
273   # Final sysinfo printout on fail
274   #
275   - maint/getstatus maint/travis-ci_scripts/50_after_failure.bash
276
277 after_script:
278   # No tasks yet
279   #
280   #- maint/getstatus maint/travis-ci_scripts/60_after_script.bash