blob: fd7c4f3adf4a09142519be6c9e5158714dee039c [file] [log] [blame]
language: c
compiler: gcc
dist: bionic
services:
- docker
install:
- gem install coveralls-lcov
jobs:
include:
- stage: test
script:
- echo "Build docker image and run tests"
- docker build -t libmpc .
- docker run --cap-add SYS_PTRACE --rm libmpc
- stage: coverage
script:
- echo "Generate coverage figures"
- docker build -t libmpc .
- CONTAINER_ID=$(docker run --cap-add SYS_PTRACE -d libmpc ./scripts/coverage.sh)
- sleep 100
- docker logs $CONTAINER_ID
- docker cp ${CONTAINER_ID}:"/root/target/Coverage/coverage" ./
- docker rm -f ${CONTAINER_ID} || true
- sed -i "s|root|home/travis/build/apache/incubator-milagro-MPC|" ./coverage/libmpc.info
- coveralls-lcov /home/travis/build/apache/incubator-milagro-MPC/coverage/libmpc.info