aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorJohn Szakmeister <john@szakmeister.net>2014-03-29 08:12:55 -0400
committerJohn Szakmeister <john@szakmeister.net>2014-03-30 21:18:29 -0400
commitcc9fbd9e5524c72b9d69fd619b0a69a3588a2811 (patch)
tree672805f7845cd167c8da4b6cd6a84767783f2b86 /scripts
parentd9f5cd6290755b0fc571c89db5f213844cbe9eef (diff)
downloadrneovim-cc9fbd9e5524c72b9d69fd619b0a69a3588a2811.tar.gz
rneovim-cc9fbd9e5524c72b9d69fd619b0a69a3588a2811.tar.bz2
rneovim-cc9fbd9e5524c72b9d69fd619b0a69a3588a2811.zip
Use the clang 3.4 release tarball instead of apt for clang 3.4.
It appears the llvm.org/apt/ repository isn't always reliable. So let's use the release tarball instead. Also, make using 3.4 conditional, so we can use the clang 3.3 if things still manage to go awry in the future. Note: using 3.3 means that we won't get leak detection. I left the logic for using llvm.org/apt/, just in case we want try using it again sometime.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/travis-setup.sh55
-rwxr-xr-xscripts/travis.sh25
2 files changed, 60 insertions, 20 deletions
diff --git a/scripts/travis-setup.sh b/scripts/travis-setup.sh
index ddb41abd6b..2ed2b9e9eb 100755
--- a/scripts/travis-setup.sh
+++ b/scripts/travis-setup.sh
@@ -1,19 +1,44 @@
#!/bin/sh -e
+# Despite the logs, CC isn't being exported at before_install time in Travis.
+# So the following check cannot be used to avoid the download.
# [ "$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
+echo "Downloading clang 3.4..."
+mkdir /usr/local/clang-3.4
+wget -q -O - http://llvm.org/releases/3.4/clang+llvm-3.4-x86_64-unknown-ubuntu12.04.tar.xz |
+ unxz -c | tar xf - --strip-components=1 -C /usr/local/clang-3.4
+
+
+# The section below is still around, in case we want to try the llvm.org/apt/
+# repository again.
+
+# Set to true to enable using the clang stable builds hosted at
+# http://llvm.org/apt/.
+#
+# Note: there have been issues with this repository. Several days in a row
+# there have been problems running from broken a source repository (causing us
+# to remove them from the .list file), to the toolchain being packaged
+# incorrectly (most likely due to a change in version number--3.4.0 -> 3.4.1).
+# Use with care.
+# USE_CLANG_34=true
+
+# if [ -n "$USE_CLANG_34" ]; then
+# 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
+# fi
+
+# apt-get -qq update
+
+# [ -n "$USE_CLANG_34" ] &&
+# apt-get -qq -y --no-install-recommends install clang-3.4 lldb-3.4
diff --git a/scripts/travis.sh b/scripts/travis.sh
index aa9ef10fc1..b66c14e388 100755
--- a/scripts/travis.sh
+++ b/scripts/travis.sh
@@ -26,8 +26,18 @@ check_and_report() {
MAKE_CMD="make -j2"
if [ "$CC" = "clang" ]; then
- # force using the version installed by 'travis-setup.sh'
- export CC=/usr/bin/clang
+ if test -f /usr/local/clang-3.4/bin/clang; then
+ USE_CLANG_34=true
+ export CC=/usr/local/clang-3.4/bin/clang
+ symbolizer=/usr/local/clang-3.4/bin/llvm-symbolizer
+ fi
+
+ # Try to detect clang-3.4 installed via apt and through llvm.org/apt/.
+ if dpkg -s clang-3.4 > /dev/null 2>&1; then
+ USE_CLANG_34=true
+ export CC=/usr/bin/clang
+ symbolizer=/usr/bin/llvm-symbolizer-3.4
+ fi
install_dir="$(pwd)/dist"
# temporary directory for writing sanitizer logs
@@ -36,13 +46,18 @@ if [ "$CC" = "clang" ]; then
mkdir -p "$tmpdir"
# need the symbolizer path for stack traces with source information
- symbolizer=/usr/bin/llvm-symbolizer-3.4
+ if [ -n "$USE_CLANG_34" ]; then
+ export ASAN_OPTIONS="detect_leaks=1:"
+ else
+ symbolizer=/usr/local/clang-3.3/bin/llvm-symbolizer
+ fi
- export SKIP_UNITTEST=1
export SANITIZE=1
export ASAN_SYMBOLIZER_PATH=$symbolizer
- export ASAN_OPTIONS="detect_leaks=1:log_path=$tmpdir/asan"
+ export ASAN_OPTIONS="${ASAN_OPTIONS}log_path=$tmpdir/asan"
export TSAN_OPTIONS="external_symbolizer_path=$symbolizer:log_path=$tmpdir/tsan"
+
+ export SKIP_UNITTEST=1
export UBSAN_OPTIONS="log_path=$tmpdir/ubsan" # not sure if this works
$MAKE_CMD cmake CMAKE_EXTRA_FLAGS="-DCMAKE_INSTALL_PREFIX=$install_dir"