Skip to content

Commit

Permalink
Moved coverage reports to the CI container
Browse files Browse the repository at this point in the history
  • Loading branch information
dimkr committed Dec 23, 2017
1 parent 8a5b98b commit 4009727
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 17 deletions.
16 changes: 1 addition & 15 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,25 +34,11 @@ services:
- docker

before_install:
- sudo apt-get -qq update
- sudo apt-get install -y gcc python3-pip curl gcovr
- echo -n | openssl s_client -connect scan.coverity.com:443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | sudo tee -a /etc/ssl/certs/ca-

install:
- export PATH="`pwd`/build:${PATH}"
- wget https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-linux.zip && unzip -q ninja-linux.zip -d build
- pip3 install --user meson

script:
- meson -Db_coverage=true -Doptimistic_alloc=false build
- ninja -C build
- meson test -C build --print-errorlogs
- docker build -t b6b -f Dockerfile .
- docker run -w /root b6b ./ci_build.sh

after_success:
- ninja -C build coverage
- cd build; bash <(curl -s https://codecov.io/bash)
- docker run -e TRAVIS_PULL_REQUEST_SHA=$TRAVIS_PULL_REQUEST_SHA -e TRAVIS_COMMIT=$TRAVIS_COMMIT -e TRAVIS_JOB_NUMBER=$TRAVIS_JOB_NUMBER -e TRAVIS_PULL_REQUEST=$TRAVIS_PULL_REQUEST -e TRAVIS_JOB_ID=$TRAVIS_JOB_ID -e TRAVIS_REPO_SLUG=$TRAVIS_REPO_SLUG -e TRAVIS_OS_NAME=$TRAVIS_OS_NAME -e TRAVIS_TAG=$TRAVIS_TAG -e TRAVIS_BRANCH=$TRAVIS_BRANCH -w /root b6b ./ci_build.sh

addons:
coverity_scan:
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ ENV LANG en_US.UTF-8

RUN sed -i s/^deb.*multiverse.*/\#\&/g /etc/apt/sources.list
RUN apt-get -qq update
RUN apt-get -y --no-install-recommends install gcc clang ninja-build locales python3-pip python3-setuptools python3-wheel libffi-dev valgrind
RUN apt-get -y --no-install-recommends install gcc clang ninja-build locales python3-pip python3-setuptools python3-wheel libffi-dev valgrind curl gcovr
RUN locale-gen --lang en_US.UTF-8
RUN pip3 install meson

Expand Down
6 changes: 5 additions & 1 deletion ci_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
rm -rf build build-clang build-no-threads build-small

export CFLAGS=-g
meson -Dwith_valgrind=true build
meson -Dwith_valgrind=true -Db_coverage=true -Doptimistic_alloc=false build
CC=clang meson -Dwith_valgrind=true build-clang
meson -Dwith_threads=false -Dwith_valgrind=true build-no-threads
meson -Dwith_threads=false -Dwith_miniz=false -Dwith_linenoise=false build-small
Expand Down Expand Up @@ -54,3 +54,7 @@ do
meson test -C $i --no-rebuild --print-errorlogs --no-suite=b6b:slow --num-processes 1 -t 2 --wrapper "valgrind --tool=helgrind --error-exitcode=1"
meson test -C $i --no-rebuild --print-errorlogs --no-suite=b6b:slow --num-processes 1 -t 2 --wrapper "valgrind --tool=helgrind --error-exitcode=1 --fair-sched=yes"
done

ninja -C build coverage
cd build
bash <(curl -s https://codecov.io/bash)

0 comments on commit 4009727

Please sign in to comment.