Skip to content

Coverity

Coverity #155

Workflow file for this run

name: Coverity
on: workflow_dispatch
jobs:
linux:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Create Qt Directory
run: |
sudo mkdir /usr/Qt
sudo chown $(whoami) /usr/Qt
- name: Install Qt
uses: jurplel/[email protected]
with:
version: '6.5.*'
dir: /usr
- name: Install Dependencies
run: sudo apt-get install -y libboost-dev libboost-thread-dev libgmp-dev libmpfr-dev libglu1-mesa-dev libxkbcommon-x11-0 libxcb-cursor0
- name: Checkout CGAL
uses: actions/checkout@v3
with:
repository: CGAL/cgal
path: cgal
- name: Install CGAL
run: |
pushd cgal;
mkdir build;
pushd build;
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release ..;
sudo make install;
popd;
popd;
rm -r cgal;
- name: Apply patches
run: |
export CGAL_DIR=/usr/include/CGAL;
export BOOST_ROOT=/usr/include/boost;
sudo patch -l $BOOST_ROOT/random/linear_congruential.hpp < patch/Fix-Wtautological-overlap-compare-clang-warning.patch;
sudo patch -l $BOOST_ROOT/optional/optional.hpp < patch/Fix-uninitialized-member-optional.hpp.patch;
sudo patch -l $CGAL_DIR/Triangulation_2/internal/Triangulation_line_face_circulator_2.h < patch/Fix-uninitialized-member-in-Triangulation_line_face_circulator_2.h.patch;
sudo patch -l $CGAL_DIR/Hash_map/internal/chained_map.h < patch/Fix-uninitialized-member-in-chained_map.h.patch;
sudo patch -l $CGAL_DIR/GMP/Gmpz_type.h < patch/Fix-uninitialized-member-in-Gmpz_type.h.patch;
sudo patch -l $CGAL_DIR/GMP/Gmpfr_type.h < patch/Fix-uninitialized-member-in-Gmpfr_type.h.patch;
sudo patch -l $CGAL_DIR/Multiset.h < patch/Fix-uninitialized-members-in-Multiset.h.patch;
sudo patch -l $CGAL_DIR/Nef_3/Volume.h < patch/Fix-uninitialized-member-in-Volume.h.patch;
sudo patch -l $CGAL_DIR/Polyhedron_incremental_builder_3.h < patch/Fix-uninitialized-member-in-Polyhedron_incremental_builder.h.patch;
sudo patch -l $CGAL_DIR/Triangulation_vertex_base_with_info_2.h < patch/Fix-uninitialized-member-in-Triangulation_vertex_base_with_info_2.h.patch;
sudo patch -l $CGAL_DIR/utility.h < patch/Fix-uninitialized-members-in-utility.h.patch;
sudo patch -l $CGAL_DIR/Straight_skeleton_2/Straight_skeleton_builder_events_2.h < patch/Fix-uninitialized-member-in-Straight_skeleton_builder_events_2.h.patch;
sudo patch -l $CGAL_DIR/Filtered_predicate.h < patch/Fix-uninitialized-member-in-Filtered_predicate.h.patch;
sudo patch -l $CGAL_DIR/Nef_S2/SM_point_locator.h < patch/Fix-unchecked-return-value-warning-in-SM_point_locator.h.patch;
sudo patch -l $CGAL_DIR/Convex_decomposition_3/SM_walls.h < patch/Fix-copy-paste-warning-in-SM_walls.h.patch;
sudo patch -l $CGAL_DIR/Compact_container.h < patch/Fix-null-dereference-warnings-in-Compact_container.h.patch;
sudo patch -l $CGAL_DIR/Surface_mesh_simplification/internal/Edge_collapse.h < patch/Fix-uninitialized-members-in-Edge_collapse.h.patch;
sudo patch -l $CGAL_DIR/boost/graph/IO/Generic_facegraph_printer.h < patch/Fix-uninitalized-member-in-Generic_facegraph_printer.h.patch;
sudo patch -l $CGAL_DIR/Handle_for.h < patch/Fix-uncaught-exception-in-destructor.patch;
sudo patch -l $CGAL_DIR/Convex_hull_vertex_base_2.h < patch/Fix-uninitialized-members-in-Convex_hull_vertex_base_2.patch;
sudo patch -l $CGAL_DIR/Random_impl.h < patch/Fix-use-of-time_t.patch;
- name: Download coverity
run: |
wget -q https://scan.coverity.com/download/cxx/linux64 --post-data "token=$TOKEN&project=GilesBathgate%2FRapCAD" -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: Configure
run: qmake -spec linux-clang CONFIG+=official
- name: Build
run: |
export PATH=`pwd`/cov-analysis-linux64/bin:$PATH
cov-build --dir cov-int make -j2
- name: Submit
run: |
tar czvf rapcad.tgz cov-int
curl \
--form project=GilesBathgate%2FRapCAD \
--form token=$TOKEN \
--form [email protected] \
--form [email protected] \
--form version=$(git rev-parse --short HEAD) \
--form description="Github CI build" \
https://scan.coverity.com/builds?project=GilesBathgate%2FRapCAD
env:
TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}