mirror of https://github.com/sipwise/mediator.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
61 lines
1.9 KiB
61 lines
1.9 KiB
name: Coverity Scan
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- coverity_scan
|
|
schedule:
|
|
- cron: '17 4 */7 * *'
|
|
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
|
COVERITY_SCAN_TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}
|
|
COVERITY_SCAN_PROG_URL: https://scan.coverity.com/download/cxx/linux64
|
|
COVERITY_SCAN_PROJECT_NAME: sipwise/mediator
|
|
COVERITY_SCAN_NOTIFICATION_EMAIL: development@sipwise.com
|
|
steps:
|
|
- name: Checkout source
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Update APT cache
|
|
run: |
|
|
sudo apt-get update
|
|
|
|
- name: Get build dependencies
|
|
run: |
|
|
# note: debhelper v13 isn't available from ubuntu-20.04 yet, we need a backport
|
|
sudo apt-add-repository -y ppa:ubuntu-cloud-archive/yoga-staging
|
|
sudo apt-get install -q -y --no-install-recommends git ca-certificates curl
|
|
sudo apt-get build-dep -q -y .
|
|
|
|
- name: Get coverity scan
|
|
run: |
|
|
curl -o cov-analysis.tgz \
|
|
$COVERITY_SCAN_PROG_URL \
|
|
--form project=$COVERITY_SCAN_PROJECT_NAME \
|
|
--form token=$COVERITY_SCAN_TOKEN
|
|
tar xfz cov-analysis.tgz
|
|
|
|
# We need to disable glib deprecation warnings, as coverity-scan does
|
|
# not support __attributes__ in enums.
|
|
- name: Analyze
|
|
run: |
|
|
CPPFLAGS="-DGLIB_DISABLE_DEPRECATION_WARNINGS" \
|
|
cov-analysis-*/bin/cov-build --dir cov-int make -j4
|
|
|
|
- name: Submit result
|
|
run: |
|
|
tar cfz cov-int.tar.gz cov-int
|
|
curl \
|
|
https://scan.coverity.com/builds?project=$COVERITY_SCAN_PROJECT_NAME \
|
|
--form token=$COVERITY_SCAN_TOKEN \
|
|
--form email=$COVERITY_SCAN_NOTIFICATION_EMAIL \
|
|
--form file=@cov-int.tar.gz \
|
|
--form version="`git describe --tags`" \
|
|
--form description="`git describe --tags` / $CI_COMMIT_TITLE / $CI_COMMIT_REF_NAME:$CI_PIPELINE_ID"
|