Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ cmake_install.cmake
Makefile
Testing
coverage
coverage.info.cleaned
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
25 changes: 8 additions & 17 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,22 +1,13 @@
FROM ubuntu:latest
FROM alpine:latest

MAINTAINER Balazs Nadasdi <balazs.nadasdi@cheppers.com>

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

4 changes: 2 additions & 2 deletions build-and-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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