Coverity #60
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
name: Coverity | |
on: | |
schedule: | |
- cron: '0 0 * * MON' | |
jobs: | |
coverity: | |
if: github.repository == 'canonical/netplan' | |
runs-on: ubuntu-24.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 apt update | |
sudo apt -y install curl ubuntu-dev-tools equivs | |
pull-lp-source netplan.io | |
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 |