Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add coverity #186

Merged
merged 19 commits into from
Dec 5, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,8 @@ jobs:
runs-on: macOS-latest
steps:
- uses: actions/checkout@v1
- name: Install libgit2
run: brew install libgit2
- name: Install toml11
run: brew install matken11235/toml11/toml11
- name: Install libgit2 & toml11
run: brew install libgit2 matken11235/toml11/toml11
- name: Build and Test
run: |
mkdir build && cd build
Expand Down
65 changes: 65 additions & 0 deletions .github/workflows/coverity.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Covertity

on:
push:
tags:
- '^v?[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+$'

jobs:
scan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1

- name: Install packages
run: |
sudo apt-get -qq update
sudo add-apt-repository ppa:mhier/libboost-latest
sudo apt-get -qq -y install libssl-dev libgit2-dev libboost1.70-dev

- name: Install toml11
run: |
git clone -q -b v3.1.0 https://github.com/ToruNiina/toml11.git
mkdir toml11/build && cd $_
cmake -Dtoml11_BUILD_TEST=OFF ..
sudo make install
cd ../../
rm -rf toml11

- name: Download Coverity Build Tool
run: |
wget -q https://scan.coverity.com/download/cxx/linux64 \
--post-data "token=$COVERITY_SCAN_TOKEN&project=poacpm%2Fpoac" \
-O coverity_tool.tgz
mkdir coverity_tool
tar xzf coverity_tool.tgz --strip 1 -C coverity_tool
env:
COVERITY_SCAN_TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}

- name: Create a building directory and Run CMake
run: |
mkdir build && cd $_
cmake -Dpoac_BUILD_TEST=ON -DCMAKE_BUILD_TYPE=Coverage ..
env:
CXX: g++-7

- name: Build with cov-build
run: |
export PATH=$PWD/coverity_tool/bin:$PATH
cov-configure --comptype gcc --compiler g++-7 --template
cov-build --dir cov-int make --directory ./build

- name: Submit the result to Coverity Scan
run: |
tar czvf poac.tgz cov-int
curl \
--form project='poacpm/poac' \
--form token=${COVERITY_SCAN_TOKEN} \
--form email=${COVERITY_SCAN_NOTIFICATION_EMAIL} \
--form [email protected] \
--form version='0.2.1' \
--form description='Package manager for C++' \
https://scan.coverity.com/builds?project=poacpm%2Fpoac
env:
COVERITY_SCAN_TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}
COVERITY_SCAN_NOTIFICATION_EMAIL: ${{ secrets.COVERITY_SCAN_NOTIFICATION_EMAIL }}
6 changes: 2 additions & 4 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,8 @@ jobs:
build_type: [Debug] # TODO: Release
steps:
- uses: actions/checkout@v1
- name: Install libgit2
run: brew install libgit2
- name: Install toml11
run: brew install matken11235/toml11/toml11
- name: Install libgit2 & toml11
run: brew install libgit2 matken11235/toml11/toml11
- name: Build and Test
run: |
mkdir build && cd build
Expand Down
38 changes: 0 additions & 38 deletions .travis.yml

This file was deleted.