From e232578e2d66c6360e21455f567168d8d7617ff8 Mon Sep 17 00:00:00 2001 From: Daniel Baston Date: Sat, 10 Aug 2024 07:09:26 -0400 Subject: [PATCH] CI: Update GEOS build script to allow Windows test failure See https://github.com/shapely/shapely/pull/2092 --- ci/wheels/install_geos.cmd | 42 +++++++++++++++++++++++--------------- 1 file changed, 26 insertions(+), 16 deletions(-) diff --git a/ci/wheels/install_geos.cmd b/ci/wheels/install_geos.cmd index fbe88e2a..81b72c2a 100644 --- a/ci/wheels/install_geos.cmd +++ b/ci/wheels/install_geos.cmd @@ -36,22 +36,32 @@ if exist %GEOS_INSTALL% ( echo Using cached %GEOS_INSTALL% -) else ( - echo Building %GEOS_INSTALL% + exit /B 0 +) - curl -fsSO http://download.osgeo.org/geos/geos-%GEOS_VERSION%.tar.bz2 - 7z x geos-%GEOS_VERSION%.tar.bz2 - 7z x geos-%GEOS_VERSION%.tar - cd geos-%GEOS_VERSION% || exit /B 1 +echo Building %GEOS_INSTALL% - pip install ninja cmake - cmake --version +curl -fsSO http://download.osgeo.org/geos/geos-%GEOS_VERSION%.tar.bz2 +7z x geos-%GEOS_VERSION%.tar.bz2 +7z x geos-%GEOS_VERSION%.tar +cd geos-%GEOS_VERSION% || exit /B 1 - mkdir build - cd build - cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX=%GEOS_INSTALL% .. || exit /B 2 - cmake --build . || exit /B 3 - ctest . || exit /B 4 - cmake --install . || exit /B 5 - cd .. -) +pip install ninja cmake +cmake --version + +md build +cd build +cmake -GNinja ^ + -D CMAKE_BUILD_TYPE=Release ^ + -D BUILD_SHARED_LIBS=ON ^ + -D CMAKE_INSTALL_PREFIX=%GEOS_INSTALL% ^ + .. +IF %ERRORLEVEL% NEQ 0 exit /B 2 +cmake --build . +IF %ERRORLEVEL% NEQ 0 exit /B 3 +ctest --output-on-failure . +:: IF %ERRORLEVEL% NEQ 0 exit /B 4 +cmake --install . +IF %ERRORLEVEL% NEQ 0 exit /B 5 + +cd ..