More extensive travis testing plan
[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]. In
13 # the first case we test with minimal deps available, and skip everything
14 # listed in DBIC::OptDesps. Without CLEANTEST we bring the armada of RDBMS
15 # and install the maximum possible set of deps and configs
16 #
17 # * All builds/tests run under NUMTHREADS number of threads.
18 #
19 # * The way .travis.yml is fed to the command controller is idiotic - it
20 # makes using multiline `bash -c` statements impossible. Therefore to
21 # aid readability (our travis logic is rather complex), the bulk of
22 # functionality is moved to a script. More about the problem (and the
23 # WONTFIX "explanation") here: https://github.com/travis-ci/travis-ci/issues/497
24 #
25
26 # smoke only specific branches to a) not overload the queue and b) not
27 # overspam the notification channels
28 branches:
29   only:
30     - master
31     - /^topic\//
32     - /^smoke\//
33
34 notifications:
35   irc:
36     channels:
37       - "irc.perl.org#dbic-smoke"
38     template:
39       - "%{branch}#%{build_number} by %{author}: %{message} (%{build_url})"
40     on_success: change
41     on_failure: always
42     use_notice: true
43
44   email:
45     - ribasushi@cpan.org
46     # Temporary - if it proves to be too noisy, we'll shut it off
47     - dbix-class-devel@lists.scsys.co.uk
48
49 language: perl
50
51 perl:
52   - "5.16"
53
54 env:
55   - CLEANTEST=false
56   - CLEANTEST=true
57
58 matrix:
59   include:
60     # minimum supported with threads
61     - perl: 5.8.5_thr
62       env:
63         - CLEANTEST=false
64         - BREWOPTS="-Duseithreads"
65         - BREWVER=5.8.5
66
67     # minimum supported without threads
68     - perl: 5.8.3_nt
69       env:
70         - CLEANTEST=false
71         - BREWOPTS=""
72         - BREWVER=5.8.3
73
74     # this is the perl suse ships
75     - perl: 5.10.0_thr_dbg
76       env:
77         - CLEANTEST=true
78         - BREWOPTS="-DDEBUGGING -Duseithreads"
79         - BREWVER=5.10.0
80
81     # this particular perl is quite widespread
82     - perl: 5.8.8_thr_mb
83       env:
84         - CLEANTEST=true
85         - BREWOPTS="-Duseithreads -Dusemorebits"
86         - BREWVER=5.8.8
87
88
89 before_install:
90   # Do not make this part of the env-matrix
91   # different boxes we run on have different amount of hw threads
92   # hence why we need to query
93   # result is 1.5 times the physical threads
94   - export NUMTHREADS=$(( ( $(cut -f 2 -d '-' /sys/devices/system/cpu/online) + 1 ) * 15 / 10  ))
95
96 install:
97   # Build and switch to a custom perl if requested
98   # Set the environment based on CLEANTEST
99   # Preinstall/install deps
100   #
101   # sourcing the file is *EXTREMELY* important - otherwise
102   # no envvars will survive
103   - source maint/travis-ci_prepare_env
104
105 script:
106   # either a plain 'make test' OR a shuffled prove torture
107   - export HARNESS_TIMER=1 HARNESS_OPTIONS=c:j$NUMTHREADS
108   # use the random order test plan unless CLEANTEST
109   - test "$CLEANTEST" = "true" && make test || prove -lrswj$NUMTHREADS t xt