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] | |
jobs: | |
coverity: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
- name: Get dependencies | |
run: | | |
sudo apt-get update -y | |
sudo apt-get install -y wget git gawk findutils | |
xargs -a <(awk '! /^ *(#|$)/' ".github/workflows/apt.txt") -r -- \ | |
sudo apt-get install -y --no-install-recommends --no-install-suggests | |
- name: Create installation directory | |
run: | | |
mkdir $HOME/install | |
- name: Download Coverity Build Tool | |
run: | | |
echo "Download place-in" | |
#mkdir cov-analysis-linux64 | |
#tar xzf cov-analysis-linux64.tar.gz --strip 1 -C cov-analysis-linux64 | |
env: | |
TOKEN: ${{ secrets.COVERITY_PASSPHRASE }} | |
- name: Set number of cores for compilation | |
run: | | |
echo "MAKEFLAGS=-j$(nproc)" >> $GITHUB_ENV | |
- name: Set LD_LIBRARY_PATH for compilation | |
run: | | |
echo "LD_LIBRARY_PATH=$HOME/install/lib" >> $GITHUB_ENV | |
- name: Print build environment variables | |
run: | | |
printenv | sort | |
gcc --version | |
ldd --version | |
- name: Configure | |
run: | | |
./configure \ | |
--prefix="$HOME/install/" \ | |
--enable-largefile \ | |
--with-cxx \ | |
--with-zstd \ | |
--with-bzlib \ | |
--with-blas \ | |
--with-lapack \ | |
--with-readline \ | |
--without-openmp \ | |
--with-pdal \ | |
--without-pthread \ | |
--with-tiff \ | |
--with-freetype \ | |
--with-freetype-includes="/usr/include/freetype2/" \ | |
--with-proj-share=/usr/share/proj \ | |
--with-geos \ | |
--with-sqlite \ | |
--with-fftw \ | |
--with-netcdf | |
env: | |
CFLAGS: -fPIC -g | |
CXXFLAGS: -fPIC -g | |
- name: Build with cov-build | |
run: | | |
pwd | |
export PATH=`pwd`/cov-analysis-linux64/bin:$PATH | |
echo "CFLAGS $CFLAGS" | |
echo "CXXFLAGS $CXXFLAGS" | |
cov-build --dir cov-int make | |
- name: Submit to Coverity Scan | |
run: | | |
echo "Submit place-in" # tar czvf grass.tgz cov-int | |
# curl \ | |
# --form project=grass \ | |
# --form token=$TOKEN \ | |
# --form email=$EMAIL \ | |
# --form file=@grass.tgz \ | |
# --form version=main \ | |
# --form description="`git rev-parse --abbrev-ref HEAD` `git rev-parse --short HEAD`" \ | |
# https://scan.coverity.com/builds?project=grass | |
env: | |
TOKEN: ${{ secrets.COVERITY_PASSPHRASE }} | |
EMAIL: ${{ secrets.COVERITY_USER }} |