From 02cce8024d0e91036266cae310ed8d24f9c64d17 Mon Sep 17 00:00:00 2001 From: capellancitizen Date: Tue, 13 Aug 2024 11:27:33 -0400 Subject: CI: Added pytest, some speed improvements (#3135) Geos build is now cached, and its tests are no longer built. --- bin/build-geos-win.cmd | 5 +++-- bin/build-linux-dist | 13 +++++++++---- 2 files changed, 12 insertions(+), 6 deletions(-) (limited to 'bin') diff --git a/bin/build-geos-win.cmd b/bin/build-geos-win.cmd index a3b1ca5d..d81409da 100755 --- a/bin/build-geos-win.cmd +++ b/bin/build-geos-win.cmd @@ -10,8 +10,9 @@ curl -L -O https://github.com/libgeos/geos/releases/download/3.12.2/geos-3.12.2 7z x geos-3.12.2.tar.bz2 7z x geos-3.12.2.tar -cd geos-3.12.2 -cmake -S . -B _build -G "Visual Studio 16 2019" -A %BUILDFLAG% -DCMAKE_INSTALL_PREFIX=%GEOS_INSTALL% -DCMAKE_GENERATOR_TOOLSET=host=x64 +move geos-3.12.2 geos +cd geos +cmake -S . -B _build -G "Visual Studio 16 2019" -A %BUILDFLAG% -DCMAKE_INSTALL_PREFIX=%GEOS_INSTALL% -DCMAKE_GENERATOR_TOOLSET=host=x64 -DBUILD_TESTING=OFF cmake --build _build --config Release -j 16 --verbose cd _build diff --git a/bin/build-linux-dist b/bin/build-linux-dist index aaa487b4..5b591f71 100755 --- a/bin/build-linux-dist +++ b/bin/build-linux-dist @@ -1,15 +1,16 @@ #!/usr/bin/env bash +set -e # creating folder to install geos mkdir $HOME/geos-build GEOS_PATH=$HOME/geos-build # Downloading geos curl -L -O https://github.com/libgeos/geos/releases/download/3.12.2/geos-3.12.2.tar.bz2 -# uzipping geos -tar -xf geos-3.12.2.tar.bz2 -cd geos-3.12.2 +# uzipping geos into the geos directory +mkdir -p geos && cd geos +tar -xf ../geos-3.12.2.tar.bz2 --strip-components=1 # Building geos -mkdir build && cd build && cmake -DCMAKE_INSTALL_PREFIX:PATH=$GEOS_PATH -DCMAKE_BUILD_TYPE=Release .. +mkdir -p build && cd build && cmake -DCMAKE_INSTALL_PREFIX:PATH=$GEOS_PATH -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF .. make && make install export PATH=$GEOS_PATH/bin:$PATH @@ -20,5 +21,9 @@ cd ../.. python -m pip uninstall -y shapely python -m pip cache remove shapely python -m pip install -v shapely --no-binary shapely +# Future improvement might be to split this out so pytest is a separate step and line on the build log, +# but the LD_LIBRARY_PATH env var needs to be passed between those steps with step outputs or something. +# This works for now. +pytest make dist -- cgit v1.2.3