From f85e7c8f407048d0cbd4235e2f3daacba541d24e Mon Sep 17 00:00:00 2001 From: Michael Carlberg Date: Fri, 20 Jan 2017 03:30:03 +0100 Subject: [PATCH] fix(ci): Build xcb-xrm --- .travis.yml | 3 +++ common/travis/install_cmake.sh | 2 +- common/travis/install_libcpp.sh | 6 +++--- common/travis/install_xcb_xrm.sh | 9 +++++++++ common/travis/tests.sh | 3 +++ 5 files changed, 19 insertions(+), 4 deletions(-) create mode 100755 common/travis/install_xcb_xrm.sh diff --git a/.travis.yml b/.travis.yml index f821c4e4..d0d0f4f6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -34,6 +34,7 @@ addons: - libxcb1-dev - python-xcbgen - xcb-proto + - xutils-dev env: global: @@ -50,9 +51,11 @@ cache: directories: - ${TRAVIS_BUILD_DIR}/deps/cmake - ${TRAVIS_BUILD_DIR}/deps/llvm-3.8.1/install + - ${TRAVIS_BUILD_DIR}/deps/xcb-util-xrm install: - 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 - source ${TRAVIS_BUILD_DIR}/common/travis/install_libcpp.sh diff --git a/common/travis/install_cmake.sh b/common/travis/install_cmake.sh index bd681353..32efb1b4 100755 --- a/common/travis/install_cmake.sh +++ b/common/travis/install_cmake.sh @@ -1,6 +1,6 @@ #!/bin/bash if [ -z "$(ls -A "${DEPS_DIR}/cmake/bin" 2>/dev/null)" ]; then - mkdir -p cmake && travis_retry wget --no-check-certificate --quiet -O - "${CMAKE_URL}" | tar --strip-components=1 -xz -C cmake + 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 3f956bb6..ca64f6a8 100755 --- a/common/travis/install_libcpp.sh +++ b/common/travis/install_libcpp.sh @@ -3,9 +3,9 @@ if [ "${CXX:0:7}" = "clang++" ]; then 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 --quiet -O - "${LLVM_URL}" | tar --strip-components=1 -xJ -C "${LLVM_ROOT}" - travis_retry wget --quiet -O - "${LIBCXX_URL}" | tar --strip-components=1 -xJ -C "${LLVM_ROOT}/projects/libcxx" - travis_retry wget --quiet -O - "${LIBCXXABI_URL}" | tar --strip-components=1 -xJ -C "${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) diff --git a/common/travis/install_xcb_xrm.sh b/common/travis/install_xcb_xrm.sh new file mode 100755 index 00000000..2a608944 --- /dev/null +++ b/common/travis/install_xcb_xrm.sh @@ -0,0 +1,9 @@ +#!/bin/bash +if [ -z "$(ls -A "${DEPS_DIR}/xcb-util-xrm" 2>/dev/null)" ]; then + git clone --recursive https://github.com/Airblader/xcb-util-xrm + cd xcb-util-xrm || exit 1 + ./autogen.sh +fi + +cd "${DEPS_DIR}/xcb-util-xrm" || exit 1 +make install diff --git a/common/travis/tests.sh b/common/travis/tests.sh index 5888f334..95f419f6 100755 --- a/common/travis/tests.sh +++ b/common/travis/tests.sh @@ -1,4 +1,5 @@ #!/bin/bash +r=0 if [ "${BUILD_TESTS:-OFF}" = "ON" ]; then for test in tests/unit_test.*; do [ -x "$test" ] || continue @@ -6,7 +7,9 @@ if [ "${BUILD_TESTS:-OFF}" = "ON" ]; then if $test; then printf "\033[1;32m%s\033[0m\n" "${test##*/} passed" else + r=1 printf "\033[1;31m%s\033[0m\n" "${test##*/} failed" fi done fi +exit $r