-
Notifications
You must be signed in to change notification settings - Fork 201
40 lines (37 loc) · 1.76 KB
/
coverity.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: Coverity
on:
schedule:
- cron: '0 0 * * MON'
jobs:
coverity:
if: github.repository == 'canonical/netplan'
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: |
echo "APT::Get::Always-Include-Phased-Updates \"true\";" | sudo tee /etc/apt/apt.conf.d/90phased-updates
sudo add-apt-repository -y -u -s ppa:slyon/netplan-ci
sudo apt update
sudo apt -y install curl ubuntu-dev-tools equivs
pull-lp-source netplan.io
sed -i 's| systemd-dev|# DELETED: systemd-dev|' netplan.io-*/debian/control
mk-build-deps -i -B -s sudo netplan.io-*/debian/control
- 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: |
git fetch --unshallow --tags
TAG=$(git describe --tags $(git rev-list --tags --max-count=1)) # find latest (stable) tag
REV=$(git rev-parse --short HEAD) # get current git revision
VER="$TAG+git~$REV"
curl --form token=${{ secrets.COVERITY_TOKEN }} --form email=${{ secrets.COVERITY_EMAIL }} --form [email protected] --form version="${VER}" --form description="Coverity scan" https://scan.coverity.com/builds?project=Netplan