2021-07-27 03:31:53 +05:30
|
|
|
name: Coverity Scan
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- 'dev'
|
|
|
|
|
|
|
|
env:
|
|
|
|
PROJECT_NAME: sysklogd
|
|
|
|
CONTACT_EMAIL: troglobit@gmail.com
|
|
|
|
COVERITY_NAME: troglobit-sysklogd
|
|
|
|
COVERITY_PROJ: troglobit%2Fsysklogd
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
coverity:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-04-22 12:48:07 +05:30
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: actions/cache@v3
|
2021-07-27 03:31:53 +05:30
|
|
|
id: coverity-toolchain-cache
|
|
|
|
with:
|
|
|
|
path: cov-analysis-linux64
|
|
|
|
key: ${{ runner.os }}-coverity
|
|
|
|
- name: Download Coverity Scan
|
|
|
|
if: steps.coverity-toolchain-cache.outputs.cache-hit != 'true'
|
|
|
|
env:
|
|
|
|
TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}
|
|
|
|
run: |
|
|
|
|
wget -q https://scan.coverity.com/download/cxx/linux64 \
|
|
|
|
--post-data "token=$TOKEN&project=${COVERITY_PROJ}" \
|
|
|
|
-O cov-analysis-linux64.tar.gz
|
|
|
|
mkdir cov-analysis-linux64
|
|
|
|
tar xzf cov-analysis-linux64.tar.gz --strip 1 -C cov-analysis-linux64
|
|
|
|
- name: Configure
|
|
|
|
run: |
|
|
|
|
./autogen.sh
|
|
|
|
./configure --prefix=
|
|
|
|
- name: Build
|
|
|
|
run: |
|
|
|
|
export PATH=`pwd`/cov-analysis-linux64/bin:$PATH
|
|
|
|
cov-build --dir cov-int make
|
2021-07-27 03:44:56 +05:30
|
|
|
- name: Submit results to Coverity Scan
|
2021-07-27 03:31:53 +05:30
|
|
|
env:
|
|
|
|
TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}
|
|
|
|
run: |
|
|
|
|
tar czvf ${PROJECT_NAME}.tgz cov-int
|
|
|
|
curl \
|
|
|
|
--form project=${COVERITY_NAME} \
|
|
|
|
--form token=$TOKEN \
|
|
|
|
--form email=${CONTACT_EMAIL} \
|
|
|
|
--form file=@${PROJECT_NAME}.tgz \
|
|
|
|
--form version=trunk \
|
|
|
|
--form description="${PROJECT_NAME} $(git rev-parse HEAD)" \
|
|
|
|
https://scan.coverity.com/builds?project=${COVERITY_PROJ}
|
|
|
|
- name: Upload build.log
|
2023-04-22 12:48:07 +05:30
|
|
|
uses: actions/upload-artifact@v3
|
2021-07-27 03:31:53 +05:30
|
|
|
with:
|
|
|
|
name: coverity-build.log
|
|
|
|
path: cov-int/build-log.txt
|