Skip to content

CoverityScan

CoverityScan #234

Workflow file for this run

name: CoverityScan
on:
schedule:
- cron: '0 4 * * 1' # Every monday at 4:00 UTC
push:
paths:
# Workflow file itself
- '.github/workflows/CoverityScan.yml'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
develop:
runs-on: ubuntu-20.04
env:
GCC_VERSION: "8"
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: 'develop'
submodules: recursive
- name: Setup Environment
run: external/Phi/scripts/ci/SetupEnvironment.sh
- name: Install compiler
run: external/Phi/scripts/ci/InstallTools.sh gcc-${{ env.GCC_VERSION }} ninja
- name: Install dependencies
run: sudo scripts/ci/InstallDependencies.sh
- name: Download Coverity Build Tool
run: |
wget -q https://scan.coverity.com/download/cxx/linux64 --post-data "token=$TOKEN&project=AMS21%2FDLXEmu" -O cov-analysis-linux64.tar.gz
mkdir -p cov-analysis-linux64
tar xzf cov-analysis-linux64.tar.gz --strip 1 -C cov-analysis-linux64
env:
TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}
- name: Configure
run: |
mkdir -p build
cd build
cmake ..
- name: Configure cov-build
run: |
export PATH=`pwd`/cov-analysis-linux64/bin:$PATH
cov-configure --comptype gcc --compiler /usr/bin/g++-${{ env.GCC_VERSION }} -- -std=c++17
- name: Build with cov-build
env:
COVERITY_UNSUPPORTED_COMPILER_INVOCATION: 1
run: |
export PATH=`pwd`/cov-analysis-linux64/bin:$PATH
cd build
cov-build --dir cov-int ninja
- name: Print build log
run: cat build/cov-int/build-log.txt
- name: Submit the result to Coverity Scan
working-directory: ./build
run: |
tar czvf DLXEmu.tgz cov-int
curl --form token=$TOKEN \
--form email=hansfritzenmeister@protonmail.com \
--form file=@DLXEmu.tgz \
--form version="develop" \
--form description="Automatic submission" \
https://scan.coverity.com/builds?project=AMS21%2FDLXEmu
env:
TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}