c865add821
googletest (gtest) is more feature rich than the current implementation which only provides expect() which is basically an assertion. It is also quite intuitive to use, this can be seen in the rewrite of the command_line test where EXPECT_THROW replaces a whole try-catch block. I have also moved the source files the test depend on to be linked in CMakeLists.txt instead of including them directly because include .cpp files is bad. The two x11 tests were removed because they were written two years ago and a lot of the things they depend on, don't actually exist anymore in polybar (I think we switched to xpp after those tests were written) Tests are now compiled with the gcov lib which can be used to provide test coverage in a second step
85 lines
2.3 KiB
YAML
85 lines
2.3 KiB
YAML
sudo: required
|
|
dist: trusty
|
|
language: cpp
|
|
|
|
compiler:
|
|
- clang
|
|
- gcc
|
|
|
|
addons:
|
|
apt:
|
|
sources:
|
|
- ubuntu-toolchain-r-test
|
|
- llvm-toolchain-precise-3.8
|
|
- sourceline: "ppa:george-edison55/george-edison"
|
|
packages:
|
|
- clang-3.8
|
|
- cmake
|
|
- cmake-data
|
|
- g++-5
|
|
- gcc-5
|
|
- i3-wm
|
|
- libasound2-dev
|
|
- libpulse-dev
|
|
- libcairo2-dev
|
|
- libiw-dev
|
|
- libmpdclient-dev
|
|
- libxcb-ewmh-dev
|
|
- libxcb-icccm4-dev
|
|
- libxcb-image0-dev
|
|
- libxcb-randr0-dev
|
|
- libxcb-util0-dev
|
|
- libxcb-xkb-dev
|
|
- libxcb-cursor-dev
|
|
- libxcb1-dev
|
|
- python-xcbgen
|
|
- xcb-proto
|
|
- xutils-dev
|
|
- libgtest0
|
|
- libgtest-dev
|
|
|
|
env:
|
|
global:
|
|
- BUILD_TESTS="ON"
|
|
- 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"
|
|
- PYTHONPATH="/usr/lib/python2.7/dist-packages:${PYTHONPATH}"
|
|
- JOBS=4
|
|
|
|
cache:
|
|
directories:
|
|
- ${TRAVIS_BUILD_DIR}/deps/cmake
|
|
- ${TRAVIS_BUILD_DIR}/deps/llvm-3.8.1/install
|
|
- ${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
|
|
- source ${TRAVIS_BUILD_DIR}/common/travis/install_libcpp.sh
|
|
|
|
before_script:
|
|
- source ${TRAVIS_BUILD_DIR}/common/travis/summary.sh
|
|
- source ${TRAVIS_BUILD_DIR}/common/travis/configure.sh
|
|
|
|
script:
|
|
- source ${TRAVIS_BUILD_DIR}/common/travis/build.sh
|
|
- source ${TRAVIS_BUILD_DIR}/common/travis/tests.sh
|
|
|
|
notifications:
|
|
email: false
|
|
irc:
|
|
channels:
|
|
- "irc.freenode.org#polybar"
|
|
template:
|
|
- "%{author} pushed #%{commit} \"%{commit_subject}\" to %{repository_name}/%{branch}"
|
|
- "Build #%{build_number} %{result} / %{build_url} (diff: %{compare_url})"
|
|
use_notice: true
|
|
on_success: change
|
|
on_failure: change
|