@@ -28,11 +28,12 @@ permissions:
28
28
29
29
jobs :
30
30
31
- build-linux-ubuntu-focal :
32
- runs-on : ubuntu-20 .04
31
+ build-linux-ubuntu-jammy :
32
+ runs-on : ubuntu-22 .04
33
33
env :
34
- CMAKE_OPTIONS : -DPython_LOOKUP_VERSION=3.8 -DUSE_CCACHE=ON -DSWIG_REGENERATE_PYTHON=ON
35
- cache-name : cmake-ubuntu-focal
34
+ BUILD_NAME : cmake-ubuntu-jammy
35
+ CMAKE_OPTIONS : -DPython_LOOKUP_VERSION=3.10 -DUSE_CCACHE=ON -DSWIG_REGENERATE_PYTHON=ON
36
+ cache-name : cmake-ubuntu-jammy
36
37
steps :
37
38
- name : Checkout GDAL
38
39
uses : actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
@@ -52,16 +53,16 @@ jobs:
52
53
sudo apt-get install -y -q bison libaec-dev libjpeg-dev libgif-dev liblzma-dev libzstd-dev libgeos-dev git \
53
54
libcurl4-gnutls-dev libproj-dev libxml2-dev libxerces-c-dev libnetcdf-dev netcdf-bin \
54
55
libpoppler-dev libpoppler-private-dev gpsbabel libhdf4-alt-dev libhdf5-serial-dev libpodofo-dev poppler-utils \
55
- libfreexl-dev unixodbc-dev libwebp-dev libepsilon-dev liblcms2-2 libcrypto++-dev libkml-dev \
56
+ libfreexl-dev unixodbc-dev libwebp-dev liblcms2-2 libcrypto++-dev libkml-dev \
56
57
libmysqlclient-dev libarmadillo-dev wget libfyba-dev libjsoncpp-dev libexpat1-dev \
57
58
libclc-dev ocl-icd-opencl-dev libsqlite3-dev sqlite3-pcre libpcre3-dev libspatialite-dev libsfcgal-dev fossil libcairo2-dev libjson-c-dev libdeflate-dev liblz4-dev libblosc-dev libarchive-dev \
58
59
libqhull-dev libcfitsio-dev libogdi-dev libopenjp2-7-dev libheif-dev \
59
- python3-dev libpython3-dev libpython3.8 -dev python3.8 -dev python3-numpy python3-lxml pyflakes python3-setuptools python3-pip python3-venv \
60
+ python3-dev libpython3-dev libpython3.10 -dev python3.10 -dev python3-numpy python3-lxml python3- pyflakes python3-setuptools python3-pip python3-venv \
60
61
python3-pytest swig doxygen texlive-latex-base make cppcheck ccache g++ \
61
- libpq-dev libpqtypes-dev postgresql-12 postgresql-12 -postgis-3 postgresql-client-12 postgresql-12 -postgis-3-scripts
62
+ libpq-dev libpqtypes-dev postgresql-14 postgresql-14 -postgis-3 postgresql-client-14 postgresql-14 -postgis-3-scripts
62
63
# MSSQL: client side
63
64
curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
64
- curl https://packages.microsoft.com/config/ubuntu/20 .04/prod.list | sudo tee /etc/apt/sources.list.d/msprod.list
65
+ curl https://packages.microsoft.com/config/ubuntu/22 .04/prod.list | sudo tee /etc/apt/sources.list.d/msprod.list
65
66
sudo apt-get update
66
67
sudo ACCEPT_EULA=Y apt-get install -y msodbcsql17 unixodbc-dev
67
68
# HANA: client side
97
98
# Workaround bug in ogdi packaging
98
99
sudo ln -s /usr/lib/ogdi/libvrf.so /usr/lib
99
100
#
100
- PYTHON_CMD=python3 && $PYTHON_CMD -m pip install -U pip wheel setuptools numpy importlib_metadata
101
101
PYTHON_CMD=python3 && $PYTHON_CMD -m pip install -r $GITHUB_WORKSPACE/autotest/requirements.txt
102
102
103
103
- name : Build libjxl
@@ -217,17 +217,17 @@ jobs:
217
217
test -f $GITHUB_WORKSPACE/install-gdal/share/man/man1/gdaladdo.1
218
218
export LD_LIBRARY_PATH=$GITHUB_WORKSPACE/install-gdal/lib
219
219
$GITHUB_WORKSPACE/install-gdal/bin/gdalinfo --version
220
- PYTHONPATH=$GITHUB_WORKSPACE/install-gdal/lib/python3.8/site -packages python3 -c "from osgeo import gdal;print(gdal.VersionInfo(None))"
220
+ PYTHONPATH=$GITHUB_WORKSPACE/install-gdal/local/ lib/python3.10/dist -packages python3 -c "from osgeo import gdal;print(gdal.VersionInfo(None))"
221
221
# Test fix for https://github.com/conda-forge/gdal-feedstock/issues/995
222
- PYTHONWARNINGS="error" PYTHONPATH=$GITHUB_WORKSPACE/install-gdal/lib/python3.8/site -packages python3 -c "from osgeo import gdal"
223
- PYTHONPATH=$GITHUB_WORKSPACE/install-gdal/lib/python3.8/site -packages python3 $GITHUB_WORKSPACE/scripts/check_doc.py
222
+ PYTHONWARNINGS="error" PYTHONPATH=$GITHUB_WORKSPACE/install-gdal/local/ lib/python3.10/dist -packages python3 -c "from osgeo import gdal"
223
+ PYTHONPATH=$GITHUB_WORKSPACE/install-gdal/local/ lib/python3.10/dist -packages python3 $GITHUB_WORKSPACE/scripts/check_doc.py
224
224
- name : CMake with rpath
225
225
run : |
226
226
export PATH=$CMAKE_DIR:/usr/local/bin:/usr/bin:/bin # Avoid CMake config from brew etc.
227
227
(cd $GITHUB_WORKSPACE/superbuild/build; cmake .. "-DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/install-gdal-with-rpath" "-DCMAKE_INSTALL_RPATH=$GITHUB_WORKSPACE/install-gdal-with-rpath/lib")
228
228
cmake --build $GITHUB_WORKSPACE/superbuild/build --target install -- -j$(nproc)
229
229
# For some reason, during the install phase of above invocation, the Python bindings are rebuilt after the build phase, and without the rpath... Can't reproduce that locally
230
- # PYTHONPATH=$GITHUB_WORKSPACE/install-gdal-with-rpath/lib/python3.8 /site-packages python -c "from osgeo import gdal;print(gdal.VersionInfo(None))"
230
+ # PYTHONPATH=$GITHUB_WORKSPACE/install-gdal-with-rpath/lib/python3.10 /site-packages python -c "from osgeo import gdal;print(gdal.VersionInfo(None))"
231
231
- name : Rerun using Mono
232
232
run : |
233
233
export PATH=$CMAKE_DIR:/usr/local/bin:/usr/bin:/bin # Avoid CMake config from brew etc.
@@ -240,29 +240,31 @@ jobs:
240
240
- name : Standalone Python bindings build from source
241
241
run : |
242
242
(cd $GITHUB_WORKSPACE/superbuild/build/gdal/swig/python && python setup.py sdist)
243
- mv $GITHUB_WORKSPACE/superbuild/build/gdal/swig/python/dist/gdal -*.tar.gz gdal-python.tar.gz
243
+ mv $GITHUB_WORKSPACE/superbuild/build/gdal/swig/python/dist/GDAL -*.tar.gz gdal-python.tar.gz
244
244
mv $GITHUB_WORKSPACE/superbuild/build/gdal/swig/python gdal-swig-python
245
245
python3 -m venv myvenv
246
246
source myvenv/bin/activate
247
247
# Set PATH so that gdal-config is found
248
+ PYTHON_CMD=python3 && PATH=$GITHUB_WORKSPACE/install-gdal/bin:$PATH $PYTHON_CMD -m pip uninstall numpy
249
+ PYTHON_CMD=python3 && PATH=$GITHUB_WORKSPACE/install-gdal/bin:$PATH $PYTHON_CMD -m pip install numpy==1.26.4
248
250
PYTHON_CMD=python3 && PATH=$GITHUB_WORKSPACE/install-gdal/bin:$PATH $PYTHON_CMD -m pip install gdal-python.tar.gz[numpy]
249
251
LD_LIBRARY_PATH=$GITHUB_WORKSPACE/install-gdal/lib python -c "from osgeo import gdal_array"
250
252
which gdal_edit
251
253
cp $GITHUB_WORKSPACE/autotest/gcore/data/byte.tif .
252
- LD_LIBRARY_PATH=$GITHUB_WORKSPACE/install-gdal/lib ldd myvenv/lib/python3.8 /site-packages/osgeo/_gdal.cpython-38 -x86_64-linux-gnu.so
254
+ LD_LIBRARY_PATH=$GITHUB_WORKSPACE/install-gdal/lib ldd myvenv/lib/python3.10 /site-packages/osgeo/_gdal.cpython-310 -x86_64-linux-gnu.so
253
255
LD_LIBRARY_PATH=$GITHUB_WORKSPACE/install-gdal/lib gdal_edit byte.tif -mo FOO=BAR
254
256
rm -f myvenv/bin/gdal_edit
255
257
rm -f myvenv/bin/gdal_edit.py
256
258
- name : Standalone gdal-utils package from wheel
257
259
run : |
258
260
mv gdal-swig-python $GITHUB_WORKSPACE/superbuild/build/gdal/swig/python
259
- (cd $GITHUB_WORKSPACE/superbuild/build/gdal/swig/python/gdal-utils && python setup.py bdist_wheel)
261
+ (cd $GITHUB_WORKSPACE/superbuild/build/gdal/swig/python/gdal-utils && python3 setup.py bdist_wheel)
260
262
mv $GITHUB_WORKSPACE/superbuild/build/gdal/swig/python/gdal-utils/dist/*.whl gdal_utils-X.Y.Z.T-py3-none-any.whl
261
263
rm -rf $GITHUB_WORKSPACE/superbuild/build/gdal/swig/python
262
264
python3 -m venv myvenv
263
265
source myvenv/bin/activate
264
266
# Set PATH so that gdal-config is found
265
- PYTHON_CMD=python3 && PATH=$GITHUB_WORKSPACE/install-gdal/bin:$PATH $PYTHON_CMD -m pip install gdal_utils-X.Y.Z.T-py3-none-any.whl
267
+ PYTHON_CMD=python3 && PATH=$GITHUB_WORKSPACE/install-gdal/local/ bin:$PATH $PYTHON_CMD -m pip install gdal_utils-X.Y.Z.T-py3-none-any.whl
266
268
which gdal_edit
267
269
cp $GITHUB_WORKSPACE/autotest/gcore/data/byte.tif .
268
270
LD_LIBRARY_PATH=$GITHUB_WORKSPACE/install-gdal/lib gdal_edit byte.tif -mo FOO=BAR
@@ -484,7 +486,7 @@ jobs:
484
486
shell : bash -l {0}
485
487
run : |
486
488
cmake --build $GITHUB_WORKSPACE/build --config Release --target install
487
- export PATH=$GITHUB_WORKSPACE/install-gdal/bin:$PATH
489
+ export PATH=$GITHUB_WORKSPACE/install-gdal/bin:$GITHUB_WORKSPACE/install-gdal/local/bin:$ PATH
488
490
gdalinfo --version
489
491
python -VV
490
492
PYTHONPATH=$GITHUB_WORKSPACE/install-gdal/lib/site-packages python -c "from osgeo import gdal;print(gdal.VersionInfo(None))"
@@ -493,7 +495,7 @@ jobs:
493
495
- name : Check the build includes the expected drivers
494
496
shell : bash -l {0}
495
497
run : |
496
- export PATH=$GITHUB_WORKSPACE/install-gdal/bin:$PATH
498
+ export PATH=$GITHUB_WORKSPACE/install-gdal/local/bin:$GITHUB_WORKSPACE/install-gdal/ bin:$PATH
497
499
gdalinfo --formats > found_formats.txt
498
500
ogrinfo --formats >> found_formats.txt
499
501
cat found_formats.txt
0 commit comments