diff --git a/.gitignore b/.gitignore index 684790b..82b90ca 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ cmake_install.cmake Makefile Testing coverage +coverage.info.cleaned diff --git a/.travis.yml b/.travis.yml index 51dc758..177fa90 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,5 +10,7 @@ install: - gem install coveralls-lcov script: - - docker run --rm -e COVERALLS_TOKEN=${COVERALLS_TOKEN} -e TRAVIS_JOB_ID=${TRAVIS_JOB_ID} -v $(pwd):/code yitsushi/cpp-commander + - docker run --rm -v `pwd`:`pwd` -w `pwd` yitsushi/cpp-commander ./build-and-run.sh +after_success: + - coveralls-lcov --repo-token ${COVERALLS_TOKEN} coverage.info.cleaned diff --git a/Dockerfile b/Dockerfile index 99cd970..489590a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,22 +1,13 @@ -FROM ubuntu:latest +FROM alpine:latest MAINTAINER Balazs Nadasdi -RUN apt-get update && \ - apt-get install -y gcc g++ cmake \ - lcov libboost-all-dev \ - ruby gem && \ - rm -rf /var/lib/apt/lists/* +RUN apk add --no-cache \ + boost-dev git \ + gcc g++ cmake make \ + bash perl -RUN apt-get update && \ - apt-get install -y git-core && \ - rm -rf /var/lib/apt/lists/* - -RUN gem install coveralls-lcov - -VOLUME /code - -WORKDIR /code - -ENTRYPOINT ["./build-and-run.sh"] +RUN cd /tmp/ && \ + git clone https://github.com/linux-test-project/lcov.git && \ + cd lcov && make install diff --git a/build-and-run.sh b/build-and-run.sh index 1908be4..236b0a3 100755 --- a/build-and-run.sh +++ b/build-and-run.sh @@ -2,11 +2,11 @@ set -e +find . \( -name CMakeFiles -o -name CMakeCache.txt \) -print | xargs rm -rf + cmake -DCMAKE_BUILD_TYPE=Debug -DWITHCOVERAGE=1 . cmake --build . ctest make coverage - -coveralls-lcov --repo-token ${COVERALLS_TOKEN} coverage.info.cleaned