Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
c85d606e
Commit
c85d606e
authored
Jan 16, 2014
by
Ben Straub
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2044 from libgit2/coverity
Run Coverity scan on Travis
parents
ba6464b3
998f0016
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
72 additions
and
0 deletions
+72
-0
.travis.yml
+8
-0
README.md
+1
-0
script/cibuild.sh
+6
-0
script/coverity.sh
+57
-0
No files found.
.travis.yml
View file @
c85d606e
...
...
@@ -9,13 +9,21 @@ compiler:
# Settings to try
env
:
global
:
-
secure
:
"
YnhS+8n6B+uoyaYfaJ3Lei7cSJqHDPiKJCKFIF2c87YDfmCvAJke8QtE7IzjYDs7UFkTCM4ox+ph2bERUrxZbSCyEkHdjIZpKuMJfYWja/jgMqTMxdyOH9y8JLFbZsSXDIXDwqBlC6vVyl1fP90M35wuWcNTs6tctfVWVofEFbs="
matrix
:
-
OPTIONS="-DTHREADSAFE=ON -DCMAKE_BUILD_TYPE=Release"
-
OPTIONS="-DBUILD_CLAR=ON -DBUILD_EXAMPLES=ON"
matrix
:
fast_finish
:
true
include
:
-
compiler
:
i586-mingw32msvc-gcc
env
:
OPTIONS="-DBUILD_CLAR=OFF -DWIN32=ON -DMINGW=ON"
-
compiler
:
gcc
env
:
COVERITY=1
allow_failures
:
-
env
:
COVERITY=1
install
:
-
sudo apt-get -qq update
...
...
README.md
View file @
c85d606e
...
...
@@ -2,6 +2,7 @@ libgit2 - the Git linkable library
==================================
[
![Build Status
](
https://secure.travis-ci.org/libgit2/libgit2.png?branch=development
)
](http://travis-ci.org/libgit2/libgit2)
[
![Coverity Scan Build Status
](
https://scan.coverity.com/projects/639/badge.svg
)
](https://scan.coverity.com/projects/639)
`libgit2`
is a portable, pure C implementation of the Git core methods provided as a
re-entrant linkable library with a solid API, allowing you to write native
...
...
script/cibuild.sh
View file @
c85d606e
#!/bin/sh
if
[
"
$COVERITY
"
-eq
1
]
;
then
./script/coverity.sh
;
exit
$?
;
fi
# Create a test repo which we can use for the online::push tests
mkdir
$HOME
/_temp
git init
--bare
$HOME
/_temp/test.git
...
...
script/coverity.sh
0 → 100755
View file @
c85d606e
#!/bin/bash
set
-e
# Environment check
[
-z
"
$COVERITY_TOKEN
"
]
&&
echo
"Need to set a coverity token"
&&
exit
1
# Only run this on our branches
echo
"Pull request:
$TRAVIS_PULL_REQUEST
| Slug:
$TRAVIS_REPO_SLUG
"
if
[
"
$TRAVIS_PULL_REQUEST
"
!=
"false"
-o
"
$TRAVIS_REPO_SLUG
"
!=
"libgit2/libgit2"
]
;
then
echo
"Only analyzing 'development' on the main repo."
exit
0
fi
COV_VERSION
=
6.6.1
case
`
uname
-m
`
in
i?86
)
BITS
=
32
;;
amd64|x86_64
)
BITS
=
64
;;
esac
SCAN_TOOL
=
https://scan.coverity.com/download/linux-
${
BITS
}
TOOL_BASE
=
`
pwd
`
/_coverity-scan
# Install coverity tools
if
[
!
-d
$TOOL_BASE
]
;
then
echo
"Downloading coverity..."
mkdir
-p
$TOOL_BASE
cd
$TOOL_BASE
wget
-O
coverity_tool.tgz
$SCAN_TOOL
\
--post-data
"project=libgit2&token=
$COVERITY_TOKEN
"
tar
xzf coverity_tool.tgz
cd
..
TOOL_DIR
=
`
find
$TOOL_BASE
-type
d
-name
'cov-analysis*'
`
ln
-s
$TOOL_DIR
$TOOL_BASE
/cov-analysis
fi
COV_BUILD
=
"
$TOOL_BASE
/cov-analysis/bin/cov-build"
# Configure and build
rm
-rf
_build
mkdir _build
cd
_build
cmake ..
-DTHREADSAFE
=
ON
COVERITY_UNSUPPORTED
=
1
\
$COV_BUILD
--dir
cov-int
\
cmake
--build
.
# Upload results
tar
czf libgit2.tgz cov-int
SHA
=
`
git rev-parse
--short
HEAD
`
curl
\
--form
project
=
libgit2
\
--form
token
=
$COVERITY_TOKEN
\
--form
email
=
bs@github.com
\
--form
file
=
@libgit2.tgz
\
--form
version
=
$SHA
\
--form
description
=
"Travis build"
\
http://scan5.coverity.com/cgi-bin/upload.py
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment