Skip to content

Commit

Permalink
Coverity integration
Browse files Browse the repository at this point in the history
  • Loading branch information
Marko Petric committed Apr 7, 2017
1 parent 93b0ab5 commit 01efec5
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 4 deletions.
12 changes: 12 additions & 0 deletions .travis-ci.d/coverity_scan.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

ILCSOFT=/cvmfs/clicdp.cern.ch/iLCSoft/builds/current/CI_${COMPILER}
source $ILCSOFT/init_ilcsoft.sh

cd /Package
mkdir build
cd build
cmake -C $ILCSOFT/ILCSoft.cmake -DCMAKE_CXX_FLAGS="-fdiagnostics-color=always" .. && \
export PATH=/Package/cov-analysis-linux64/bin:$PATH && \
cov-build --dir cov-int make -j2 && \
tar czvf myproject.tgz cov-int
38 changes: 34 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,50 @@ env:
- COMPILER=gcc
- COMPILER=llvm


before_install:
- wget https://ecsft.cern.ch/dist/cvmfs/cvmfs-release/cvmfs-release-latest_all.deb
- sudo dpkg -i cvmfs-release-latest_all.deb
- sudo apt-get update
- sudo apt-get install cvmfs cvmfs-config-default
- rm -f cvmfs-release-latest_all.deb
- wget https://lcd-data.web.cern.ch/lcd-data/CernVM/default.local
- sudo mkdir -p /etc/cvmfs
- sudo mv default.local /etc/cvmfs/default.local
- sudo /etc/init.d/autofs stop
- sudo cvmfs_config setup
- sudo mkdir -p /cvmfs/clicdp.cern.ch
- sudo mount -t cvmfs clicdp.cern.ch /cvmfs/clicdp.cern.ch
- ls /cvmfs/clicdp.cern.ch

# command to install dependencies
install:
- shopt -s extglob dotglob
- mkdir Package
- mv !(Package) Package
- shopt -u dotglob
- export PKGDIR=${PWD}/Package
- curl -O https://lcd-data.web.cern.ch/lcd-data/CernVM/cernvm3-docker-latest.tar
- cat cernvm3-docker-latest.tar | docker import - cernvm
- export description=`date`
- export COVERITY_REPO=`echo ${TRAVIS_REPO_SLUG} | sed 's/\//\%2F/g'`
- if [[ "${TRAVIS_EVENT_TYPE}" == "cron" && "${COMPILER}" == "gcc" ]];
then wget https://scan.coverity.com/download/linux64 --post-data "token=${COVERITY_SCAN_TOKEN}&project=${COVERITY_REPO}" -O Package/coverity_tool.tgz; cd Package; mkdir cov-analysis-linux64; tar -xf coverity_tool.tgz -C cov-analysis-linux64 --strip-components=2;
fi

# command to run tests
script:
- docker run -t -v $PKGDIR:/Package -e COMPILER=$COMPILER cernvm /init /Package/.travis-ci.d/compile_and_test.sh
- docker run -it --name CI_container -v $PKGDIR:/Package -e COMPILER=$COMPILER -v /cvmfs/clicdp.cern.ch:/cvmfs/clicdp.cern.ch -d clicdp/slc6-build /bin/bash
- if [[ "${TRAVIS_EVENT_TYPE}" == "cron" && "${COMPILER}" == "gcc" ]];
then docker exec -it CI_container /bin/bash -c "./Package/.travis-ci.d/coverity_scan.sh";
elif [[ "${TRAVIS_EVENT_TYPE}" == "cron" && "${COMPILER}" == "llvm" ]];
then echo "Running the weekly Coverity Scan, no LLVM/Clang build this time";
else docker exec -it CI_container /bin/bash -c "./Package/.travis-ci.d/compile_and_test.sh";
fi
- if [[ "${TRAVIS_EVENT_TYPE}" == "cron" && "${COMPILER}" == "gcc" ]];
then curl --form token=${COVERITY_SCAN_TOKEN} --form [email protected] --form file=@${PKGDIR}/build/myproject.tgz --form version="master" --form description="${description}" https://scan.coverity.com/builds?project=${COVERITY_REPO} ;
fi

# Don't send e-mail notifications
notifications:
email: false
email:
on_success: never
on_failure: always
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# ConformalTracking
[![Build Status](https://travis-ci.org/iLCSoft/ConformalTracking.svg?branch=master)](https://travis-ci.org/iLCSoft/ConformalTracking)
[![Coverity Scan Build Status](https://scan.coverity.com/projects/12348/badge.svg)](https://scan.coverity.com/projects/ilcsoft-conformaltracking)

Package for running pattern recognition based on conformal mapping and cellular automaton. This is not tied to a given geometry, but has been developed for the CLIC detector model 2015.

Expand Down

0 comments on commit 01efec5

Please sign in to comment.