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 |
baa02fa9 |
14 | # FIXME - these really need to be installed *with* testing under "allowed failures" |
15 | # Change when Moose goes away |
16 | parallel_installdeps_notest Moose |
bf44bdb9 |
17 | parallel_installdeps_notest $(perl -Ilib -MDBIx::Class::Optional::Dependencies=-list_missing,dist_dir) |
18 | |
19 | run_or_err "Attempt to build a dist" "rm -rf inc/ && perl Makefile.PL --skip-author-deps && make dist" |
20 | tarball_assembled=1 |
21 | |
22 | elif [[ "$CLEANTEST" != "true" ]] ; then |
afb8fc52 |
23 | parallel_installdeps_notest $(perl -Ilib -MDBIx::Class::Optional::Dependencies=-list_missing,dist_dir) |
bf44bdb9 |
24 | |
25 | run_or_err "Attempt to build a dist from original checkout" "make dist" |
26 | tarball_assembled=1 |
27 | fi |
28 | |
29 | |
30 | if [[ -n "$tarball_assembled" ]] ; then |
31 | |
7343c211 |
32 | echo "Contents of the resulting dist tarball:" |
33 | echo "===========================================" |
6a0cbc58 |
34 | tar -vzxf DBIx-Class-*.tar.gz |
7343c211 |
35 | echo "===========================================" |
bf44bdb9 |
36 | |
37 | # kill as much as possible with fire |
38 | purge_sitelib |
39 | |
baa02fa9 |
40 | |
41 | # undo some of the pollution (if any) affecting the plain install deps |
42 | # FIXME - this will go away once we move off Moose, and a new SQLT |
43 | # with much less recommends ships |
44 | export DBICTEST_SQLT_DEPLOY="" |
45 | export DBICTEST_VIA_REPLICATED="" |
46 | |
47 | |
bf44bdb9 |
48 | # make sure we are retrying with newest CPAN possible |
49 | # |
50 | # not running tests on CPAN.pm - they are not terribly slow, |
51 | # but https://rt.cpan.org/Ticket/Display.html?id=96437 sucks |
52 | parallel_installdeps_notest CPAN |
53 | run_or_err "Make sure CPAN was upgraded to at least 2.10" "perl -M'CPAN 2.010' -e1" |
54 | |
55 | run_or_err "Re-Configuring CPAN.pm" "perl -MCPAN -e '\ |
56 | CPAN::Config->load; |
57 | |
58 | # For the time being smoking with this setting is not realistic |
59 | # https://rt.cpan.org/Ticket/Display.html?id=103280 |
60 | # https://rt.cpan.org/Ticket/Display.html?id=37641 |
61 | # https://rt.cpan.org/Ticket/Display.html?id=77708 |
62 | # https://rt.cpan.org/Ticket/Display.html?id=87474 |
63 | #\$CPAN::Config->{build_requires_install_policy} = q{no}; |
64 | |
65 | \$CPAN::Config->{recommends_policy} = q{yes}; |
66 | CPAN::Config->commit; |
67 | '" |
68 | |
69 | cd "$(find DBIx-Class-* -maxdepth 0 -type d | head -n 1)" |
70 | |
baa02fa9 |
71 | # only run a full test cycle on devrel_deps, as they are all marked |
72 | # as "allow fails" in the travis matrix |
bf44bdb9 |
73 | if [[ "$DEVREL_DEPS" == "true" ]] ; then |
74 | |
75 | for e in $( env | grep 'DBICTEST.*DSN' | cut -f 1 -d '=' ) ; do |
76 | echo "Unsetting $e" |
77 | export $e="" |
78 | done |
79 | |
80 | run_or_err \ |
81 | "Attempt to configure/test/build/install dist using latest CPAN@$(perl -MCPAN -e 'print CPAN->VERSION')" \ |
82 | "cpan ." |
83 | |
84 | else |
85 | run_or_err \ |
86 | "Attempt to configure/build/install dist using latest CPAN@$(perl -MCPAN -e 'print CPAN->VERSION')" \ |
87 | "perl -MCPAN -e 'notest( install => q{.} )'" |
88 | fi |
344f1f52 |
89 | fi |