Coverity #9
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 * * *" | |
workflow_dispatch: | |
permissions: | |
contents: read | |
jobs: | |
scan: | |
runs-on: ubuntu-latest | |
if: ${{ github.repository_owner == 'CHERTS' }} | |
steps: | |
- name: Code checkout | |
uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y autoconf automake gcc make wget unzip gettext libxml2-dev libssl-dev libcurl4-openssl-dev libpcre2-dev libconfig-dev libsnmp-dev libsqlite3-dev libopenipmi-dev libssh2-1-dev unixodbc-dev libevent-dev | |
sudo apt-get install -y dpkg-dev devscripts git dh-make build-essential autoconf autotools-dev quilt pkg-config tar xz-utils curl | |
sudo apt-get install -y libmysqlclient-dev libpq-dev | |
sudo wget https://github.com/sass/dart-sass/releases/download/1.71.1/dart-sass-1.71.1-linux-x64.tar.gz -O /tmp/dart-sass-linux-x64.tar.gz | |
sudo tar -zxf /tmp/dart-sass-linux-x64.tar.gz -C /tmp && yes | sudo cp /tmp/dart-sass/sass /usr/local/sbin && sudo cp -r /tmp/dart-sass/src /usr/local/sbin && sudo rm -rf /tmp/dart-sass dart-sass-linux-x64.tar.gz | |
- name: Download Coverity build tool | |
run: | | |
wget -c -N https://scan.coverity.com/download/linux64 --post-data "token=${{ secrets.COVERITY_SCAN_TOKEN }}&project=zabbix_dbmon" -O coverity_tool.tar.gz | |
mkdir coverity_tool | |
tar xzf coverity_tool.tar.gz --strip 1 -C coverity_tool | |
- name: Build with Coverity build tool | |
run: | | |
export PATH=`pwd`/coverity_tool/bin:$PATH | |
./bootstrap.sh | |
./configure --with-openssl --with-libpthread --with-libpcre2 --with-libcurl --enable-dbmon --enable-dbmon-mysql --enable-dbmon-postgresql --with-mysql --with-postgresql --enable-ipv6 --enable-agent --sysconfdir=/etc/zabbix | |
make dist | |
cov-build --dir cov-int make | |
- name: Submit build result to Coverity Scan | |
run: | | |
tar czvf cov.tar.gz cov-int | |
curl --form token=${{ secrets.COVERITY_SCAN_TOKEN }} \ | |
--form email=${{ secrets.COVERITY_SCAN_EMAIL }} \ | |
--form [email protected] \ | |
--form version="Commit $GITHUB_SHA" \ | |
--form description="Build submitted via CI" \ | |
https://scan.coverity.com/builds?project=zabbix_dbmon |