mirror of
https://github.com/libSDL2pp/libSDL2pp.git
synced 2025-08-03 10:55:57 -04:00
61 lines
2.2 KiB
YAML
61 lines
2.2 KiB
YAML
language: cpp
|
|
sudo: required
|
|
dist: bionic
|
|
matrix:
|
|
include:
|
|
# Note that we stick some additional variations to some builds
|
|
- compiler: gcc
|
|
env: BUILD_COVERAGE=yes
|
|
- compiler: clang
|
|
env: BUILD_NOOPTLIBS=yes
|
|
- compiler: clang
|
|
env: BUILD_STATIC=yes
|
|
before_install:
|
|
- sudo apt-get update -qq
|
|
- sudo apt-get install -qq cmake libsdl2-dev cppcheck doxygen pulseaudio graphviz
|
|
- |-
|
|
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:
|
|
- cmake . -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_VERBOSE_MAKEFILE=yes -DSDL2PP_WITH_WERROR=YES ${CMAKE_EXTRA_ARGS}
|
|
- make
|
|
- ctest -V
|
|
- sudo 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 && make
|
|
|
|
- cat ${TRAVIS_BUILD_DIR}/FindSDL2PP.cmake
|
|
- cd ${TRAVIS_BUILD_DIR}/exttests/cmake && cmake . && make
|
|
|
|
- cd ${TRAVIS_BUILD_DIR}
|
|
|
|
after_success:
|
|
- if [ -n "${BUILD_COVERAGE}" ]; then coveralls -i SDL2pp; fi
|