Skip to content

coverity

coverity #8

Workflow file for this run

# Copyright (C) The c-ares project and its contributors
# SPDX-License-Identifier: MIT
name: coverity
on:
schedule:
- cron: "0 10 * * 1" # Mondays at 00:10 UTC
push:
branches: [ coverity_scan ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Source
uses: actions/checkout@v4
- name: apt dependencies
run: sudo apt-get install cmake ninja-build
- name: Download Coverity Build Tool
run: |
wget -q https://scan.coverity.com/download/cxx/linux64 --post-data "token=$TOKEN&project=c-ares" -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: CMake
run: |
mkdir build
cd build
cmake -DCARES_BUILD_TESTS=OFF -G Ninja ..
- name: Build with cov-build
run: |
export PATH=`pwd`/cov-analysis-linux64/bin:$PATH
cd build
cov-build --dir cov-int ninja
- name: Submit the result to Coverity Scan
run: |
cd build
tar czvf c-ares.tgz cov-int
curl \
--form project=c-ares \
--form token=$TOKEN \
--form email=$EMAIL \
--form [email protected] \
--form version=main \
--form description="c-ares" \
https://scan.coverity.com/builds?project=c-ares
env:
TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}
EMAIL: ${{ secrets.COVERITY_SCAN_EMAIL }}