Skip to content

Commit

Permalink
github: add a scheduled action to run Coverity
Browse files Browse the repository at this point in the history
It will run every Monday and automatically upload the results.

The token and email needed are stored as Github secrets.
  • Loading branch information
daniloegea committed Aug 10, 2023
1 parent 3e168ab commit 9a32d17
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/coverity.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Coverity

on:
schedule:
- cron: '0 0 * * MON'

jobs:
coverity:
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
sudo sed -i '/deb-src/s/^# //' /etc/apt/sources.list
sudo apt update
sudo apt -y build-dep netplan.io
sudo apt -y install libcmocka-dev meson python3-pytest curl
- name: Download Coverity
run: |
curl https://scan.coverity.com/download/cxx/linux64 --no-progress-meter --output ${HOME}/coverity.tar.gz --data "token=${{ secrets.COVERITY_TOKEN }}&project=Netplan"
mkdir ${HOME}/coverity
tar --strip=1 -C ${HOME}/coverity -xzf ${HOME}/coverity.tar.gz
echo "$HOME/coverity/bin" >> $GITHUB_PATH
- name: Run Coverity
run: |
meson setup coveritybuild --prefix=/usr
cov-build --dir cov-int meson compile -C coveritybuild
tar czf netplan.tar.gz cov-int
- name: Upload results
run: |
curl --form token=${{ secrets.COVERITY_TOKEN }} --form email=${{ secrets.COVERITY_EMAIL }} --form [email protected] --form version="0.106" --form description="Coverity scan" https://scan.coverity.com/builds?project=Netplan

0 comments on commit 9a32d17

Please sign in to comment.