travis: Don't install specific compilers

clang is already installed in travis' trusty environment

Should decrease build time quite a bit because we don't need to download
and compule libc++
This commit is contained in:
patrick96 2018-04-08 14:32:02 +02:00 committed by NBonaparte
parent 7b7498bde1
commit a8234ddd4e
3 changed files with 2 additions and 32 deletions

View File

@ -4,10 +4,6 @@ language: cpp
env:
global:
- LLVM_VERSION="3.8.1"
- LLVM_URL="http://llvm.org/releases/${LLVM_VERSION}/llvm-${LLVM_VERSION}.src.tar.xz"
- LIBCXX_URL="http://llvm.org/releases/${LLVM_VERSION}/libcxx-${LLVM_VERSION}.src.tar.xz"
- LIBCXXABI_URL="http://llvm.org/releases/${LLVM_VERSION}/libcxxabi-${LLVM_VERSION}.src.tar.xz"
- JOBS=4
- POLYBAR_BUILD_TYPE="compile"
@ -39,9 +35,7 @@ addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.8
packages:
- clang-3.8
- g++-5
- gcc-5
- i3-wm
@ -64,7 +58,6 @@ addons:
cache:
directories:
- ${TRAVIS_BUILD_DIR}/deps/llvm-3.8.1/install
- ${TRAVIS_BUILD_DIR}/deps/xcb-util-xrm
install:
@ -72,7 +65,6 @@ install:
- 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_libcpp.sh
before_script:
- source ${TRAVIS_BUILD_DIR}/common/travis/summary.sh

View File

@ -1,10 +1,8 @@
#!/bin/bash
# Update compiler flags
if [ "${CXX:0:7}" = "clang++" ]; then
export CXX="clang++-3.8"
export CC="clang-3.8"
if [ "${CXX}" = "clang++" ]; then
export CXXFLAGS="${CXXFLAGS} -Qunused-arguments"
elif [ "${CXX:0:3}" = "g++" ]; then
elif [ "${CXX}" = "g++" ]; then
export CXX="g++-5"
export CC="gcc-5"
fi

View File

@ -1,20 +0,0 @@
#!/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"
travis_retry wget -O - "${LLVM_URL}" | tar --strip-components=1 -xJ -C "${LLVM_ROOT}"
travis_retry wget -O - "${LIBCXX_URL}" | tar --strip-components=1 -xJ -C "${LLVM_ROOT}/projects/libcxx"
travis_retry wget -O - "${LIBCXXABI_URL}" | tar --strip-components=1 -xJ -C "${LLVM_ROOT}/projects/libcxxabi"
(cd "${LLVM_ROOT}/build" && cmake .. -DCMAKE_CXX_COMPILER="$CXX" -DCMAKE_C_COMPILER="$CC" -DCMAKE_INSTALL_PREFIX="${LLVM_ROOT}/install" -DCMAKE_BUILD_TYPE=$BUILD_TYPE)
(cd "${LLVM_ROOT}/build/projects/libcxx" && make install)
(cd "${LLVM_ROOT}/build/projects/libcxxabi" && make install)
fi
export CXXFLAGS="${CXXFLAGS} -I ${LLVM_ROOT}/install/include/c++/v1"
export LDFLAGS="${LDFLAGS} -L ${LLVM_ROOT}/install/lib -lc++ -lc++abi"
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${LLVM_ROOT}/install/lib"
fi