Skip to content

Commit

Permalink
Merge pull request #11 from PDLPorters/add-travis-deps
Browse files Browse the repository at this point in the history
Beef up CI with optional requirements spelled out and apt installed
  • Loading branch information
mohawk2 committed Aug 29, 2015
2 parents 166b1e2 + 2425957 commit 58c48de
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .travis.yml
Expand Up @@ -4,6 +4,9 @@ addons:
apt:
packages:
- build-essential
- gfortran
- pgplot5
- libgsl0-dev
matrix:
include:
# start the first coverage early so that it starts before everything else
Expand Down Expand Up @@ -35,6 +38,7 @@ 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
- export PGPLOT_DEV=/NULL
- perl -pi -e 's|WITH_BADVAL => 1|WITH_BADVAL => 0| if defined $ENV{PDL_WITH_BADVAL} && $ENV{PDL_WITH_BADVAL} == 0' perldl.conf # disable bad value support
- perl -pi -e 's|BADVAL_USENAN => 0|BADVAL_USENAN => 1| if defined $ENV{PDL_BADVAL_USENAN} && $ENV{PDL_BADVAL_USENAN} == 1' perldl.conf # enable BADVAL_USENAN
- perl -pi -e 's|BADVAL_PER_PDL => 0|BADVAL_PER_PDL => 1| if defined $ENV{PDL_BADVAL_PER_PDL} && $ENV{PDL_BADVAL_PER_PDL} == 1' perldl.conf # enable BADVAL_PER_PDL
Expand All @@ -43,6 +47,7 @@ before_install:
- source ~/travis-perl-helpers/init
- build-perl
- perl -V
- cpanm --notest ExtUtils::F77 PGPLOT # do not need tests
- 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
Expand Down
13 changes: 12 additions & 1 deletion Makefile.PL
Expand Up @@ -12,7 +12,6 @@ if ($] >= 5.015000 and $] < 5.015009 and !$force) {
exit;
}


WriteMakefile(
NAME => 'PDL::Stats',
AUTHOR => 'Maggie J. Xiong <maggiexyz users.sourceforge.net>',
Expand All @@ -23,16 +22,28 @@ WriteMakefile(
: ()),
PREREQ_PM => {
'PDL::Core' => 2.008,
'PDL::Graphics::PGPLOT' => 0,
'PGPLOT' => 0,
'PDL::GSL::CDF' => 0,
'PDL::Slatec' => 0,
},
CONFIGURE_REQUIRES => {
'PDL::Core' => 2.008,
},
BUILD_REQUIRES => {
'PDL::Core' => 2.008,
'PDL::Graphics::PGPLOT' => 0,
'PGPLOT' => 0,
'PDL::GSL::CDF' => 0,
'PDL::Slatec' => 0,
},
TEST_REQUIRES => {
'PDL::Core' => 2.008,
'Test::More' => 0,
'PDL::Graphics::PGPLOT' => 0,
'PGPLOT' => 0,
'PDL::GSL::CDF' => 0,
'PDL::Slatec' => 0,
},
DIR => ['Basic', 'Distr', 'GLM', 'Kmeans', 'GSL', 'TS'],
dist => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', },
Expand Down

0 comments on commit 58c48de

Please sign in to comment.