toxcore/.github/workflows/coverity-scan.yml
iphydf a6426d7e7a
chore: Make coverity scan a nightly job.
Instead of on every push. It only produces results once a day anyway.
2022-02-19 02:47:36 +00:00

51 lines
1.5 KiB
YAML

name: coverity-scan
on:
schedule:
- cron: '0 10 * * *' # Once a day
jobs:
latest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install libraries
run:
sudo apt-get update &&
sudo apt-get install -y --no-install-recommends
libmsgpack-dev
libopus-dev
libsodium-dev
libvpx-dev
- name: Download Coverity Build Tool
run: |
wget -q https://scan.coverity.com/download/cxx/linux64 --post-data "token=$TOKEN&project=TokTok/c-toxcore" -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: Run autoreconf
run: autoreconf -fi
- name: Configure
run: ./configure
- name: Build with cov-build
run: cov-analysis-linux64/bin/cov-build --dir cov-int make
- name: Submit the result to Coverity Scan
run:
tar czvf c-toxcore.tgz cov-int &&
curl
--form project=TokTok/c-toxcore
--form token=$TOKEN
--form email=iphydf@gmail.com
--form file=@c-toxcore.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 }}