polybar/.travis.yml

118 lines
4.7 KiB
YAML
Raw Normal View History

2016-05-31 08:33:30 +00:00
sudo: required
2016-10-12 09:49:17 +00:00
dist: trusty
2016-10-11 14:20:19 +00:00
language: cpp
compiler:
- clang
- gcc
2016-05-26 19:10:37 +00:00
2016-06-15 03:32:35 +00:00
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.8
packages:
- gcc-5
- g++-5
- clang-3.8
2016-06-11 10:10:43 +00:00
env:
global:
2016-06-15 03:32:35 +00:00
- BUILD_TYPE="Release"
- 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"
- CMAKE_URL="https://cmake.org/files/v3.6/cmake-3.6.2-Linux-x86_64.tar.gz"
2016-06-11 10:10:43 +00:00
2016-10-11 14:20:19 +00:00
cache:
directories:
- ${TRAVIS_BUILD_DIR}/deps/cmake
- ${TRAVIS_BUILD_DIR}/deps/llvm-3.8.1/install
2016-05-31 08:33:30 +00:00
before_install:
2016-10-12 09:49:17 +00:00
- sudo apt-add-repository -y "ppa:george-edison55/george-edison"
2016-05-31 08:33:30 +00:00
- sudo apt-get -qq update
2016-10-11 14:20:19 +00:00
# Install packages : core
#--------------------------------------------------------------------------x
- sudo apt-get install -y cmake cmake-data libcppunit-dev libboost-dev libfreetype6-dev
# Install packages : xcb
#--------------------------------------------------------------------------x
- sudo apt-get install -y libxcb1-dev libxcb-util0-dev libxcb-randr0-dev libxcb-ewmh-dev libxcb-icccm4-dev xcb-proto python-xcbgen
# Install packages : optional
#--------------------------------------------------------------------------x
2016-10-12 09:49:17 +00:00
- sudo apt-get install -y i3-wm libiw-dev libasound2-dev libmpdclient-dev
2016-06-15 03:32:35 +00:00
install:
2016-10-11 14:20:19 +00:00
# Install dependencies in ${TRAVIS_BUILD_DIR}/deps
#--------------------------------------------------------------------------x
2016-06-15 03:32:35 +00:00
- DEPS_DIR="${TRAVIS_BUILD_DIR}/deps"
- LLVM_ROOT="${DEPS_DIR}/llvm-${LLVM_VERSION}"
2016-10-12 09:49:17 +00:00
- mkdir -p "${DEPS_DIR}"
2016-10-11 14:20:19 +00:00
# Update python path to make sure we find the xcbgen module
#--------------------------------------------------------------------------x
- export PYTHONPATH="/usr/lib/python2.7/dist-packages:${PYTHONPATH}"
2016-10-12 09:49:17 +00:00
# Install jsoncpp
#--------------------------------------------------------------------------x
- |
cd "${DEPS_DIR}"
tar -zxf ../lib/jsoncpp-1.7.7.tar.gz -C .
mkdir -p jsoncpp-1.7.7/build && cd jsoncpp-1.7.7/build
cmake -DCMAKE_INSTALL_PREFIX=/usr ..
sudo make install
2016-10-11 14:20:19 +00:00
# Install a later version of cmake
#--------------------------------------------------------------------------x
2016-06-15 03:32:35 +00:00
- |
2016-10-12 09:49:17 +00:00
cd "${DEPS_DIR}"
2016-06-15 03:32:35 +00:00
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
fi
2016-10-11 14:20:19 +00:00
- export PATH="${DEPS_DIR}/cmake/bin:${PATH}"
# Install LLVM libc++
#--------------------------------------------------------------------------x
- |
if [[ "${CXX}" == "clang++" ]] && [[ -z "$(ls -A ${LLVM_ROOT}/install/include 2>/dev/null)" ]]; then
2016-06-15 03:32:35 +00:00
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"
(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)
2016-10-11 14:20:19 +00:00
export CXXFLAGS="${CXXFLAGS} -I ${LLVM_ROOT}/install/include/c++/v1"
export LDFLAGS="${LDFLAGS} -L ${LLVM_ROOT}/install/lib -lc++ -lc++abi"
2016-06-15 03:32:35 +00:00
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${LLVM_ROOT}/install/lib"
fi
2016-05-31 08:33:30 +00:00
2016-10-11 14:20:19 +00:00
# Set compiler's
#--------------------------------------------------------------------------x
- if [[ "${CXX}" == "clang++" ]]; then export CXX="clang++-3.8" CC="clang-3.8" CXXFLAGS="${CXXFLAGS} -Qunused-arguments"; fi
- if [[ "${CXX}" == "g++" ]]; then export CXX="g++-5" CC="gcc-5"; fi
2016-05-31 08:33:30 +00:00
before_script:
2016-06-15 03:32:35 +00:00
- eval "${CXX} --version"
- eval "${CC} --version"
2016-05-31 08:33:30 +00:00
- cmake --version
2016-06-15 03:32:35 +00:00
- mkdir -p "${TRAVIS_BUILD_DIR}/build"
- cd "${TRAVIS_BUILD_DIR}/build"
2016-10-12 02:24:12 +00:00
- cmake -DCMAKE_C_COMPILER="${CC}" -DCMAKE_CXX_COMPILER="${CXX}" -DCMAKE_CXX_FLAGS="${CXXFLAGS}" -DCMAKE_BUILD_TYPE="${BUILD_TYPE}" -DENABLE_CCACHE=OFF ..
2016-05-31 08:33:30 +00:00
script: make
2016-05-31 11:09:42 +00:00
notifications:
irc:
channels:
2016-05-31 12:53:37 +00:00
- "irc.freenode.net#lemonbuddy"
template:
2016-05-31 14:53:03 +00:00
- "%{author} pushed #%{commit} \"%{commit_subject}\" -> %{repository_name}/%{branch}"
- "Build #%{build_number}: %{result} // Compare at %{compare_url}"
2016-05-31 11:09:42 +00:00
use_notice: true
skip_join: true