1
0
Fork 0
mirror of https://github.com/polybar/polybar.git synced 2024-11-25 13:55:47 -05:00

fix(ci): Build xcb-xrm

This commit is contained in:
Michael Carlberg 2017-01-20 03:30:03 +01:00
parent 9e83c55a70
commit f85e7c8f40
5 changed files with 19 additions and 4 deletions

View file

@ -34,6 +34,7 @@ addons:
- libxcb1-dev - libxcb1-dev
- python-xcbgen - python-xcbgen
- xcb-proto - xcb-proto
- xutils-dev
env: env:
global: global:
@ -50,9 +51,11 @@ cache:
directories: directories:
- ${TRAVIS_BUILD_DIR}/deps/cmake - ${TRAVIS_BUILD_DIR}/deps/cmake
- ${TRAVIS_BUILD_DIR}/deps/llvm-3.8.1/install - ${TRAVIS_BUILD_DIR}/deps/llvm-3.8.1/install
- ${TRAVIS_BUILD_DIR}/deps/xcb-util-xrm
install: install:
- source ${TRAVIS_BUILD_DIR}/common/travis/environment.sh - 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_cmake.sh
- source ${TRAVIS_BUILD_DIR}/common/travis/install_libcpp.sh - source ${TRAVIS_BUILD_DIR}/common/travis/install_libcpp.sh

View file

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
if [ -z "$(ls -A "${DEPS_DIR}/cmake/bin" 2>/dev/null)" ]; then 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 fi
export PATH="${DEPS_DIR}/cmake/bin:${PATH}" export PATH="${DEPS_DIR}/cmake/bin:${PATH}"

View file

@ -3,9 +3,9 @@ if [ "${CXX:0:7}" = "clang++" ]; then
if [ -z "$(ls -A "${LLVM_ROOT}/install/include" 2>/dev/null)" ]; 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" 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 -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 -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 - "${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" && 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/libcxx" && make install)

View file

@ -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

View file

@ -1,4 +1,5 @@
#!/bin/bash #!/bin/bash
r=0
if [ "${BUILD_TESTS:-OFF}" = "ON" ]; then if [ "${BUILD_TESTS:-OFF}" = "ON" ]; then
for test in tests/unit_test.*; do for test in tests/unit_test.*; do
[ -x "$test" ] || continue [ -x "$test" ] || continue
@ -6,7 +7,9 @@ if [ "${BUILD_TESTS:-OFF}" = "ON" ]; then
if $test; then if $test; then
printf "\033[1;32m%s\033[0m\n" "${test##*/} passed" printf "\033[1;32m%s\033[0m\n" "${test##*/} passed"
else else
r=1
printf "\033[1;31m%s\033[0m\n" "${test##*/} failed" printf "\033[1;31m%s\033[0m\n" "${test##*/} failed"
fi fi
done done
fi fi
exit $r