Turn the CLEANTEST smokes into full blown CPAN-based installs with testing
[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 a script. More about the problem (and the
29 # WONTFIX "explanation") here: https://github.com/travis-ci/travis-ci/issues/497
30 #
31
32 # Smoke only specific branches to a) not overload the queue and b) not
33 # overspam the notification channels
34 # Furthermore if the branch is ^topic/ - the custom compiled smokes will
35 # not run at all, again in order to conserve queue resources
36 branches:
37   only:
38     - master
39     - /^smoke\//
40     - /^topic\//
41
42 notifications:
43   irc:
44     channels:
45       - "irc.perl.org#dbic-smoke"
46     template:
47       - "%{branch}#%{build_number} by %{author}: %{message} (%{build_url})"
48     on_success: change
49     on_failure: always
50     use_notice: true
51
52   email:
53     recipients:
54       - ribasushi@cpan.org
55       # Temporary - if it proves to be too noisy, we'll shut it off
56       #- dbix-class-devel@lists.scsys.co.uk
57     on_success: change
58     on_failure: change
59
60 language: perl
61
62 perl:
63   - "5.16"
64
65 env:
66   - CLEANTEST=false
67   - CLEANTEST=true
68
69 matrix:
70   include:
71     # minimum supported with threads
72     - perl: 5.8.5_thr
73       env:
74         - CLEANTEST=false
75         - BREWOPTS="-Duseithreads"
76         - BREWVER=5.8.5
77
78     # minimum supported without threads
79     - perl: 5.8.3_nt
80       env:
81         - CLEANTEST=false
82         - BREWOPTS=""
83         - BREWVER=5.8.3
84
85     # check CLEANTEST of minimum supported
86     - perl: 5.8.3_nt_mb
87       env:
88         - CLEANTEST=true
89         - BREWOPTS="-Dusemorebits"
90         - BREWVER=5.8.3
91
92     # this is the perl suse ships
93     - perl: 5.10.0_thr_dbg
94       env:
95         - CLEANTEST=true
96         - BREWOPTS="-DDEBUGGING -Duseithreads"
97         - BREWVER=5.10.0
98
99     # this particular perl is quite widespread
100     - perl: 5.8.8_thr_mb
101       env:
102         - CLEANTEST=true
103         - BREWOPTS="-Duseithreads -Dusemorebits"
104         - BREWVER=5.8.8
105
106 before_install:
107   # Do not make this part of the env-matrix
108   # different boxes we run on have different amount of hw threads
109   # hence why we need to query
110   # result is 1.5 times the physical threads
111   - export NUMTHREADS=$(( ( $(cut -f 2 -d '-' /sys/devices/system/cpu/online) + 1 ) * 15 / 10  ))
112
113 install:
114   # Build and switch to a custom perl if requested
115   # Set the environment based on CLEANTEST
116   # Preinstall/install deps
117   #
118   # sourcing the file is *EXTREMELY* important - otherwise
119   # no envvars will survive
120   - source maint/travis-ci_prepare_env
121
122 script:
123   - export HARNESS_TIMER=1 HARNESS_OPTIONS=c:j$NUMTHREADS
124
125   # either a plain 'make test' OR a shuffled prove torture
126   # use the random order test plan unless CLEANTEST
127   # prepare_env may have short-circuited the test entirely
128   - test -n "$SHORT_CIRCUIT_SMOKE" || (test "$CLEANTEST" = "true" && make test || prove -lrswj$NUMTHREADS t xt)