diff --git a/.travis.yml b/.travis.yml index 410f9e77..61045757 100644 --- a/.travis.yml +++ b/.travis.yml @@ -52,6 +52,8 @@ cache: - ${TRAVIS_BUILD_DIR}/deps/xcb-util-xrm install: + - DEPS_DIR="${TRAVIS_BUILD_DIR}/deps" + - mkdir -p "${DEPS_DIR}" && cd "${DEPS_DIR}" - source ${TRAVIS_BUILD_DIR}/common/travis/environment.sh - source ${TRAVIS_BUILD_DIR}/common/travis/install_xcb_xrm.sh - source ${TRAVIS_BUILD_DIR}/common/travis/install_cmake.sh diff --git a/common/travis/environment.sh b/common/travis/environment.sh index 587d1540..51782395 100755 --- a/common/travis/environment.sh +++ b/common/travis/environment.sh @@ -1,10 +1,4 @@ #!/bin/bash -export DEPS_DIR="${TRAVIS_BUILD_DIR}/deps" -export LLVM_ROOT="${DEPS_DIR}/llvm-${LLVM_VERSION}" - -mkdir -p "${DEPS_DIR}" -mkdir -p "${LLVM_ROOT}" - # Update compiler flags if [ "${CXX:0:7}" = "clang++" ]; then export CXX="clang++-3.8" diff --git a/common/travis/install_cmake.sh b/common/travis/install_cmake.sh index 3cc654e3..0ba8848f 100755 --- a/common/travis/install_cmake.sh +++ b/common/travis/install_cmake.sh @@ -1,8 +1,7 @@ #!/bin/bash if [ -z "$(ls -A "${DEPS_DIR}/cmake/bin" 2>/dev/null)" ]; then - mkdir -p "${DEPS_DIR}/cmake" - cd "${DEPS_DIR}/cmake" || exit 1 - travis_retry wget --no-check-certificate -O - "${CMAKE_URL}" | tar --strip-components=1 -xz + mkdir -p "cmake" + travis_retry wget --no-check-certificate -O - "${CMAKE_URL}" | tar --strip-components=1 -xz -C cmake fi export PATH="${DEPS_DIR}/cmake/bin:${PATH}" diff --git a/common/travis/install_libcpp.sh b/common/travis/install_libcpp.sh index ca64f6a8..19a9354c 100755 --- a/common/travis/install_libcpp.sh +++ b/common/travis/install_libcpp.sh @@ -1,5 +1,7 @@ #!/bin/bash if [ "${CXX:0:7}" = "clang++" ]; then + LLVM_ROOT="${DEPS_DIR}/llvm-${LLVM_VERSION}" + if [ -z "$(ls -A "${LLVM_ROOT}/install/include" 2>/dev/null)" ]; then mkdir -p "${LLVM_ROOT}" "${LLVM_ROOT}/build" "${LLVM_ROOT}/projects/libcxx" "${LLVM_ROOT}/projects/libcxxabi" diff --git a/common/travis/install_xcb_xrm.sh b/common/travis/install_xcb_xrm.sh index e9182bbf..d2d94570 100755 --- a/common/travis/install_xcb_xrm.sh +++ b/common/travis/install_xcb_xrm.sh @@ -1,9 +1,9 @@ #!/bin/bash if [ -z "$(ls -A "${DEPS_DIR}/xcb-util-xrm" 2>/dev/null)" ]; then - cd "${DEPS_DIR}" || exit 1 git clone --recursive https://github.com/Airblader/xcb-util-xrm - cd xcb-util-xrm || exit 1 - ./autogen.sh --prefix=/usr --libdir=/usr/lib - make - sudo make install + cd xcb-util-xrm && { + ./autogen.sh --prefix=/usr --libdir=/usr/lib + make + sudo make install + } fi