forked from OSGeo/gdal
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI: add a configuration testing numpy 2.0.0rc1
Refs OSGeo#9751 This commit should be reverted once alpine:edge switches to numpy 2
- Loading branch information
Showing
3 changed files
with
121 additions
and
0 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,79 @@ | ||
FROM alpine:edge | ||
|
||
RUN apk add \ | ||
apache-arrow-dev \ | ||
armadillo-dev \ | ||
basisu-dev \ | ||
blosc-dev \ | ||
brunsli-dev \ | ||
ccache \ | ||
cfitsio-dev \ | ||
cmake \ | ||
curl-dev \ | ||
expat-dev \ | ||
freexl-dev \ | ||
gcc \ | ||
g++ \ | ||
geos-dev \ | ||
giflib-dev \ | ||
gnu-libiconv-dev \ | ||
hdf5-dev \ | ||
json-c-dev \ | ||
kealib-dev \ | ||
libaec-dev \ | ||
libarchive-dev \ | ||
libdeflate-dev \ | ||
libgeotiff-dev \ | ||
libheif-dev \ | ||
libjpeg-turbo-dev \ | ||
libjxl-dev \ | ||
libkml-dev \ | ||
libpng-dev \ | ||
libpq-dev \ | ||
librasterlite2-dev \ | ||
libspatialite-dev \ | ||
libtirpc-dev \ | ||
libwebp-dev \ | ||
libxml2-dev \ | ||
libxslt-dev \ | ||
linux-headers \ | ||
lz4-dev \ | ||
make \ | ||
mariadb-connector-c-dev \ | ||
netcdf-dev \ | ||
odbc-cpp-wrapper-dev \ | ||
ogdi-dev \ | ||
openexr-dev \ | ||
openjpeg-dev \ | ||
openssl-dev \ | ||
pcre2-dev \ | ||
podofo-dev \ | ||
poppler-dev \ | ||
proj-dev \ | ||
proj-util \ | ||
py3-pip \ | ||
py3-setuptools \ | ||
python3-dev \ | ||
qhull-dev \ | ||
sfcgal-dev \ | ||
snappy-dev \ | ||
sqlite-dev \ | ||
swig \ | ||
tiledb-dev \ | ||
tiff-dev \ | ||
unixodbc-dev \ | ||
xerces-c-dev \ | ||
xz-dev \ | ||
zlib-dev \ | ||
zstd-dev | ||
|
||
# Commenting out those packages to be sure to test numpy 2.0.0rc1 | ||
# py3-numpy \ | ||
# py3-numpy-dev \ | ||
# py3-pyarrow \ | ||
# py3-pyarrow-pyc \ | ||
|
||
COPY requirements.txt /tmp/ | ||
RUN python3 -m pip install --break-system-packages numpy==2.0.0rc1 | ||
RUN python3 -m pip install --break-system-packages -U -r /tmp/requirements.txt | ||
|
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,36 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
cat << EOF > /tmp/foo.cpp | ||
#include <cstdio> | ||
extern "C" void DeclareDeferredFOO(void); | ||
void DeclareDeferredFOO() | ||
{ | ||
FILE* f = fopen("/tmp/DeclareDeferredFOO_has_been_run.bin", "wb"); | ||
if (f) | ||
fclose(f); | ||
} | ||
EOF | ||
|
||
cmake ${GDAL_SOURCE_DIR:=..} \ | ||
-DCMAKE_BUILD_TYPE=Release \ | ||
-DCMAKE_UNITY_BUILD=ON \ | ||
-DUSE_CCACHE=ON \ | ||
-DCMAKE_INSTALL_PREFIX=/usr \ | ||
-DIconv_INCLUDE_DIR=/usr/include/gnu-libiconv \ | ||
-DIconv_LIBRARY=/usr/lib/libiconv.so \ | ||
-DADD_EXTERNAL_DEFERRED_PLUGIN_FOO=/tmp/foo.cpp \ | ||
-DCMAKE_C_FLAGS=-Werror -DCMAKE_CXX_FLAGS="-std=c++23 -Werror" -DWERROR_DEV_FLAG="-Werror=dev" | ||
make -j$(nproc) | ||
make -j$(nproc) install DESTDIR=/tmp/install-gdal | ||
|
||
# To check if DeclareDeferredFOO() is called by GDALAllRegister() | ||
apps/gdalinfo --version | ||
|
||
if test -f /tmp/DeclareDeferredFOO_has_been_run.bin; then | ||
echo "DeclareDeferredFOO() has been run" | ||
else | ||
echo "DeclareDeferredFOO() has NOT been run" | ||
exit 1 | ||
fi |
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