Commit | Line | Data |
b58ecb01 |
1 | #!/bin/bash |
2 | |
afeb40d2 |
3 | # this file is executed in a subshell - set up the common stuff |
4 | source maint/travis-ci_scripts/common.bash |
5 | |
01fd95b6 |
6 | if [[ -n "$SHORT_CIRCUIT_SMOKE" ]] || [[ "$TRAVIS_PULL_REQUEST" != "false" ]] ; then exit 0 ; fi |
b58ecb01 |
7 | |
bf44bdb9 |
8 | # this part needs to run in parallel unconditionally |
9 | export VCPU_USE="$VCPU_AVAILABLE" |
baa02fa9 |
10 | export HARNESS_OPTIONS="j$VCPU_USE" |
bf44bdb9 |
11 | |
12 | |
13 | if [[ "$DEVREL_DEPS" == "true" ]] && perl -M5.008003 -e1 &>/dev/null ; then |
179566f3 |
14 | |
15 | [[ "$BREAK_CC" == "true" ]] && run_or_err "Unbreaking previously broken ~/bin/cc" "rm $HOME/bin/cc" |
16 | |
a32fbb3c |
17 | # FIXME - Devel::Cover (brought by Test::Strict, but soon needed anyway) |
18 | # does not test cleanly on 5.8.7 - just get it directly |
19 | if perl -M5.008007 -e1 &>/dev/null && ! perl -M5.008008 -e1 &>/dev/null; then |
20 | parallel_installdeps_notest Devel::Cover |
21 | fi |
22 | |
23 | # FIXME - workaround for YAML/RT#81120 and L::SRH/RT#107681 |
24 | # We don't actually need these modules, only there because of SQLT (which will be fixed) |
25 | # does not test cleanly on 5.8.7 - just get them directly |
26 | if ! perl -M5.008008 -e1 &>/dev/null; then |
27 | parallel_installdeps_notest YAML Lexical::SealRequireHints |
28 | fi |
29 | |
67f5d3f2 |
30 | # FIXME - workaround for RT#113740 |
31 | parallel_installdeps_notest List::AllUtils |
32 | |
a32fbb3c |
33 | # FIXME Change when Moose goes away |
34 | installdeps Moose $(perl -Ilib -MDBIx::Class::Optional::Dependencies=-list_missing,dist_dir) |
bf44bdb9 |
35 | |
7b87b77c |
36 | run_or_err "Attempt to build a dist" "rm -rf inc/ && perl Makefile.PL && make dist" |
bf44bdb9 |
37 | tarball_assembled=1 |
38 | |
39 | elif [[ "$CLEANTEST" != "true" ]] ; then |
afb8fc52 |
40 | parallel_installdeps_notest $(perl -Ilib -MDBIx::Class::Optional::Dependencies=-list_missing,dist_dir) |
bf44bdb9 |
41 | |
42 | run_or_err "Attempt to build a dist from original checkout" "make dist" |
43 | tarball_assembled=1 |
44 | fi |
45 | |
46 | |
47 | if [[ -n "$tarball_assembled" ]] ; then |
48 | |
7343c211 |
49 | echo "Contents of the resulting dist tarball:" |
50 | echo "===========================================" |
6a0cbc58 |
51 | tar -vzxf DBIx-Class-*.tar.gz |
7343c211 |
52 | echo "===========================================" |
bf44bdb9 |
53 | |
54 | # kill as much as possible with fire |
55 | purge_sitelib |
56 | |
baa02fa9 |
57 | |
58 | # undo some of the pollution (if any) affecting the plain install deps |
59 | # FIXME - this will go away once we move off Moose, and a new SQLT |
60 | # with much less recommends ships |
61 | export DBICTEST_SQLT_DEPLOY="" |
62 | export DBICTEST_VIA_REPLICATED="" |
63 | |
64 | |
bf44bdb9 |
65 | # make sure we are retrying with newest CPAN possible |
66 | # |
67 | # not running tests on CPAN.pm - they are not terribly slow, |
68 | # but https://rt.cpan.org/Ticket/Display.html?id=96437 sucks |
69 | parallel_installdeps_notest CPAN |
70 | run_or_err "Make sure CPAN was upgraded to at least 2.10" "perl -M'CPAN 2.010' -e1" |
71 | |
72 | run_or_err "Re-Configuring CPAN.pm" "perl -MCPAN -e '\ |
73 | CPAN::Config->load; |
74 | |
75 | # For the time being smoking with this setting is not realistic |
76 | # https://rt.cpan.org/Ticket/Display.html?id=103280 |
77 | # https://rt.cpan.org/Ticket/Display.html?id=37641 |
78 | # https://rt.cpan.org/Ticket/Display.html?id=77708 |
79 | # https://rt.cpan.org/Ticket/Display.html?id=87474 |
80 | #\$CPAN::Config->{build_requires_install_policy} = q{no}; |
81 | |
82 | \$CPAN::Config->{recommends_policy} = q{yes}; |
83 | CPAN::Config->commit; |
84 | '" |
85 | |
86 | cd "$(find DBIx-Class-* -maxdepth 0 -type d | head -n 1)" |
87 | |
baa02fa9 |
88 | # only run a full test cycle on devrel_deps, as they are all marked |
89 | # as "allow fails" in the travis matrix |
bf44bdb9 |
90 | if [[ "$DEVREL_DEPS" == "true" ]] ; then |
91 | |
92 | for e in $( env | grep 'DBICTEST.*DSN' | cut -f 1 -d '=' ) ; do |
93 | echo "Unsetting $e" |
94 | export $e="" |
95 | done |
96 | |
bf3802a9 |
97 | # FIXME - for some reason a plain `cpan .` does not work in this case |
98 | # no time to investigate |
bf44bdb9 |
99 | run_or_err \ |
100 | "Attempt to configure/test/build/install dist using latest CPAN@$(perl -MCPAN -e 'print CPAN->VERSION')" \ |
bf3802a9 |
101 | "perl -MCPAN -e 'install( q{.} )'" |
bf44bdb9 |
102 | |
103 | else |
104 | run_or_err \ |
105 | "Attempt to configure/build/install dist using latest CPAN@$(perl -MCPAN -e 'print CPAN->VERSION')" \ |
106 | "perl -MCPAN -e 'notest( install => q{.} )'" |
107 | fi |
344f1f52 |
108 | fi |