Updated travis file

This commit is contained in:
Filippo Cucchetto 2019-11-25 22:46:50 +01:00
parent d3e77561e4
commit 08b6579e8b
2 changed files with 31 additions and 1 deletions

25
.travis.sh Executable file
View File

@ -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

View File

@ -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)