aboutsummaryrefslogtreecommitdiff
path: root/scripts/travis-setup.sh
diff options
context:
space:
mode:
authorThiago de Arruda <tpadilha84@gmail.com>2014-03-13 12:11:03 -0300
committerThiago de Arruda <tpadilha84@gmail.com>2014-03-13 15:26:28 -0300
commitf6ace9962d95eb12236083871154c1501f02c556 (patch)
treef9a1d5b6ca8eaa68114c98dcd92c6161bc15454d /scripts/travis-setup.sh
parent3cac32e49c7fae9cf5963d35f3fd3052c061b2fa (diff)
downloadrneovim-f6ace9962d95eb12236083871154c1501f02c556.tar.gz
rneovim-f6ace9962d95eb12236083871154c1501f02c556.tar.bz2
rneovim-f6ace9962d95eb12236083871154c1501f02c556.zip
Refactor travis build to use clang's sanitizers
- Valgrind configuration removed - Fix errors reported by the undefined behavior sanitizer - Travis will now run two build steps: - A normal build of a shared library for unit testing(in parallel with gcc) - A clang build with some sanitizers enabled for integration testing. After these changes travis will run much faster, while providing valgrind-like error detection.
Diffstat (limited to 'scripts/travis-setup.sh')
-rwxr-xr-xscripts/travis-setup.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/scripts/travis-setup.sh b/scripts/travis-setup.sh
new file mode 100755
index 0000000000..437659dd77
--- /dev/null
+++ b/scripts/travis-setup.sh
@@ -0,0 +1,19 @@
+#!/bin/sh -e
+
+# [ "$CC" != "clang" ] && exit
+
+add-apt-repository -y ppa:ubuntu-toolchain-r/ppa
+wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key | apt-key add -
+
+cat > /etc/apt/sources.list.d/clang.list << "EOF"
+deb http://llvm.org/apt/precise/ llvm-toolchain-precise main
+deb-src http://llvm.org/apt/precise/ llvm-toolchain-precise main
+# 3.4
+deb http://llvm.org/apt/precise/ llvm-toolchain-precise-3.4 main
+deb-src http://llvm.org/apt/precise/ llvm-toolchain-precise-3.4 main
+# Common
+deb http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu precise main
+EOF
+
+apt-get -qq update
+apt-get -qq -y --no-install-recommends install clang-3.4 lldb-3.4