Skip to content

Commit

Permalink
Added a separate build for coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
dimkr committed Dec 23, 2017
1 parent 72f77a1 commit fb1fa15
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@ before_install:
- echo -n | openssl s_client -connect scan.coverity.com:443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | sudo tee -a /etc/ssl/certs/ca-

script:
- ci_env=`bash <(curl -s https://codecov.io/env)`
- docker build -t b6b -f Dockerfile .
- docker run -e CI=$CI -e TRAVIS=$TRAVIS -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
- docker run $ci_env -w /root b6b ./ci_build.sh

addons:
coverity_scan:
Expand Down
8 changes: 5 additions & 3 deletions ci_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,14 @@
# See the License for the specific language governing permissions and
# limitations under the License.

rm -rf build build-clang build-no-threads build-small
rm -rf build build-clang build-no-threads build-small build-coverage

export CFLAGS=-g
meson -Dwith_valgrind=true -Db_coverage=true -Doptimistic_alloc=false build
meson -Dwith_valgrind=true 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
meson -Db_coverage=true -Doptimistic_alloc=false build-coverage

# build with GCC, clang, with GCC while thread support is disabled and a small build with all optional features off
for i in build build-clang build-no-threads
Expand Down Expand Up @@ -55,5 +56,6 @@ 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 --fair-sched=yes"
done

cd build
cd build-coverage
ninja test
curl -s https://codecov.io/bash | bash

0 comments on commit fb1fa15

Please sign in to comment.