diff --git a/.travis.sh b/.travis.sh new file mode 100755 index 0000000..681efd6 --- /dev/null +++ b/.travis.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +# Early exit on first error +set -e + +# Build DOtherSide +mkdir build +cd build +cmake -GNinja -DENABLE_COVERAGE=ON -DCMAKE_BUILD_TYPE=Debug .. +cmake --build . + +# Start framebuffer +Xvfb :99 -screen 0 1024x768x24 > /dev/null & +export DISPLAY=:99.0 + +# Execute Tests +./test/TestDynamicQObject + +# Collect coverage info +lcov --directory . --capture --output-file coverage.info + +# Clean it up +lcov --remove coverage.info "/usr/*" -o coverage.info +lcov --remove coverage.info "*/build/*" -o coverage.info +lcov --remove coverage.info "*/test/*" -o coverage.info diff --git a/.travis.yml b/.travis.yml index 0f522f0..9e3d94b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,5 @@ +language: cpp + sudo: required services: @@ -7,4 +9,7 @@ before_install: - docker pull filcuc/dotherside script: -- docker run -v `pwd`:/root/dotherside filcuc/dotherside /bin/bash /root/build.sh ${COVERALLS_REPO_TOKEN} +- docker run -ti --rm -v`pwd`:/repo -w /repo filcuc/dotherside /bin/bash -c "./.travis.sh" + +after_success: + - bash <(curl -s https://codecov.io/bash) \ No newline at end of file