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.
CI: Test also without OpenMP and pthreads (OSGeo#2245)
This adds an additional build configuration to the Ubuntu workflow which builds code without OpenMP and pthreads and runs tests. Notably, modules using nprocs parameter should accept nprocs > 1 even when they are not able to parallelize due to a missing dependency. This check tests that behavior. Other selected optional dependencies can be added in the future. The current goal is to test code without dependencies which don't influence the primary actions the code performs.
- Loading branch information
1 parent
ff86183
commit 7c6e6f3
Showing
2 changed files
with
66 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
#!/usr/bin/env bash | ||
|
||
# The make step requires something like: | ||
# export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$PREFIX/lib" | ||
# further steps additionally require: | ||
# export PATH="$PATH:$PREFIX/bin" | ||
|
||
# fail on non-zero return code from a subprocess | ||
set -e | ||
|
||
# print commands | ||
set -x | ||
|
||
if [ -z "$1" ]; then | ||
echo "Usage: $0 PREFIX" | ||
exit 1 | ||
fi | ||
|
||
# Adding -Werror to make's CFLAGS is a workaround for configuring with | ||
# an old version of configure, which issues compiler warnings and | ||
# errors out. This may be removed with upgraded configure.in file. | ||
makecmd="make" | ||
if [[ "$#" -eq 2 ]]; then | ||
makecmd="make CFLAGS='$CFLAGS $2' CXXFLAGS='$CXXFLAGS $2'" | ||
fi | ||
|
||
# non-existent variables as an errors | ||
set -u | ||
|
||
export INSTALL_PREFIX=$1 | ||
|
||
./configure \ | ||
--prefix="$INSTALL_PREFIX/" \ | ||
--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 | ||
|
||
eval $makecmd | ||
make install |
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