Skip to content

coverity-scan

coverity-scan #5

Workflow file for this run

name: coverity-scan
on:
# Run this workflow every day at 10:00 UTC
schedule: [cron: '0 10 * * *']
# Allow manual trigger
workflow_dispatch:
jobs:
latest:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install libraries
run:
sudo apt-get update &&
sudo apt-get install -y --no-install-recommends
cmake
libavcodec-dev
libavdevice-dev
libavfilter-dev
libavutil-dev
libexif-dev
libgl1-mesa-dev
libopenal-dev
libopus-dev
libqrencode-dev
libqt6opengl6-dev
libqt6svg6-dev
libsodium-dev
libsqlcipher-dev
libswresample-dev
libswscale-dev
libvpx-dev
libxss-dev
ninja-build
pkg-config
qt6-l10n-tools
qt6-tools-dev
qt6-tools-dev-tools
- name: Download Coverity Build Tool
run: |
wget -q https://scan.coverity.com/download/cxx/linux64 --post-data "token=$TOKEN&project=TokTok/qTox" -O cov-analysis-linux64.tar.gz
mkdir cov-analysis-linux64
tar xzf cov-analysis-linux64.tar.gz --strip 1 -C cov-analysis-linux64
env:
TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}
- name: Install toxcore
run: |
tar zxf <(curl -L https://github.com/TokTok/c-toxcore/releases/download/v0.2.20/c-toxcore-0.2.20.tar.gz)
cd c-toxcore-0.2.20
cmake -B_build -GNinja -DENABLE_SHARED=ON -DENABLE_STATIC=OFF -DBOOTSTRAP_DAEMON=OFF
cmake --build _build
sudo cmake --install _build
- name: Configure qTox build
run: cmake -B_build -GNinja .
- name: Build with cov-build
run: cov-analysis-linux64/bin/cov-build --dir cov-int cmake --build _build
- name: Submit the result to Coverity Scan
run:
tar czvf qTox.tgz cov-int &&
curl
--form project=TokTok/qTox
--form token=$TOKEN
--form email=iphydf@gmail.com
--form file=@qTox.tgz
--form version="$(git rev-list --count HEAD)"
--form description="CI build of $(git rev-parse --abbrev-ref HEAD) branch"
https://scan.coverity.com/builds
env:
TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}