Skip to content

DOD_Coverity_CI

DOD_Coverity_CI #5

Workflow file for this run

# Copyright (c) 2024 Advanced Micro Devices, Inc
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in
# the Software without restriction, including without limitation the rights to
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
# the Software, and to permit persons to whom the Software is furnished to do so,
# subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
name: DOD_Coverity_CI
on:
schedule:
- cron: "30 5 * * 3"
workflow_dispatch:
jobs:
Coverity_CPP: # Runs inside a container
runs-on: [self-hosted, Linux, dod]
container:
image: artifactory.xilinx.com/aie-ipu-build-docker-local/aie-ipu-aiebuild-dod:0809
options: --user root
volumes:
- /tools/batonroot/coverity/2022.3.0/:/tools/batonroot/coverity/2022.3.0/
- /proj/aiebuilds/IPU/:/proj/aiebuilds/IPU/
- /proj/coverity/vai_builds/:/proj/coverity/vai_builds/
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Run coverity Build for CPP
run: |
source scl_source enable devtoolset-9 && \
echo $0 && \
yum install -y xrt && \
echo "Running as: $(whoami)"
cat /opt/xilinx/xrt/version.json && \
source /opt/xilinx/xrt/setup.sh && \
source setup.sh && \
mkdir -p build && \
printenv && \
/tools/batonroot/coverity/2022.3.0/bin/cov-configure --template --compiler c++ --comptype g++ --version 9.3.1 --config /proj/coverity/vai_builds/coverity-config-dod-cpp.xml && \
/tools/batonroot/coverity/2022.3.0/bin/cov-configure --template --compiler cc --comptype gcc --version 9.3.1 --config /proj/coverity/vai_builds/coverity-config-dod-cpp.xml && \
/tools/batonroot/coverity/2022.3.0/bin/cov-build --config /proj/coverity/vai_builds/coverity-config-dod-cpp.xml --dir /proj/coverity/vai_builds/idir_dod_cpp_${{ github.run_number }} cmake -S . -B build -DCMAKE_INSTALL_PREFIX=build/Release -DENABLE_DD_TESTS=ON -DLOGGING_EN=ON -DPERF_LOGGING_EN=ON -DUNIT_TEST_PERF_EN=ON && \
cmake --build build --config=Release --target install --parallel
/tools/batonroot/coverity/2022.3.0/bin/cov-analyze --cpp --dir /proj/coverity/vai_builds/idir_dod_cpp_${{ github.run_number }} -j 4 --all
chmod -R 777 /proj/coverity/vai_builds/idir_dod_cpp_${{ github.run_number }}
shell: bash
- name: Setup Coverity for Python
run: |
echo "Github Workspace: $GITHUB_WORKSPACE"
/tools/batonroot/coverity/2022.3.0/bin/cov-configure --python --config /proj/coverity/vai_builds/coverity_config_DOD_python.xml
/tools/batonroot/coverity/2022.3.0/bin/cov-build --config /proj/coverity/vai_builds/coverity_config_DOD_python.xml --dir /proj/coverity/vai_builds/idir_dod_python_${{ github.run_number }} --no-command --fs-capture-search ./
/tools/batonroot/coverity/2022.3.0/bin/cov-analyze --dir /proj/coverity/vai_builds/idir_dod_python_${{ github.run_number }} -j 4 --all
chmod -R 777 /proj/coverity/vai_builds/idir_dod_python_${{ github.run_number }}
Coverity_Commit:
runs-on: dod_coverity
needs: [ Coverity_CPP ]
steps:
- name: Setup Coverity commit for Python and CPP
run: |
echo "Running as user: $(whoami)"
/tools/batonroot/coverity/2022.3.0/bin/cov-manage-emit --dir /proj/coverity/vai_builds/idir_dod_cpp_${{ github.run_number }} reset-host-name
/tools/batonroot/coverity/2022.3.0/bin/cov-manage-emit --dir /proj/coverity/vai_builds/idir_dod_python_${{ github.run_number }} reset-host-name
/tools/batonroot/coverity/2022.3.0/bin/cov-commit-defects --dir /proj/coverity/vai_builds/idir_dod_cpp_${{ github.run_number }} --host xsjcoverity01 --dataport 9090 --auth-key-file /proj/aiebuilds/IPU/Coverity/auth-key1.txt --stream dod_cpp --description dod_coverity_cpp_${{ github.run_number }}
/tools/batonroot/coverity/2022.3.0/bin/cov-commit-defects --dir /proj/coverity/vai_builds/idir_dod_python_${{ github.run_number }} --host xsjcoverity01 --dataport 9090 --auth-key-file /proj/aiebuilds/IPU/Coverity/auth-key1.txt --stream dod_python --description dod_coverity_python_${{ github.run_number }}
shell: bash