about summary refs log tree commit diff homepage
path: root/.travis
diff options
context:
space:
mode:
authorDan Liew <daniel.liew@imperial.ac.uk>2014-09-14 14:23:15 +0100
committerDan Liew <daniel.liew@imperial.ac.uk>2014-09-15 00:17:10 +0100
commit44d0d9bc1f93da603b8e14c9499e086e220f4694 (patch)
treedc268e235a0642aeb3a3a4c5776abb87e4c4a136 /.travis
parent9dc94bf1f28eb64b2c02172c47b175c75757699f (diff)
downloadklee-44d0d9bc1f93da603b8e14c9499e086e220f4694.tar.gz
Clean up travis build scripts a little.
Diffstat (limited to '.travis')
-rwxr-xr-x.travis/install-llvm-and-runtime-compiler.sh13
-rwxr-xr-x.travis/klee.sh11
2 files changed, 16 insertions, 8 deletions
diff --git a/.travis/install-llvm-and-runtime-compiler.sh b/.travis/install-llvm-and-runtime-compiler.sh
new file mode 100755
index 00000000..e1a17f6b
--- /dev/null
+++ b/.travis/install-llvm-and-runtime-compiler.sh
@@ -0,0 +1,13 @@
+#!/bin/bash
+set -ev
+
+sudo apt-get install llvm-${LLVM_VERSION} llvm-${LLVM_VERSION}-dev
+
+if [ "${LLVM_VERSION}" != "2.9" ]; then
+    sudo apt-get install llvm-${LLVM_VERSION}-tools clang-${LLVM_VERSION}
+else
+    # Get llvm-gcc. We don't bother installing it
+    wget http://llvm.org/releases/2.9/llvm-gcc4.2-2.9-x86_64-linux.tar.bz2
+    tar -xjf llvm-gcc4.2-2.9-x86_64-linux.tar.bz2
+    mv llvm-gcc4.2-2.9-x86_64-linux llvm-gcc
+fi
diff --git a/.travis/klee.sh b/.travis/klee.sh
index 9d96f6a2..faf3f5f5 100755
--- a/.travis/klee.sh
+++ b/.travis/klee.sh
@@ -2,9 +2,6 @@
 # Make sure we exit if there is a failure
 set -e
 
-# Travis doesn't seem to like this in the yaml file so put it here instead
-[ "${LLVM_VERSION}" != "2.9" ] && sudo apt-get install llvm-${LLVM_VERSION}-tools clang-${LLVM_VERSION}
-
 # Calculate LLVM branch name to retrieve missing files from
 SVN_BRANCH="release_$( echo ${LLVM_VERSION} | sed 's/\.//g')"
 
@@ -15,11 +12,9 @@ if [ "${LLVM_VERSION}" != "2.9" ]; then
     KLEE_CC=/usr/bin/clang-${LLVM_VERSION}
     KLEE_CXX=/usr/bin/clang++-${LLVM_VERSION}
 else
-    # Just use pre-built llvm-gcc.
-    wget http://llvm.org/releases/2.9/llvm-gcc4.2-2.9-x86_64-linux.tar.bz2 || exit
-    tar -xjf llvm-gcc4.2-2.9-x86_64-linux.tar.bz2
-    KLEE_CC=$(pwd)/llvm-gcc4.2-2.9-x86_64-linux/bin/llvm-gcc
-    KLEE_CXX=$(pwd)/llvm-gcc4.2-2.9-x86_64-linux/bin/llvm-g++
+    # Just use pre-built llvm-gcc downloaded earlier
+    KLEE_CC=${BUILD_DIR}/llvm-gcc/bin/llvm-gcc
+    KLEE_CXX=${BUILD_DIR}/llvm-gcc/bin/llvm-g++
     export C_INCLUDE_PATH=/usr/include/x86_64-linux-gnu
     export CPLUS_INCLUDE_PATH=/usr/include/x86_64-linux-gnu