forked from OSGeo/grass
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'OSGeo:main' into master
- Loading branch information
Showing
416 changed files
with
5,608 additions
and
3,913 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,112 @@ | ||
--- | ||
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 | ||
|
||
# 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 | ||
permissions: | ||
contents: read | ||
# action based off of | ||
# https://github.com/OSGeo/PROJ/blob/905c9a6c2da3dc6b7aa2c89d3ab78d9d1a9cd070/.github/workflows/coverity-scan.yml | ||
jobs: | ||
build: | ||
runs-on: [ ubuntu-latest ] | ||
coverity: | ||
runs-on: ubuntu-22.04 | ||
if: github.repository == 'OSGeo/grass' | ||
steps: | ||
- name: Checkout Source | ||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
- name: Coverity Scan | ||
uses: synopsys-sig/synopsys-action@cef5e38596faf5d2787bbff78a5d7255a9f7682b # v1.8.0 | ||
with: | ||
### SCANNING: Required fields | ||
coverity_url: ${{ secrets.COVERITY_URL }} # The URL to Coverity | ||
coverity_user: ${{ secrets.COVERITY_USER }} # The user for the Coverity project | ||
coverity_passphrase: ${{ secrets.COVERITY_PASSPHRASE }} # The password for the Coverity user | ||
coverity_version: '2023.6.2' # The version for Coverity Scan | ||
- uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3 | ||
|
||
- 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: | | ||
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 | ||
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: | | ||
echo "CFLAGS=${{ env.CFLAGS }}" >> $GITHUB_ENV | ||
echo "CXXFLAGS=${{ env.CXXFLAGS }}" >> $GITHUB_ENV | ||
./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}" | ||
cov-build --dir cov-int make | ||
- name: Put results into Tarball | ||
run: | | ||
tar czvf grass.tgz cov-int | ||
- name: Submit to Coverity Scan | ||
run: | | ||
version=$(head -n 3 include/VERSION | xargs | sed 's/ /./g') | ||
commit=$(git rev-parse --short HEAD) | ||
branch=$(git rev-parse --abbrev-ref HEAD) | ||
desc="Version:${version}, commit:${commit}, branch:${branch}." | ||
echo "Submitting ${desc}" | ||
desc_url_enc=$(echo "$desc" | sed 's/:/%3A/g' | sed 's/,/%2C/g' | sed 's/ /%20/g') | ||
tar czvf grass.tgz cov-int | ||
curl \ | ||
--form "token=${TOKEN}" \ | ||
--form "email=${EMAIL}" \ | ||
--form "[email protected]" \ | ||
--form "version=${version}-${commit}" \ | ||
--form "description=${desc_url_enc}" \ | ||
'https://scan.coverity.com/builds?project=grass' | ||
env: | ||
TOKEN: ${{ secrets.COVERITY_PASSPHRASE }} | ||
EMAIL: ${{ secrets.COVERITY_USER }} |
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
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
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
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
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
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
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
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
Oops, something went wrong.