summaryrefslogtreecommitdiffstats
path: root/.travis/build.pl
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2014-08-17 06:35:00 -0400
committerJesse Luehrs <doy@tozt.net>2014-08-17 06:35:00 -0400
commitdb3ca13185dac5802e56c18f6d181f886ff28abc (patch)
tree1634b933e52c404779e5f6e5da050986e2690e21 /.travis/build.pl
parenta44b648ec516a0bbdcf9939186233ef8e811b1d3 (diff)
downloadcrawl-ref-travis.tar.gz
crawl-ref-travis.zip
travis configurationtravis
Diffstat (limited to '.travis/build.pl')
-rw-r--r--.travis/build.pl31
1 files changed, 31 insertions, 0 deletions
diff --git a/.travis/build.pl b/.travis/build.pl
new file mode 100644
index 0000000000..35ebcab377
--- /dev/null
+++ b/.travis/build.pl
@@ -0,0 +1,31 @@
+#!/usr/bin/env perl
+use strict;
+use warnings;
+
+chdir "crawl-ref/source"
+ or die "couldn't chdir: $!";
+
+open my $fh, '>', "util/release_ver"
+ or die "couldn't open util/release_ver: $!";
+$fh->print("v0.0-a0");
+$fh->close;
+
+$ENV{TRAVIS} = 1;
+
+# can't set these in .travis.yml because env vars are set before compiler
+# selection
+$ENV{FORCE_CC} = $ENV{CC};
+$ENV{FORCE_CXX} = $ENV{CXX};
+
+try("make -j2");
+
+if ($ENV{FULLDEBUG} && !$ENV{TILES}) {
+ try("make test");
+}
+
+sub try {
+ my ($cmd) = @_;
+ print "$cmd\n";
+ my $exit = system $cmd;
+ exit $exit if $exit;
+}