d3e37918e5
* Clean up CMake logic - removed logic to find CppUnit (no longer used) - removed "dirs" variable used to pass include directories - removed add_library function (no longer used) - removed make_executable function * only used in 2 places (polybar and polybar-msg) * it was more general than needed, logic is simpler without it - split polybar into static library and executable * this allows linking unit tests to the library * rename library * add coverage build - Added a CMake build type "Coverage" that builds C and C++ code with the "--coverage" flag (recognized by both GCC and Clang) - removed "-Wno-missing-field-initializers" from test flags, since it didn't seem to be needed any more - removed logic from tests/CMakeLists to disable "-Werror" and "-pedantic-errors" since there didn't seem to be any warnings during the build * fix whitespace * update travis * remove O2 from defalt flags * allow tests to be built by default make target * disable Werror for debug builds
102 lines
2.8 KiB
YAML
102 lines
2.8 KiB
YAML
sudo: required
|
|
dist: trusty
|
|
language: cpp
|
|
|
|
env:
|
|
global:
|
|
- JOBS=4
|
|
- MAKEFLAGS="-j ${JOBS}"
|
|
- POLYBAR_BUILD_TYPE="compile"
|
|
|
|
# Build configurations can either not specify anything for 'addon' and use this
|
|
# default list of packages. Or they can pick and choose which package groups to
|
|
# install
|
|
addons:
|
|
apt:
|
|
sources: &sources
|
|
- ubuntu-toolchain-r-test
|
|
packages:
|
|
- &gcc
|
|
- g++-5
|
|
- gcc-5
|
|
- &clang
|
|
- libstdc++-5-dev
|
|
- &base_deps
|
|
- libxcb-ewmh-dev
|
|
- libxcb-icccm4-dev
|
|
- libxcb-image0-dev
|
|
- libxcb-randr0-dev
|
|
- libxcb-util0-dev
|
|
- python-xcbgen
|
|
- xcb-proto
|
|
- &optional_deps
|
|
- libxcb-xkb-dev
|
|
- libxcb-cursor-dev
|
|
- libxcb1-dev
|
|
- xutils-dev
|
|
- i3-wm
|
|
- libasound2-dev
|
|
- libpulse-dev
|
|
- libcairo2-dev
|
|
- libiw-dev
|
|
- libmpdclient-dev
|
|
|
|
script: source ${TRAVIS_BUILD_DIR}/common/travis/build.sh
|
|
|
|
matrix:
|
|
include:
|
|
- compiler: clang
|
|
env: BUILD_TYPE=Release
|
|
addons: {apt: {sources: *sources, packages: [*clang, *base_deps, *optional_deps]}}
|
|
|
|
- compiler: gcc
|
|
env: BUILD_TYPE=Coverage POLYBAR_BUILD_TYPE=tests BUILD_TESTS=ON
|
|
addons: {apt: {sources: *sources, packages: [*gcc, *base_deps, *optional_deps]}}
|
|
script: ${TRAVIS_BUILD_DIR}/common/travis/tests.sh
|
|
after_success:
|
|
- cd ${TRAVIS_BUILD_DIR}
|
|
- bash <(curl -s https://codecov.io/bash) -F unittests -a "-ap" -Z || echo "Codecov did not collect coverage reports"
|
|
|
|
- compiler: gcc
|
|
env: BUILD_TYPE=Release
|
|
addons: {apt: {sources: *sources, packages: [*gcc, *base_deps, *optional_deps]}}
|
|
|
|
# Minimal build, contains no optional dependencies. This makes sure that
|
|
# we properly remove files from compilation that depend on libraries that
|
|
# are not installed
|
|
- compiler: gcc
|
|
env: BUILD_TYPE=Release POLYBAR_BUILD_TYPE=minimal
|
|
addons: {apt: {sources: *sources, packages: [*gcc, *base_deps]}}
|
|
|
|
cache:
|
|
ccache: true
|
|
apt: true
|
|
directories:
|
|
- ${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
|
|
|
|
before_script:
|
|
- source ${TRAVIS_BUILD_DIR}/common/travis/summary.sh
|
|
- source ${TRAVIS_BUILD_DIR}/common/travis/configure.sh
|
|
|
|
# Only fetch the newest 5 commits instead of 50
|
|
git:
|
|
depth: 5
|
|
|
|
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
|