mirror of
https://github.com/libSDL2pp/libSDL2pp.git
synced 2025-08-03 10:55:57 -04:00
65 lines
2.6 KiB
YAML
65 lines
2.6 KiB
YAML
language: cpp
|
|
sudo: required
|
|
dist: trusty
|
|
matrix:
|
|
include:
|
|
# Note that we stick some additional variations to some builds
|
|
- compiler: gcc
|
|
env: CXXSTD=c++11 BUILD_COVERAGE=yes
|
|
- compiler: gcc
|
|
env: CXXSTD=c++1y
|
|
- compiler: clang
|
|
env: CXXSTD=c++11
|
|
- compiler: clang
|
|
env: CXXSTD=c++1y BUILD_NOOPTLIBS=yes
|
|
- compiler: clang
|
|
env: CXXSTD=c++1y BUILD_STATIC=yes
|
|
before_install:
|
|
- sudo add-apt-repository --yes ppa:zoogie/sdl2-snapshots
|
|
- sudo apt-get update -qq
|
|
- sudo apt-get install -qq cmake libsdl2-dev cppcheck doxygen pulseaudio
|
|
- sudo sed -i -e '/using ::gets/ d' /usr/include/c++/4.8/cstdio # build failure with clang/c++1y
|
|
- |-
|
|
if [ -n "${BUILD_COVERAGE}" ]; then
|
|
export CMAKE_EXTRA_ARGS="${CMAKE_EXTRA_ARGS} -DCMAKE_BUILD_TYPE=Coverage"
|
|
pip install --user pyyaml cpp-coveralls
|
|
fi
|
|
if [ -n "${BUILD_NOOPTLIBS}" ]; then
|
|
export CMAKE_EXTRA_ARGS="${CMAKE_EXTRA_ARGS} -DSDL2PP_WITH_IMAGE=NO -DSDL2PP_WITH_MIXER=NO -DSDL2PP_WITH_TTF=NO"
|
|
else
|
|
sudo apt-get install -qq libsdl2-image-dev libsdl2-ttf-dev libsdl2-mixer-dev
|
|
fi
|
|
if [ -n "${BUILD_STATIC}" ]; then
|
|
export CMAKE_EXTRA_ARGS="${CMAKE_EXTRA_ARGS} -DSDL2PP_STATIC=YES"
|
|
fi
|
|
|
|
# evironment for live tests
|
|
- dbus-launch pulseaudio --start
|
|
- export SDL_AUDIODRIVER=pulseaudio
|
|
|
|
- /sbin/start-stop-daemon --start --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 800x600x24 -ac +extension GLX
|
|
- export SDL_VIDEODRIVER=x11
|
|
- export DISPLAY=:99.0
|
|
|
|
- export CXXFLAGS="${CXXFLAGS} -Werror"
|
|
|
|
script:
|
|
- export PREFIX=`pwd`.prefix
|
|
- cmake . -DCMAKE_INSTALL_PREFIX=${PREFIX} -DSDL2PP_WITH_WERROR=YES -DSDL2PP_CXXSTD=${CXXSTD} ${CMAKE_EXTRA_ARGS}
|
|
- VERBOSE=1 make && make ARGS=-V test && make install
|
|
- cppcheck -I . --enable=performance,portability,information,missingInclude --error-exitcode=2 SDL2pp # `style' gives false positive in cppcheck 1.61 which comes with trusty
|
|
- make doxygen
|
|
# - "if make doxygen 2>&1 | grep 'warning:'; then echo 'FATAL: doxygen warnings!'; false; fi"
|
|
- "if git ls-files --others --exclude-standard | grep ''; then echo 'FATAL: incomplete .gitignore'; false; fi"
|
|
|
|
- cat ${TRAVIS_BUILD_DIR}/sdl2pp.pc
|
|
- cd ${TRAVIS_BUILD_DIR}/exttests/pkg-config && PKG_CONFIG_PATH=${PREFIX}/lib/pkgconfig make
|
|
|
|
- cat ${TRAVIS_BUILD_DIR}/FindSDL2PP.cmake
|
|
- cd ${TRAVIS_BUILD_DIR}/exttests/cmake && cmake -DCMAKE_MODULE_PATH=${PREFIX}/share/cmake/Modules . && make
|
|
|
|
- cd ${TRAVIS_BUILD_DIR}
|
|
|
|
after_success:
|
|
- if [ -n "${BUILD_COVERAGE}" ]; then coveralls -i SDL2pp; fi
|