Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
nilason committed Apr 9, 2024
1 parent 88f73e2 commit a247802
Showing 1 changed file with 45 additions and 24 deletions.
69 changes: 45 additions & 24 deletions .github/workflows/coverity.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
name: Coverity Scan
on:
workflow_dispatch: # run whenever a contributor calls it
schedule:
- cron: '48 5 * * *' # Run at 05:48
# Coverity will let GRASS do a scan a maximum of twice per day, so this schedule will help GRASS fit within that limit with some additional space for manual runs

on: [push]

permissions:
contents: read
# action based off of https://github.com/OSGeo/PROJ/blob/905c9a6c2da3dc6b7aa2c89d3ab78d9d1a9cd070/.github/workflows/coverity-scan.yml
# action based off of
# https://github.com/OSGeo/PROJ/blob/905c9a6c2da3dc6b7aa2c89d3ab78d9d1a9cd070/.github/workflows/coverity-scan.yml
jobs:
coverity:
runs-on: ubuntu-22.04
Expand All @@ -23,12 +23,12 @@ jobs:
- name: Create installation directory
run: |
mkdir $HOME/install
- name: Download Coverity Build Tool
run: |
wget -q https://scan.coverity.com/download/cxx/linux64 --post-data "token=$TOKEN&project=grass" -O cov-analysis-linux64.tar.gz
mkdir cov-analysis-linux64
tar xzf cov-analysis-linux64.tar.gz --strip 1 -C cov-analysis-linux64
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
Expand All @@ -44,26 +44,47 @@ jobs:
printenv | sort
gcc --version
ldd --version
- name: Build with cov-build
- 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 -Wvla
CXXFLAGS: -fPIC
CFLAGS: -fPIC -g
CXXFLAGS: -fPIC -g
- name: Build with cov-build
run: |
pwd
export PATH=`pwd`/cov-analysis-linux64/bin:$PATH
cov-build --dir cov-int .github/workflows/build_ubuntu-22.04_without_x.sh $HOME/install
cov-build --dir cov-int make
- name: Submit to Coverity Scan
run: |
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
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 }}

0 comments on commit a247802

Please sign in to comment.