-
Notifications
You must be signed in to change notification settings - Fork 195
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
github: add a scheduled action to run Coverity
It will run every Monday and automatically upload the results. The token and email needed are stored as Github secrets.
- Loading branch information
1 parent
3e168ab
commit 9a32d17
Showing
1 changed file
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |