Skip to content

Commit

Permalink
add Travis config file
Browse files Browse the repository at this point in the history
  • Loading branch information
KohaAloha committed Aug 27, 2013
1 parent 3572215 commit d9c8cb1
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 2 deletions.
25 changes: 25 additions & 0 deletions .travis.yml
@@ -0,0 +1,25 @@
language: perl
perl:
- "5.8"
- "5.10"
- "5.12"
- "5.14"
- "5.16"
- "5.18"

before_install:
# install tiff
- sudo apt-get update
# - sudo apt-get -y purge ruby libtiff4 libtiff4-dev libtiffxx0c2 zlib1g-dev
# - sudo apt-get autoremove
- cat ./cpan-deps | cpanm --sudo --notest

install:
- perl ./Build.PL --travis
- ./Build
- sudo ./Build install

script: prove -v

notifications:
irc: irc.perl.org#sdl
17 changes: 15 additions & 2 deletions Build.PL
Expand Up @@ -6,6 +6,10 @@ use File::Spec::Functions qw(catdir catfile);
use Config;
use My::Utility qw(check_config_script check_prebuilt_binaries check_prereqs_libs check_prereqs_tools $source_packs);

use Getopt::Long;
my ( $ans, $travis ) = 0;
GetOptions( "travis" => \$travis );

print "Welcome to Alien::SDL module installation\n";
print "-----------------------------------------\n";
print "checking operating system... $^O\n";
Expand Down Expand Up @@ -209,8 +213,17 @@ else {

$prompt_string .= "[" . $i++ . "] " . $c->{title} . "\n";
}
$prompt_string .= "\nWhat way do you wanna go?";
my $ans = $build->prompt($prompt_string, $recommended_candidate);

# select option '1' for travis
if ( defined $travis and $travis == 1 ) {
$ans = 1;
}

# or prompt user for build option
else {
$prompt_string .= "\nWhat way do you wanna go?";
$ans = $build->prompt( $prompt_string, $recommended_candidate );
}

if($ans > 0 && $ans < scalar(@candidates)) {
$choice = $candidates[$ans - 1];
Expand Down
20 changes: 20 additions & 0 deletions cpan-deps
@@ -0,0 +1,20 @@
Archive::Extract
Capture::Tiny
Cwd
Digest::SHA
Exporter
ExtUtils::CBuilder
ExtUtils::Command
File::Copy
File::Fetch
File::Find
File::Path
File::ShareDir
File::Spec
File::Spec::Functions
File::Temp
File::Which
Getopt::Long
Module::Build
Test::More
Text::Patch

0 comments on commit d9c8cb1

Please sign in to comment.