Coverity Scan #21
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Coverity Scan | |
on: | |
# push: | |
# branches: [ "main" ] | |
# pull_request: | |
# branches: [ "main" ] | |
# schedule: | |
# - cron: '28 12 * * 6' | |
workflow_dispatch: # Allow manual triggers | |
jobs: | |
coverity: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 2 | |
submodules: recursive | |
- name: Download Coverity Build Tool | |
run: | | |
wget -q https://scan.coverity.com/download/linux64 \ | |
--post-data "token=${{ secrets.COV_TOKEN }}&project=${{ secrets.COV_PROJECT }}" \ | |
-O cov-analysis-linux64.tar.gz | |
mkdir cov-analysis-linux64 | |
tar xzf cov-analysis-linux64.tar.gz --strip 1 -C cov-analysis-linux64 | |
rm cov-analysis-linux64.tar.gz | |
- name: Setup build environment | |
run: | | |
sudo apt-get update -qq | |
sudo apt-get install -y --no-install-recommends \ | |
doxygen \ | |
graphviz \ | |
imagemagick \ | |
libboost-date-time-dev \ | |
libboost-dev \ | |
libboost-filesystem-dev \ | |
libboost-graph-dev \ | |
libboost-iostreams-dev \ | |
libboost-program-options-dev \ | |
libboost-python-dev \ | |
libboost-regex-dev \ | |
libboost-serialization-dev \ | |
libboost-thread-dev \ | |
libcoin-dev \ | |
libeigen3-dev \ | |
libfmt-dev \ | |
libgts-bin \ | |
libgts-dev \ | |
libkdtree++-dev \ | |
libmedc-dev \ | |
libmetis-dev \ | |
libocct-data-exchange-dev \ | |
libocct-ocaf-dev \ | |
libocct-visualization-dev \ | |
libopencv-dev \ | |
libproj-dev \ | |
libpyside2-dev \ | |
libqt5opengl5-dev \ | |
libqt5svg5-dev \ | |
libqt5x11extras5-dev \ | |
libshiboken2-dev \ | |
libspnav-dev \ | |
libvtk9-dev \ | |
libx11-dev \ | |
libxerces-c-dev \ | |
libyaml-cpp-dev \ | |
libzipios++-dev \ | |
netgen \ | |
netgen-headers \ | |
occt-draw \ | |
pybind11-dev \ | |
pyqt5-dev-tools \ | |
pyside2-tools \ | |
python3-dev \ | |
python3-git \ | |
python3-markdown \ | |
python3-matplotlib \ | |
python3-packaging \ | |
python3-pivy \ | |
python3-ply \ | |
python3-pyside2.qtcore \ | |
python3-pyside2.qtgui \ | |
python3-pyside2.qtnetwork \ | |
python3-pyside2.qtsvg \ | |
python3-pyside2.qtwidgets \ | |
qtbase5-dev \ | |
qttools5-dev \ | |
shiboken2 \ | |
swig \ | |
xvfb \ | |
jq | |
- name: Build with cov-build | |
run: | | |
export PATH=$PATH:$(pwd)/cov-analysis-linux64/bin | |
cmake -DBUILD_FEM_NETGEN=ON -DFREECAD_USE_PYBIND11=ON ../ | |
cov-build --dir cov-int --fs-capture-search ../src make -j$(nproc) | |
- name: Submit to Coverity Scan | |
run: | | |
tar czvf project.tgz cov-int | |
FILE_SIZE=$(stat -f %z project.tgz || stat -c %s project.tgz) | |
echo "Archive size: $FILE_SIZE bytes" | |
curl -X POST \ | |
-d version="1.1.0dev.39100" \ | |
-d description="8865450a3e14220925e0e449c0f1f79056b4fb89" \ | |
-d email=${{ secrets.COV_EMAIL }} \ | |
-d token=${{ secrets.COV_TOKEN }} \ | |
-d file_name="project.tgz" \ | |
https://scan.coverity.com/projects/5846/builds/init \ | |
| tee response | |
upload_url=$(jq -r '.url' response) | |
build_id=$(jq -r '.build_id' response) | |
curl -X PUT \ | |
--header 'Content-Type: application/json' \ | |
--upload-file project.tgz \ | |
$upload_url | |
curl -X PUT \ | |
-d token="${{ secrets.COV_TOKEN }}" \ | |
https://scan.coverity.com/projects/5846/builds/$build_id/enqueue |