Skip to content

GEOSConcaveHullOfPolygons: Avoid crash on zero-area input, references… #2932

GEOSConcaveHullOfPolygons: Avoid crash on zero-area input, references…

GEOSConcaveHullOfPolygons: Avoid crash on zero-area input, references… #2932

Workflow file for this run

# GitHub Actions for GEOS
#
# Paul Ramsey <pramsey at cleverelephant dot ca>
# Based on AZP configuration by Mateusz Loskot <mateusz at loskot dot net>
name: 'CI'
on:
push:
paths-ignore:
- 'web/**'
pull_request: ~
jobs:
linux:
name: 'Linux'
strategy:
matrix:
ci:
- {
compiler: g++,
build_type: Coverage,
cxxstd: 11,
arch: 64,
packages: 'g++',
cmake: 3.15.*,
cmake_extra: '-DBUILD_BENCHMARKS=ON',
os: ubuntu-20.04
}
# - {
# compiler: g++,
# build_type: Release,
# cxxstd: 11,
# arch: 32,
# packages: 'g++-4.8-multilib gcc-4.8-multilib g++-multilib gcc-multilib',
# cmake: 3.13.*,
# os: ubuntu-20.04
# }
- {
compiler: clang++,
build_type: Release,
cxxstd: 11,
arch: 64,
packages: 'clang',
cmake: 3.13.*,
os: ubuntu-20.04
}
- {
compiler: clang++,
build_type: Debug,
cxxstd: 11,
arch: 64,
packages: 'clang',
cmake: 3.17.*,
os: ubuntu-20.04,
}
- {
compiler: clang++,
build_type: Release,
cxxstd: 14,
arch: 64,
packages: 'clang',
cmake: 3.17.*,
os: ubuntu-20.04
}
- {
compiler: g++,
build_type: Release,
cxxstd: 11,
arch: 64,
packages: 'g++',
cmake: 3.22.*,
os: ubuntu-22.04
}
runs-on: ${{ matrix.ci.os }}
steps:
- name: 'Install'
run: |
set -e
uname -a
sudo -E apt-get update
sudo -E apt-get -yq --no-install-suggests --no-install-recommends install make doxygen python3-pip valgrind ${{ matrix.ci.packages }}
python3 -m pip install --disable-pip-version-check --user cmake==${{ matrix.ci.cmake }}
echo "$(python3 -m site --user-base)/bin" >> $GITHUB_PATH
- name: 'Check Out'
uses: actions/checkout@v4
- name: 'Build'
env:
CFLAGS: "-m${{ matrix.ci.arch }}"
CXXFLAGS: "-m${{ matrix.ci.arch }}"
run: |
set -e
mkdir build.cmake
cd build.cmake
cmake --version
cmake ${{ matrix.ci.cmake_extra }} -DCMAKE_CXX_COMPILER=${{ matrix.ci.compiler }} -DCMAKE_CXX_STANDARD=${{ matrix.ci.cxxstd }} -DBUILD_DOCUMENTATION=YES -DCMAKE_BUILD_TYPE=${{ matrix.ci.build_type }} ..
make -j 2
cmake --build . --target docs
- name: Test
run: |
set -e
cd build.cmake
ctest --output-on-failure .
# Run the all-unit-tests under
# the memory checker when we have Debug symbols
# available. Change to ^all to also check all-xml-tests
- name: Valgrind
if: matrix.ci.build_type == 'Debug'
run: |
set -e
cd build.cmake
ctest --output-on-failure \
--overwrite MemoryCheckCommandOptions="--leak-check=full --error-exitcode=100" \
-R ^all-unit -C Valgrind -T memcheck
- name: 'Upload Valgrind Log'
if: failure()
uses: actions/upload-artifact@v4
with:
name: valgrind-log
path: build.cmake/Testing/Temporary/MemoryChecker.**.log
retention-days: 1
- name: Upload Coverage to Codecov
if: matrix.ci.build_type == 'Coverage'
run: |
curl -o codecov.sh https://codecov.io/bash
bash codecov.sh
shell: bash
windows-mingw:
name: 'Windows (mingw-w64, Debug, 11, x86_64, windows-2019)'
runs-on: windows-2019
defaults:
run:
shell: msys2 {0}
steps:
- name: 'Check Out'
uses: actions/checkout@v4
- name: 'Setup'
uses: msys2/setup-msys2@v2
with:
install: mingw-w64-x86_64-gcc mingw-w64-x86_64-cmake make
update: true
- name: 'Build'
run: |
mkdir build
cd build
cmake --version
cmake -DCMAKE_BUILD_TYPE=Debug -G"MSYS Makefiles" ..
cmake --build . -j 2
- name: 'Test'
run: |
cd build
ctest --output-on-failure .
windows-mingw-release:
name: 'Windows (mingw-w64, Release, 11, x86_64, windows-2019)'
runs-on: windows-2019
defaults:
run:
shell: msys2 {0}
steps:
- name: 'Check Out'
uses: actions/checkout@v4
- name: 'Setup'
uses: msys2/setup-msys2@v2
with:
install: mingw-w64-x86_64-gcc mingw-w64-x86_64-cmake make
update: true
- name: 'Build'
run: |
mkdir build
cd build
cmake --version
cmake -DCMAKE_BUILD_TYPE=Release -G"MSYS Makefiles" ..
cmake --build . -j 2
- name: 'Test'
run: |
cd build
ctest --output-on-failure .
windows-msvc-22:
name: 'Windows (Visual Studio 2022, Debug, windows-2022)'
runs-on: windows-2022
steps:
- name: 'Check Out'
uses: actions/checkout@v4
- name: 'Build'
run: |
mkdir build
cd build
cmake --version
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_STANDARD=14 -DBUILD_SHARED_LIBS=ON ..
cmake --build . --config Debug -j 2
- name: 'Test'
run: |
cd build
ctest --output-on-failure -C Debug
windows-msvc-19:
name: 'Windows (Visual Studio 2019, Release, windows-2019)'
runs-on: windows-2019
steps:
- name: 'Check Out'
uses: actions/checkout@v4
- name: 'Build'
run: |
mkdir build
cd build
cmake --version
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD=14 -DBUILD_SHARED_LIBS=ON ..
cmake --build . --config Release -j 2
- name: 'Test'
run: |
cd build
ctest --output-on-failure -C Release
# windows-msvc-17:
# name: 'Windows (Visual Studio 2017, Release, windows-2016)'
# runs-on: windows-2016
# steps:
# - name: 'Check Out'
# uses: actions/checkout@v4
# - name: 'Build'
# run: |
# mkdir build
# cd build
# cmake --version
# cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD=11 -DBUILD_SHARED_LIBS=ON ..
# cmake --build . --config Release -j 2
# - name: 'Test'
# run: |
# cd build
# ctest --output-on-failure -C Release
cmake-subproject:
name: 'CMake Subproject'
runs-on: ubuntu-20.04
steps:
- name: 'Install'
run: |
set -e
uname -a
sudo -E apt-get update
sudo -E apt-get -yq --no-install-suggests --no-install-recommends install make python3-pip g++
python3 -m pip install --disable-pip-version-check --user cmake==3.13.*
echo "$(python3 -m site --user-base)/bin" >> $GITHUB_PATH
- name: 'Check Out'
uses: actions/checkout@v4
with:
path: geos
- name: 'CMake Superbuild'
run: |
set -e
cp geos/tests/superbuild.CMakeLists.txt ./CMakeLists.txt
cp geos/examples/capi_read.c .
cmake --version
cmake -S . -B build
cmake --build build -j 2
build/capi_read
test ! -f build/geos/bin/test_geos_unit || { echo "Error: GEOS tests were built" 1>&2 ; exit 1; }