Permalink
Browse files

Add configurations for coverity scan

Coverity scan can be triggered by executing trigger-coverity-scan.sh
script.

Related: #327
  • Loading branch information...
siteshwar committed May 15, 2018
1 parent 2f5003f commit 0ad6f36217c73aca8023548cfb9b591ac027e9c8
Showing with 50 additions and 0 deletions.
  1. +12 −0 bin/trigger-coverity-scan.sh
  2. +38 −0 coverity-travis.yml
@@ -0,0 +1,12 @@
#!/bin/bash
# Get current branch name
current=$(git rev-parse --abbrev-ref HEAD | tr -d "\n")
# Coverity scan is triggered only for coverity_scan branch
git branch -D coverity_scan
git checkout -b coverity_scan
# Use custom .travis.yml file for coverity
cp coverity-travis.yml .travis.yml
git commit -a -m "Trigger coverity scan"
git push --force -u origin coverity_scan
# Switch back to previous branch
git checkout $current
View
@@ -0,0 +1,38 @@
sudo: required
language: c
env:
global:
# COVERITY_SCAN_TOKEN
- secure: "OEVGFl9FijJybDAgaoIwNsaQOlVre3HF95LnFGa3D+S8Nsr1V+DOn2FSdlxjcXqJpInJ/+8o5q2krLw85yKE+wgPsqhglGAw85XYkh15pM3VattPXCUhEZUEaeE2jspdm6s8u6BGrwbT84a2KikX21yXr3Vf+2m1oQjkQLuhrrI="
before_install:
- sudo apt-get update
- sudo apt-get install python3-pip
- sudo pip3 install meson==0.44.0
# Ubuntu repositories have older version of ninja
- wget https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-linux.zip
- unzip ninja-linux.zip
- mv ninja ~/bin
script:
- exit 0
addons:
coverity_scan:
# GitHub project metadata
project:
name: ksh
# Where email notification of build analysis results will be sent
notification_email: svashisht@redhat.com
# Commands to prepare for build_command
build_command_prepend: meson build
# The command that will be added as an argument to "cov-build" to compile your project for analysis,
build_command: ninja -C build
# Pattern to match selecting branches that will run analysis. We recommend leaving this set to 'coverity_scan'.
# Take care in resource usage, and consider the build frequency allowances per
# https://scan.coverity.com/faq#frequency
branch_pattern: coverity_scan

0 comments on commit 0ad6f36

Please sign in to comment.