This repository has been archived by the owner on Jan 23, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
63 lines (63 loc) · 2.58 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
language: perl
sudo: false
addons:
apt:
packages:
- build-essential
- libgd2-xpm-dev
matrix:
include:
# start the first coverage early so that it starts before everything else
- perl: "5.20"
env: COVERAGE=1
- perl: "5.20"
env: EUMM_BLEAD=1
- perl: "5.20"
env: TEST_INSTALLED=1 # test not from blib but after installing
- perl: "5.10"
- perl: "blead"
- perl: "5.20"
- perl: "5.20"
env: CC="clang" # use `clang` instead of `gcc` default
allow_failures:
- perl: blead
before_install:
# clang is already installed in Travis-CI environment. Using PERL_MM_OPT does not work with subdirectory Makefile.PLs so we override Config.pm
# Also, both $Config{cc} and $Config{ld} need to be set because under ELF environments (such as Travis-CI's Ubuntu), this is what Perl's Config.pm does.
- if [ "$CC" == "clang" ]; then mkdir build_aux; echo 'package force_clang; use ExtUtils::MakeMaker::Config; $Config{cc} = $Config{ld} = "clang"; 1' > build_aux/force_clang.pm; export PERL5OPT="-I$(pwd)/build_aux -Mforce_clang"; fi
- git clone git://github.com/travis-perl/helpers ~/travis-perl-helpers
- export SPLIT_BUILD=0
- source ~/travis-perl-helpers/init
- build-perl
- perl -V
- if [ "$AUTHOR_TESTING" == 1 ]; then cpanm --quiet --notest CPAN::Changes; fi # for author tests (AUTHOR_TESTING is set to true by default by init)
- cpanm --force --verbose ExtUtils::ParseXS # we install the latest ExtUtils::ParseXS
- if [ "$EUMM_BLEAD" == 1 ]; then cpanm --quiet --notest --dev ExtUtils::MakeMaker; fi
- build-dist
- SRC_DIR=$(pwd)
- cd $BUILD_DIR # $BUILD_DIR is set by the build-dist command
install:
- cpan-install --deps # installs prereqs, including recommends
- cpan-install --coverage # installs coverage prereqs, if enabled
- prove t/01-checkmanifest.t
- prove -b -v $SRC_DIR/xt/00-check-changelog.t # run the author test out of the source directory
# SYSTEM_CORES set by travis-perl-helpers
- if [ "$SERIAL_BUILD" == 1 ]; then make; else make -j$(( $SYSTEM_CORES * 2 )); fi
before_script:
- coverage-setup
script:
- export PROVE_FLAG=""; if [ "$TEST_INSTALLED" == 1 ]; then make install clean; else PROVE_FLAG="-b -v"; fi # clean is to ensure no blib
- if [ "$SERIAL_TESTING" == 1 ]; then prove $PROVE_FLAG $(test-files); else prove --formatter TAP::Formatter::File -j$(test-jobs) $PROVE_FLAG $(test-files); fi
after_success:
- coverage-report
branches:
except:
- /^wip\//
- /^blocked/
only:
- master
notifications:
irc:
channels:
- "irc.perl.org#pdl"
skip_join: true