Skip to content

Commit

Permalink
Start actions/coverity
Browse files Browse the repository at this point in the history
  • Loading branch information
agievich committed May 10, 2024
1 parent 32f4699 commit c265ac6
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ name: coverage

on:
push:
branches: master
branches: coverage
pull_request:
branches: master
branches: coverage

jobs:
run:
Expand All @@ -19,7 +19,7 @@ jobs:
uses: actions/checkout@v3
- name: Configure CMake
run: >
CXX=g++-8 cmake -B ${{github.workspace}}/build
CXX=g++-13 cmake -B ${{github.workspace}}/build
-DCMAKE_BUILD_TYPE=Coverage
- name: Build
run: cmake --build ${{github.workspace}}/build
Expand Down
45 changes: 45 additions & 0 deletions .github/workflows/coverity.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Static Analysis using Coverity Scan

name: coverity

on:
push:
branches: coverity
pull_request:
branches: coverity

jobs:
coverity:
name: Static analysis
runs-on: ubuntu-latest
env:
COVERITY_URL: https://scan.coverity.com
COVERITY_PROJECT: GF2
COVERITY_USER: ${{secrets.COVERITY_USER}}
COVERITY_EMAIL: ${{secrets.COVERITY_EMAIL}}
COVERITY_TOKEN: ${{secrets.COVERITY_TOKEN}}
steps:
- name: Get source
uses: actions/checkout@v3
- name: Coverity download
run: |
mkdir ${{github.workspace}}/cov-analysis-linux64
curl -fLsS $COVERITY_URL/download/linux64 \
--data "token=$COVERITY_TOKEN&project=$COVERITY_USER%2F$COVERITY_PROJECT" | \
tar xz --strip 1 -C ${{github.workspace}}/cov-analysis-linux64
- name: Coverity build
run: |
mkdir ${{github.workspace}}/build && cd ${{github.workspace}}/build
export PATH=$PATH:${{github.workspace}}/cov-analysis-linux64/bin
CXX=clang cmake -DCMAKE_BUILD_TYPE=Debug ..
cov-build --dir cov-int make
tar czf $COVERITY_PROJECT.tgz cov-int
- name: Coverity upload
working-directory: ${{github.workspace}}/build
run: >
curl --form token=$COVERITY_TOKEN
--form email=$COVERITY_EMAIL
--form file=@$COVERITY_PROJECT.tgz
--form version=$GITHUB_SHA
--form description=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID
$COVERITY_URL/builds?project=$COVERITY_USER%2F$COVERITY_PROJECT

0 comments on commit c265ac6

Please sign in to comment.